C# Class NAnt.VSNet.ManagedProjectBase

Inheritance: ProjectBase
ファイルを表示 Open project: skolima/NAnt Class Usage Examples

Private Properties

Property Type Description
CheckUpToDate bool
CompileResXFiles void
CreateRegAsmTask NAnt.Win32.Tasks.RegAsmTask
GetLocalizedResources System.Collections.Hashtable
GetTypeLibraryPath string
LoadGuid string
PostBuild bool
PreBuild bool
RegisterEmbeddedResource void
RegisterForComInterop void
UnregisterForComInterop void
WriteNeutralResourceOptions void

Public Methods

Method Description
CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
GetOutputFiles ( NAnt.VSNet.Configuration solutionConfiguration, Hashtable outputFiles ) : void

Gets the complete set of output files for the project configuration matching the specified solution configuration.

The key of the case-insensitive Hashtable is the full path of the output file and the value is the path relative to the output directory.

If the project is not configured to be built for the specified solution configuration, then no output files are added.

IsEnterpriseTemplateProject ( string fileName ) : bool
IsManaged ( NAnt.VSNet.Configuration solutionConfiguration ) : bool

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

LoadGuid ( XmlElement xmlDefinition ) : string

Protected Methods

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

Returns the project location from the specified project XML fragment.

GetProcessStartInfo ( NAnt.VSNet.ConfigurationBase config, string responseFile ) : ProcessStartInfo

Returns a ProcessStartInfo for launching the compiler for this project.

GetProductVersion ( XmlNode projectNode ) : ProductVersion

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

GetProjectLocation ( XmlNode projectNode ) : ProjectLocation

Returns the ProjectLocation of the specified project XML fragment.

ManagedProjectBase ( SolutionBase solution, string projectPath, XmlElement xmlDefinition, NAnt.VSNet.Tasks.SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver, DirectoryInfo outputDir ) : System
Prepare ( NAnt.VSNet.Configuration solutionConfiguration ) : void

Prepares the project for being built.

Ensures the configuration-level object directory exists and ensures that none of the output files are marked read-only.

WriteCompilerOptions ( StreamWriter sw, NAnt.VSNet.Configuration solutionConfiguration ) : void
WriteProjectOptions ( StreamWriter sw ) : void

Private Methods

Method Description
CheckUpToDate ( NAnt.VSNet.Configuration solutionConfiguration ) : bool
CompileResXFiles ( NAnt.VSNet.Configuration solutionConfiguration ) : void
CreateRegAsmTask ( ) : RegAsmTask

Creates and initializes a RegAsmTask instance.

GetLocalizedResources ( ) : Hashtable

Returns Hashtable containing culture-specific resources.

The key of the Hashtable is CultureInfo and the value is an LocalizedResourceSet instance for that culture.

GetTypeLibraryPath ( ConfigurationSettings config ) : string

Gets the absolute path of the type library for the project output.

LoadGuid ( XmlReader guidReader ) : string
PostBuild ( ConfigurationSettings cs, bool bCompileSuccess, bool bOutputUpdated ) : bool
PreBuild ( ConfigurationSettings cs ) : bool
RegisterEmbeddedResource ( string resourceFile, XmlElement elemFile ) : void
RegisterForComInterop ( ConfigurationSettings config, NAnt.VSNet.Configuration solutionConfiguration, string typelibPath ) : void

Generates a type library for the specified assembly, registers it.

The regasm tool is used to generate the type library.

UnregisterForComInterop ( ConfigurationSettings config, NAnt.VSNet.Configuration solutionConfiguration ) : void

Unregister a type library for the specified assembly, and the types in that assembly.

The regasm tool is used to unregister the type library, and remove the COM registration for types in the specified assembly.

WriteNeutralResourceOptions ( StreamWriter sw, NAnt.VSNet.Configuration solutionConfiguration ) : 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

DetermineProjectLocation() protected abstract method

Returns the project location from the specified project XML fragment.
/// The project location could not be determined. /// -or- /// The project location is invalid. ///
protected abstract DetermineProjectLocation ( XmlElement docElement ) : ProjectLocation
docElement System.Xml.XmlElement XML fragment representing the project file.
return ProjectLocation

GetOutputFiles() public method

Gets the complete set of output files for the project configuration matching the specified solution configuration.

The key of the case-insensitive Hashtable is the full path of the output file and the value is the path relative to the output directory.

If the project is not configured to be built for the specified solution configuration, then no output files are added.

public GetOutputFiles ( NAnt.VSNet.Configuration solutionConfiguration, Hashtable outputFiles ) : void
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
outputFiles System.Collections.Hashtable The set of output files to be updated.
return void

GetProcessStartInfo() protected abstract method

Returns a ProcessStartInfo for launching the compiler for this project.
protected abstract GetProcessStartInfo ( NAnt.VSNet.ConfigurationBase config, string responseFile ) : ProcessStartInfo
config NAnt.VSNet.ConfigurationBase The configuration to build.
responseFile string The response file for the compiler.
return System.Diagnostics.ProcessStartInfo

GetProductVersion() protected static 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 static GetProductVersion ( XmlNode projectNode ) : ProductVersion
projectNode System.Xml.XmlNode XML fragment representing the project to check.
return ProductVersion

GetProjectLocation() protected static method

Returns the ProjectLocation of the specified project XML fragment.
/// The project location could not be determined. /// -or- /// The project location is invalid. ///
protected static GetProjectLocation ( XmlNode projectNode ) : ProjectLocation
projectNode System.Xml.XmlNode XML fragment representing the project to check.
return ProjectLocation

IsEnterpriseTemplateProject() public static method

public static IsEnterpriseTemplateProject ( string fileName ) : bool
fileName string
return bool

IsManaged() public method

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

LoadGuid() public static method

public static LoadGuid ( XmlElement xmlDefinition ) : string
xmlDefinition System.Xml.XmlElement
return string

ManagedProjectBase() protected method

protected ManagedProjectBase ( SolutionBase solution, string projectPath, XmlElement xmlDefinition, NAnt.VSNet.Tasks.SolutionTask solutionTask, TempFileCollection tfc, GacCache gacCache, ReferencesResolver refResolver, DirectoryInfo outputDir ) : System
solution SolutionBase
projectPath string
xmlDefinition System.Xml.XmlElement
solutionTask NAnt.VSNet.Tasks.SolutionTask
tfc System.CodeDom.Compiler.TempFileCollection
gacCache NAnt.Core.Util.GacCache
refResolver ReferencesResolver
outputDir System.IO.DirectoryInfo
return System

Prepare() protected method

Prepares the project for being built.
Ensures the configuration-level object directory exists and ensures that none of the output files are marked read-only.
protected Prepare ( NAnt.VSNet.Configuration solutionConfiguration ) : void
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
return void

WriteCompilerOptions() protected method

protected WriteCompilerOptions ( StreamWriter sw, NAnt.VSNet.Configuration solutionConfiguration ) : void
sw System.IO.StreamWriter
solutionConfiguration NAnt.VSNet.Configuration
return void

WriteProjectOptions() protected method

protected WriteProjectOptions ( StreamWriter sw ) : void
sw System.IO.StreamWriter
return void