C# Class NAnt.VSNet.ProjectReferenceBase

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

Public Methods

Method Description
GetAssemblyReferences ( NAnt.VSNet.Configuration solutionConfiguration ) : StringCollection

Gets the complete set of assemblies that need to be referenced when a project references this project.

Apparently, there's some hack in VB.NET that allows a type to be used that derives from a type in an assembly that is not referenced by the project.

When building from the command line (using vbc), the following error is reported "error BC30007: Reference required to assembly 'X' containing the base class 'X'. Add one to your project".

Somehow VB.NET can workaround this issue, without actually adding a reference to that assembly. I verified this with both VS.NET 2003 and VS.NET 2005.

For now, we have no other option than to return all assembly references of the referenced project if the parent is a VB.NET project.

GetOutputFiles ( NAnt.VSNet.Configuration solutionConfiguration, Hashtable outputFiles ) : void

Gets the complete set of output files for the referenced project.

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.

GetPrimaryOutputFile ( NAnt.VSNet.Configuration solutionConfiguration ) : string

Gets the output path of the reference, without taking the "copy local" setting into consideration.

GetTimestamp ( NAnt.VSNet.Configuration solutionConfiguration ) : System.DateTime

Gets the timestamp of the reference.

Protected Methods

Method Description
LoadProject ( SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir, string projectFile ) : ProjectBase
ProjectReferenceBase ( ReferencesResolver referencesResolver, ProjectBase parent ) : System

Method Details

GetAssemblyReferences() public method

Gets the complete set of assemblies that need to be referenced when a project references this project.

Apparently, there's some hack in VB.NET that allows a type to be used that derives from a type in an assembly that is not referenced by the project.

When building from the command line (using vbc), the following error is reported "error BC30007: Reference required to assembly 'X' containing the base class 'X'. Add one to your project".

Somehow VB.NET can workaround this issue, without actually adding a reference to that assembly. I verified this with both VS.NET 2003 and VS.NET 2005.

For now, we have no other option than to return all assembly references of the referenced project if the parent is a VB.NET project.

public GetAssemblyReferences ( NAnt.VSNet.Configuration solutionConfiguration ) : StringCollection
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
return System.Collections.Specialized.StringCollection

GetOutputFiles() public method

Gets the complete set of output files for the referenced project.
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.
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

GetPrimaryOutputFile() public method

Gets the output path of the reference, without taking the "copy local" setting into consideration.
public GetPrimaryOutputFile ( NAnt.VSNet.Configuration solutionConfiguration ) : string
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
return string

GetTimestamp() public method

Gets the timestamp of the reference.
public GetTimestamp ( NAnt.VSNet.Configuration solutionConfiguration ) : System.DateTime
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
return System.DateTime

LoadProject() protected method

protected LoadProject ( SolutionBase solution, TempFileCollection tfc, GacCache gacCache, DirectoryInfo outputDir, string projectFile ) : ProjectBase
solution SolutionBase
tfc TempFileCollection
gacCache GacCache
outputDir DirectoryInfo
projectFile string
return ProjectBase

ProjectReferenceBase() protected method

protected ProjectReferenceBase ( ReferencesResolver referencesResolver, ProjectBase parent ) : System
referencesResolver ReferencesResolver
parent ProjectBase
return System