Пример #1
0
        public static void InitializeProject(string dir, DotNetProject project, string name)
        {
            project.DefaultNamespace = name;

            DotNetProjectConfiguration pcDebug       = project.AddNewConfiguration("Debug") as DotNetProjectConfiguration;
            CSharpCompilerParameters   csparamsDebug = (CSharpCompilerParameters)pcDebug.CompilationParameters;

            pcDebug.DebugType           = "full";
            pcDebug.OutputDirectory     = Path.Combine(dir, "bin/Debug");
            pcDebug.OutputAssembly      = name;
            pcDebug.DebugSymbols        = true;
            csparamsDebug.DefineSymbols = "DEBUG;TRACE";
            csparamsDebug.Optimize      = false;

            DotNetProjectConfiguration pcRelease       = project.AddNewConfiguration("Release") as DotNetProjectConfiguration;
            CSharpCompilerParameters   csparamsRelease = (CSharpCompilerParameters)pcRelease.CompilationParameters;

            pcRelease.DebugType           = "none";
            pcRelease.OutputDirectory     = Path.Combine(dir, "bin/Release");
            pcRelease.OutputAssembly      = name;
            csparamsRelease.DefineSymbols = "TRACE";
            csparamsRelease.Optimize      = true;

            string pfile = Path.Combine(dir, name);

            project.FileName = pfile;
        }
Пример #2
0
		public static void InitializeProject (string dir, DotNetProject project, string name)
		{
			project.DefaultNamespace = name;
			
			DotNetProjectConfiguration pcDebug = project.AddNewConfiguration ("Debug") as DotNetProjectConfiguration;
			CSharpCompilerParameters csparamsDebug = (CSharpCompilerParameters) pcDebug.CompilationParameters;
			csparamsDebug.DebugType = "full";
			pcDebug.OutputDirectory = Path.Combine (dir, "bin/Debug");
			pcDebug.OutputAssembly = name;
			pcDebug.DebugMode = true;
			csparamsDebug.DefineSymbols = "DEBUG;TRACE";
			csparamsDebug.Optimize = false;
			
			DotNetProjectConfiguration pcRelease = project.AddNewConfiguration ("Release") as DotNetProjectConfiguration;
			CSharpCompilerParameters csparamsRelease = (CSharpCompilerParameters) pcRelease.CompilationParameters;
			csparamsRelease.DebugType = "none";
			pcRelease.OutputDirectory = Path.Combine (dir, "bin/Release");
			pcRelease.OutputAssembly = name;
			csparamsRelease.DefineSymbols = "TRACE";
			csparamsRelease.Optimize = true;
			
			string pfile = Path.Combine (dir, name);
			project.FileName = pfile;
		}