C# 클래스 RunTimeCompiler.CsprojCompiler

Compiles a csproj. I should probably define an interface and access the functionality available here via ProjectReader or a similar class.
파일 보기 프로젝트 열기: Virtual-Universe/Virtual-Universe 1 사용 예제들

공개 메소드들

메소드 설명
Compile ( BasicProject project ) : void

This method compiles the project specified as parameter. It can only be used for CSharp projects, but can be modified to support some other .Net project types.

비공개 메소드들

메소드 설명
GetCompilerOptions ( BasicProject project ) : string

This method is used to get the compiler options to be specified in the CompilerParameters for a CodeDomProvider. It determines the compiler options based on the settings from the csproj file.

GetOutputFilename ( BasicProject project ) : string

This method is used to get OutputAssembly settings to be specified in the CompilerParameters for a CodeDomProvider. It returns the absolute path where to place the compiled assembly.

GetOutputPath ( BasicProject project ) : string

It gets the absolute path to the output folder.

GetReferences ( BasicProject project ) : string[]

This method is used to get the list of references to be specified in the CompilerParameters for a CodeDomProvider. It should get the fully qualified names of each reference, but a simple name (with the .dll extension) may be enough in most cases. The current implementation appears to "work ok" with very simple applications but it has two problems: 1) It returns the name of the file and not the fully qualified name. 2) It assumes the name of the file is the assembly title plus the ".dll" extension. A better implementation is needed.

IsExe ( BasicProject project ) : bool

This method is used to get GenerateExecutable settings to be specified in the CompilerParameters for a CodeDomProvider. It returns true if the OutputType specified in the csproj file is winexe or exe.

ReadSourceFiles ( BasicProject project ) : string[]

The method is used to provide the source code for the CodeDomProvider. It reads the content of the source files and returns it.

메소드 상세

Compile() 공개 메소드

This method compiles the project specified as parameter. It can only be used for CSharp projects, but can be modified to support some other .Net project types.
public Compile ( BasicProject project ) : void
project BasicProject
리턴 void