C# Класс NAnt.VSNet.VcProject

Visual C++ project.
Наследование: ProjectBase
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Build() защищенный Метод

protected Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
solutionConfiguration NAnt.VSNet.Configuration
Результат BuildResult

CreateProjectReference() публичный Метод

public CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
project ProjectBase
isPrivateSpecified bool
isPrivate bool
Результат ProjectReferenceBase

CreateReference() защищенный Метод

protected CreateReference ( SolutionBase solution, XmlElement xmlDefinition ) : ReferenceBase
solution SolutionBase
xmlDefinition System.Xml.XmlElement
Результат ReferenceBase

DetermineProductVersion() защищенный Метод

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.
Результат ProductVersion

ExpandMacro() защищенный Метод

Expands the given macro.
protected ExpandMacro ( string macro ) : string
macro string The macro to expand.
Результат string

IsManaged() публичный Метод

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.
Результат bool

IsSupported() публичный статический Метод

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.
Результат bool

LoadGuid() публичный статический Метод

public static LoadGuid ( XmlElement xmlDefinition ) : string
xmlDefinition XmlElement
Результат string

VcProject() публичный Метод

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
Результат System

VerifyProjectXml() защищенный Метод

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.
Результат void