C# Class NAnt.VSNet.VcProject

Visual C++ project.
Inheritance: ProjectBase
Exibir arquivo Open project: skolima/NAnt Class Usage Examples

Private Properties

Property Type Description
BuildCPPFiles void
BuildIDLFiles void
BuildResourceFiles void
CleanPath string
ExecuteBuildEvent bool
ExecuteInProjectDirectory void
GetObjOutputFile string
GetObjectFile string
GetProductVersion ProductVersion
GetResourceOutputFile string
GetVcProjectDependencies ProjectBaseCollection
MergeToolSetting string
PostBuild bool
PreBuild bool
PreLink bool
RunCustomBuildStep bool
RunLibrarian void
RunLinker void
RunNMake void

Public Methods

Method Description
CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
IsManaged ( Configuration solutionConfiguration ) : bool

Gets a value indicating whether building the project for the specified build configuration results in managed output.

IsSupported ( XmlElement docElement ) : bool

Returns a value indicating whether the project represented by the specified XML fragment is supported by VcProject.

A project is identified as as Visual C++ project, if the XML fragment at least has the following information:

]]>
LoadGuid ( XmlElement xmlDefinition ) : string
VcProject ( SolutionBase solution, string projectPath, XmlElement xmlDefinition, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver, DirectoryInfo outputDir ) : System

Protected Methods

Method Description
Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
CreateReference ( SolutionBase solution, XmlElement xmlDefinition ) : ReferenceBase
DetermineProductVersion ( XmlElement docElement ) : ProductVersion

Returns the Visual Studio product version of the specified project XML fragment.

ExpandMacro ( string macro ) : string

Expands the given macro.

VerifyProjectXml ( XmlElement docElement ) : void

Verifies whether the specified XML fragment represents a valid project that is supported by this ProjectBase.

Private Methods

Method Description
BuildCPPFiles ( ArrayList fileNames, NAnt.VSNet.Configuration solutionConfiguration, VcConfigurationBase fileConfig ) : void
BuildIDLFiles ( ArrayList fileNames, NAnt.VSNet.VcProjectConfiguration projectConfig, VcConfigurationBase fileConfig ) : void

Build Interface Definition Language files for the given configuration.

TODO: refactor this as we should always get only one element in the fileNames list. Each IDL file should be built with its own file configuration.

BuildResourceFiles ( ArrayList fileNames, NAnt.VSNet.VcProjectConfiguration projectConfig, VcConfigurationBase fileConfig ) : void

Build resource files for the given configuration.

TODO: refactor this as we should always get only one element in the fileNames list. Each res file should be built with its own file configuration.

CleanPath ( string path ) : string

Removes leading and trailing quotes from the specified path.

ExecuteBuildEvent ( string buildEvent, string buildCommandLine, ConfigurationBase config ) : bool
ExecuteInProjectDirectory ( Task task ) : void
GetObjOutputFile ( string fileName, VcConfigurationBase fileConfig, string intermediateDir ) : string
GetObjectFile ( VcConfigurationBase fileConfig ) : string

Gets the absolute path to the object file or directory.

We use an absolute path for the object file, otherwise <cl> assumes a location relative to the output directory - not the project directory.

GetProductVersion ( XmlElement docElement ) : ProductVersion

Returns the Visual Studio product version of the specified project XML fragment.

GetResourceOutputFile ( string fileName, VcConfigurationBase fileConfig ) : string
GetVcProjectDependencies ( ) : ProjectBaseCollection
MergeToolSetting ( VcProjectConfiguration projectConfig, VcConfigurationBase fileConfig, string tool, string setting ) : string

Merges the specified tool setting of projectConfig with fileConfig.

The merge is suppressed when the flag $(noinherit) is defined in fileConfig.

PostBuild ( VcProjectConfiguration projectConfig ) : bool
PreBuild ( VcProjectConfiguration projectConfig ) : bool
PreLink ( VcProjectConfiguration projectConfig ) : bool
RunCustomBuildStep ( Configuration solutionConfiguration, VcProjectConfiguration projectConfig ) : bool
RunLibrarian ( VcProjectConfiguration projectConfig ) : void
RunLinker ( Configuration solutionConfiguration ) : void
RunNMake ( string nmakeCommand ) : void

Method Details

Build() protected method

protected Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
solutionConfiguration NAnt.VSNet.Configuration
return BuildResult

CreateProjectReference() public method

public CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
project ProjectBase
isPrivateSpecified bool
isPrivate bool
return ProjectReferenceBase

CreateReference() protected method

protected CreateReference ( SolutionBase solution, XmlElement xmlDefinition ) : ReferenceBase
solution SolutionBase
xmlDefinition System.Xml.XmlElement
return ReferenceBase

DetermineProductVersion() protected method

Returns the Visual Studio product version of the specified project XML fragment.
/// The product version could not be determined. /// -or- /// The product version is not supported. ///
protected DetermineProductVersion ( XmlElement docElement ) : ProductVersion
docElement XmlElement The document element of the project.
return ProductVersion

ExpandMacro() protected method

Expands the given macro.
protected ExpandMacro ( string macro ) : string
macro string The macro to expand.
return string

IsManaged() public method

Gets a value indicating whether building the project for the specified build configuration results in managed output.
public IsManaged ( Configuration solutionConfiguration ) : bool
solutionConfiguration Configuration The solution configuration that is built.
return bool

IsSupported() public static method

Returns a value indicating whether the project represented by the specified XML fragment is supported by VcProject.

A project is identified as as Visual C++ project, if the XML fragment at least has the following information:

]]>
public static IsSupported ( XmlElement docElement ) : bool
docElement XmlElement XML fragment representing the project to check.
return bool

LoadGuid() public static method

public static LoadGuid ( XmlElement xmlDefinition ) : string
xmlDefinition XmlElement
return string

VcProject() public method

public VcProject ( SolutionBase solution, string projectPath, XmlElement xmlDefinition, SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver, DirectoryInfo outputDir ) : System
solution SolutionBase
projectPath string
xmlDefinition XmlElement
solutionTask SolutionTask
tfc TempFileCollection
gacCache GacCache
refResolver ReferencesResolver
outputDir DirectoryInfo
return System

VerifyProjectXml() protected method

Verifies whether the specified XML fragment represents a valid project that is supported by this ProjectBase.
/// The XML fragment is not supported by this . /// -or- /// The XML fragment does not represent a valid project (for this ). ///
protected VerifyProjectXml ( XmlElement docElement ) : void
docElement XmlElement XML fragment representing the project file.
return void