C# Class NAnt.VSNet.VcProject

Visual C++ project.
Inheritance: ProjectBase
Afficher le fichier Open project: skolima/NAnt Class Usage Examples

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

protected Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
solutionConfiguration NAnt.VSNet.Configuration
Résultat BuildResult

CreateProjectReference() public méthode

public CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
project ProjectBase
isPrivateSpecified bool
isPrivate bool
Résultat ProjectReferenceBase

CreateReference() protected méthode

protected CreateReference ( SolutionBase solution, XmlElement xmlDefinition ) : ReferenceBase
solution SolutionBase
xmlDefinition System.Xml.XmlElement
Résultat ReferenceBase

DetermineProductVersion() protected méthode

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.
Résultat ProductVersion

ExpandMacro() protected méthode

Expands the given macro.
protected ExpandMacro ( string macro ) : string
macro string The macro to expand.
Résultat string

IsManaged() public méthode

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.
Résultat bool

IsSupported() public static méthode

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.
Résultat bool

LoadGuid() public static méthode

public static LoadGuid ( XmlElement xmlDefinition ) : string
xmlDefinition XmlElement
Résultat string

VcProject() public méthode

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
Résultat System

VerifyProjectXml() protected méthode

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.
Résultat void