当前位置: 首页>>代码示例>>C#>>正文


C# DotNetProjectConfiguration类代码示例

本文整理汇总了C#中DotNetProjectConfiguration的典型用法代码示例。如果您正苦于以下问题:C# DotNetProjectConfiguration类的具体用法?C# DotNetProjectConfiguration怎么用?C# DotNetProjectConfiguration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DotNetProjectConfiguration类属于命名空间,在下文中一共展示了DotNetProjectConfiguration类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Load

		public void Load (DotNetProject project, DotNetProjectConfiguration configuration)
		{
			this.project       = project;
			this.configuration = configuration;
			compileTargetCombo.Active          = configuration.CompileTarget == CompileTarget.Exe ? 0 : 1;
			checkbuttonIncludeDebugInfo.Active = configuration.DebugSymbols;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:7,代码来源:CompilerParametersPanelWidget.cs

示例2: Load

		public void Load (DotNetProjectConfiguration configuration)
		{
			this.configuration = configuration;
			compilerParameters = (CSharpCompilerParameters) configuration.CompilationParameters;
			
			symbolsEntry.Text                          = compilerParameters.DefineSymbols;
			generateXmlOutputCheckButton.Active        = !string.IsNullOrEmpty (compilerParameters.DocumentationFile);
			enableOptimizationCheckButton.Active       = compilerParameters.Optimize;
			generateOverflowChecksCheckButton.Active   = compilerParameters.GenerateOverflowChecks;
			warningsAsErrorsCheckButton.Active         = compilerParameters.TreatWarningsAsErrors;
			warningLevelSpinButton.Value               = compilerParameters.WarningLevel;
			ignoreWarningsEntry.Text                   = compilerParameters.NoWarnings;
			
			int i = CSharpLanguageBinding.SupportedPlatforms.IndexOf (compilerParameters.PlatformTarget);
			comboPlatforms.Active = i != -1 ? i : 0;

			if (!configuration.DebugMode || string.Equals ("none", compilerParameters.DebugType, StringComparison.OrdinalIgnoreCase)) {
				comboDebug.Active = DEBUG_NONE;
			} else if (string.Equals ("pdbonly", compilerParameters.DebugType, StringComparison.OrdinalIgnoreCase)) {
				comboDebug.Active = DEBUG_PDB_ONLY;
			} else {
				comboDebug.Active = DEBUG_FULL;
			}

			xmlDocsEntry.DefaultPath = configuration.OutputDirectory;

			xmlDocsEntry.Path = string.IsNullOrEmpty (compilerParameters.DocumentationFile)
				? configuration.CompiledOutputName.ChangeExtension (".xml")
				: compilerParameters.DocumentationFile;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:30,代码来源:CodeGenerationPanel.cs

示例3: LoadConfigData

		public void LoadConfigData (ProjectConfigurationPropertyPanel dlg)
		{	
			configuration = (DotNetProjectConfiguration) dlg.CurrentConfiguration;
			project = (DotNetProject) dlg.ConfiguredProject;
			compilerParameters = (JavaCompilerParameters) configuration.CompilationParameters;

			compileTargetCombo.Active = (int) configuration.CompileTarget;

			if (compilerParameters.Compiler == JavaCompiler.Javac)
				compilerJavacButton.Active = true;
			else
				compilerGcjButton.Active = true;

			enableOptimizationCheckButton.Active = compilerParameters.Optimize;
			generateDebugInformationCheckButton.Active = configuration.DebugMode;
			deprecationCheckButton.Active = compilerParameters.Deprecation;
			generateWarningsCheckButton.Active = compilerParameters.GenWarnings;
			warningsAsErrorsCheckButton.Active = !configuration.RunWithWarnings;
			
			compilerEntry.Text = compilerParameters.CompilerPath;
			classPathEntry.Text = compilerParameters.ClassPath;				
			mainClassEntry.Text = compilerParameters.MainClass;				
			symbolsEntry.Text = compilerParameters.DefineSymbols;	
			OnCompilerToggled (null, null);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:25,代码来源:ProjectConfigurationPropertyPanel.cs

示例4: CreateExecutionCommand

		protected override ExecutionCommand CreateExecutionCommand (ConfigurationSelector configSel,
		                                                            DotNetProjectConfiguration configuration)
		{
			var conf = (MeeGoProjectConfiguration) configuration;
			return new MeeGoExecutionCommand (conf) {
				UserAssemblyPaths = GetUserAssemblyPaths (configSel),
			};
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:8,代码来源:MeeGoProject.cs

示例5: Compile

		public static BuildResult Compile (ProjectItemCollection projectItems, DotNetProjectConfiguration configuration, ConfigurationSelector configurationSelector, IProgressMonitor monitor)
		{
			JavaCompilerParameters parameters = (configuration.CompilationParameters as JavaCompilerParameters) ?? new JavaCompilerParameters ();
			string outdir   = configuration.OutputDirectory;
			string options  = GenerateOptionString (configuration);
			string compiler = parameters.CompilerPath;
			if (String.IsNullOrEmpty (compiler))
				compiler = "javac";
			
			StringBuilder files = new StringBuilder ();
			foreach (ProjectFile finfo in projectItems.GetAll<ProjectFile> ()) {
				if (finfo.Subtype != Subtype.Directory && finfo.BuildAction == BuildAction.Compile) {
					files.Append (" \"");
					files.Append (finfo.Name);
					files.Append ("\"");
				}
			}

			StringBuilder classpath = new StringBuilder (parameters.ClassPath);
			AppendClasspath (classpath, GenerateReferenceStubs (monitor, configurationSelector, configuration, parameters, projectItems));
			AppendClasspath (classpath, GenerateReferenceStub (monitor, configurationSelector, configuration, new ProjectReference(ReferenceType.Gac, "mscorlib")));
			
			StringBuilder args = new StringBuilder ();
			args.Append (options.ToString ());
			if (parameters.Compiler == JavaCompiler.Gcj)
				args.Append ("-C ");
			if (classpath.Length != 0) {
				args.Append (" -classpath ");
				args.Append (classpath.ToString ());
			}
			args.Append (files.ToString ());
			args.Append (" -d ");
			args.Append (outdir);
			
			CompilerResults results = new CompilerResults (new TempFileCollection ());
			StringWriter output = new StringWriter ();
			StringWriter error = new StringWriter ();

			bool success;
			try {
				success = Compile (monitor, compiler, args.ToString (), configuration, parameters, output, error);
				ParseJavaOutput (parameters.Compiler, error.ToString(), results);
			} catch (Exception ex) {
				string errorMsg = AddinManager.CurrentLocalizer.GetString ("Execution on '{0}' failed. Make sure the Java compiler is properly installed", compiler);
				monitor.ReportError (errorMsg, ex);
				success = false;
				results.Errors.Add (new CompilerError ("", 0, 0, "", errorMsg));
			}
			
			if (success) {
				output = new StringWriter ();
				error = new StringWriter ();
				CompileToAssembly (monitor, configuration, parameters, projectItems, output, error);
				ParseIkvmOutput (parameters.Compiler, error.ToString(), results);
			}
			
			return new BuildResult (results, "");
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:58,代码来源:IKVMCompilerManager.cs

示例6: CreateExecutionCommand

		protected override ExecutionCommand CreateExecutionCommand (ConfigurationSelector configSel, DotNetProjectConfiguration configuration)
		{
			var cmd = (DotNetExecutionCommand) base.CreateExecutionCommand (configSel, configuration);
			cmd.Command = Assembly.GetEntryAssembly ().Location;
			cmd.Arguments = "--no-redirect";
			cmd.EnvironmentVariables["MONODEVELOP_DEV_ADDINS"] = GetOutputFileName (configSel).ParentDirectory;
			cmd.EnvironmentVariables ["MONODEVELOP_CONSOLE_LOG_LEVEL"] = "All";
			return cmd;
		}
开发者ID:nomit007,项目名称:MonoDevelop.AddinMaker,代码行数:9,代码来源:AddinProject.cs

示例7: TestSetup

		public void TestSetup()
		{
			_project = new DotNetAssemblyProject ("C#");
			var p = new CSharpCompilerParameters ();
			var config = new DotNetProjectConfiguration () { CompilationParameters = p };
			_project.DefaultConfiguration = config;

			_update = new MonoIsland ();
			_update.BaseDirectory = "/mybase";
		}
开发者ID:0xb1dd1e,项目名称:MonoDevelop.UnityMode,代码行数:10,代码来源:ProjectUpdaterTests.cs

示例8: GenerateOptionString

		static string GenerateOptionString (DotNetProjectConfiguration configuration)
		{
			JavaCompilerParameters parameters = (configuration.CompilationParameters as JavaCompilerParameters) ?? new JavaCompilerParameters ();
			StringBuilder result = new StringBuilder ();
			result.Append (configuration.DebugMode ? " -g " : " -g:none ");
			if (parameters.Optimize)
				result.Append (" -O ");
			if (parameters.Deprecation)
				result.Append (" -deprecation ");
			if (parameters.GenWarnings)
				result.Append (" -nowarn ");
			result.Append (" -encoding utf8 ");
			return result.ToString ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:14,代码来源:IKVMCompilerManager.cs

示例9: CodeGenerationPanelWidget

 			public  CodeGenerationPanelWidget(Properties CustomizationObject) : base ("Nemerle.glade", "CodeGenerationPanel")
 			{
				configuration = (DotNetProjectConfiguration) ((Properties)CustomizationObject).Get("Config");
				compilerParameters = (NemerleParameters) configuration.CompilationParameters;
				
				target.Active = (int) configuration.CompileTarget;
				
				nostdmacros.Active = compilerParameters.Nostdmacros;
				nostdlib.Active    = compilerParameters.Nostdlib;
				ignorewarnings.Active = configuration.RunWithWarnings;
				ot.Active          = compilerParameters.Ot;
				greedy.Active      = compilerParameters.Greedy;
				pedantic.Active    = compilerParameters.Pedantic;
 			}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:14,代码来源:CodeGenerationPanel.cs

示例10: Load

		public void Load (DotNetProjectConfiguration configuration)
		{
			this.configuration = configuration;
			compilerParameters = (CSharpCompilerParameters) configuration.CompilationParameters;
			
			symbolsEntry.Text                          = compilerParameters.DefineSymbols;
			generateDebugInformationCheckButton.Active = configuration.DebugMode;
			generateXmlOutputCheckButton.Active        = compilerParameters.GenerateXmlDocumentation;
			enableOptimizationCheckButton.Active       = compilerParameters.Optimize;
			generateOverflowChecksCheckButton.Active   = compilerParameters.GenerateOverflowChecks;
			warningsAsErrorsCheckButton.Active         = compilerParameters.TreatWarningsAsErrors;
			warningLevelSpinButton.Value               = compilerParameters.WarningLevel;
			additionalArgsEntry.Text                   = compilerParameters.AdditionalArguments;
			ignoreWarningsEntry.Text                   = compilerParameters.NoWarnings;
			
			int i = CSharpLanguageBinding.SupportedPlatforms.IndexOf (compilerParameters.PlatformTarget);
			comboPlatforms.Active = i != -1 ? i : 0;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:18,代码来源:CodeGenerationPanel.cs

示例11: GenerateLaunchScript

		DeployFile GenerateLaunchScript (DeployContext ctx, DotNetProject netProject, LinuxDeployData data, DotNetProjectConfiguration conf)
		{
			string file = ctx.CreateTempFile ();
			string exe = "@[email protected]/" + Path.GetFileName (conf.CompiledOutputName);
			
			using (StreamWriter sw = new StreamWriter (file)) {
				sw.WriteLine ("#!/bin/sh");
				sw.WriteLine ();
				sw.WriteLine ("exec mono \"" + exe + "\" \"[email protected]\"");
			}
			string outfile = data.ScriptName;
			if (string.IsNullOrEmpty (outfile))
				outfile = netProject.Name.ToLower ();
			DeployFile df = new DeployFile (netProject, file, outfile, TargetDirectory.Binaries);
			df.ContainsPathReferences = true;
			df.DisplayName = GettextCatalog.GetString ("Launch script for {0}", netProject.Name);
			df.FileAttributes = DeployFileAttributes.Executable;
			return df;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:19,代码来源:LinuxDeployExtension.cs

示例12: Compile

 public BuildResult Compile(ProjectItemCollection items, DotNetProjectConfiguration configuration, ConfigurationSelector configSelector, IProgressMonitor monitor)
 {
     try
     {
         var outWriter = new StringWriter();
         var arguments = String.Join(" ", items.GetAll<ProjectFile>().Select(pf => pf.FilePath.ToString()).ToArray());
         using (var processWrapper = processStarter.StartProcess("booc", arguments, configuration.OutputDirectory.ToString(), outWriter, monitor.Log))
         {
             using (var aggregatedOperationMonitor = new AggregatedOperationMonitor(monitor, processWrapper))
             {
                 processWrapper.WaitForExit();
                 if (monitor.IsCancelRequested)
                 {
                     monitor.Log.WriteLine("Build canceled");
                     monitor.ReportError("Build canceled", null);
                 }
                 monitor.EndTask(); // TODO: Do we need this?
                 var output = outWriter.ToString();
                 var compilerResults = new CompilerResults(new TempFileCollection());
                 using (var stringReader = new StringReader(output))
                 {
                     for (var line = stringReader.ReadLine(); line != null; line = stringReader.ReadLine())
                     {
                         var error = ParseOutputLine(line);
                         if (error != null)
                         {
                             compilerResults.Errors.Add(error);
                         }
                     }
                 }
                 return new BuildResult(compilerResults, output);
             }
         }
     }
     catch (Exception ex)
     {
         monitor.Log.WriteLine(ex.ToString());
     }
     return null;
 }
开发者ID:kibiz0r,项目名称:MonoBoo,代码行数:40,代码来源:BooLanguageBinding.cs

示例13: GeneratePcFile

		DeployFile GeneratePcFile (DeployContext ctx, DotNetProject netProject, LinuxDeployData data, DotNetProjectConfiguration conf)
		{
			string libs = "-r:@[email protected]/" + Path.GetFileName (conf.CompiledOutputName);
			string requires = "";
			string version = netProject.Version;
			if (string.IsNullOrEmpty (version) && netProject.ParentSolution != null)
				version = netProject.ParentSolution.Version;
			    
			string file = ctx.CreateTempFile ();
			using (StreamWriter sw = new StreamWriter (file)) {
				sw.WriteLine ("Name: " + netProject.Name);
				sw.WriteLine ("Description: " + (String.IsNullOrEmpty(netProject.Description) ? netProject.Name : netProject.Description));
				sw.WriteLine ("Version: " + version);
				sw.WriteLine ();
				sw.WriteLine ("Requires: " + requires);
				sw.WriteLine ("Libs: " + libs);
			}
			string outfile = netProject.Name.ToLower () + ".pc";
			DeployFile df = new DeployFile (netProject, file, outfile, LinuxTargetDirectory.PkgConfig);
			df.ContainsPathReferences = true;
			df.DisplayName = GettextCatalog.GetString ("pkg-config file for {0}", netProject.Name);
			return df;
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:23,代码来源:LinuxDeployExtension.cs

示例14: OnCreateCompilationParameters

		protected override DotNetCompilerParameters OnCreateCompilationParameters (DotNetProjectConfiguration config, ConfigurationKind kind)
		{
			var pars = new CSharpCompilerParameters ();
			if (SupportedPlatforms.Contains (config.Platform))
				pars.PlatformTarget = config.Platform;
			
			if (kind == ConfigurationKind.Debug)
				pars.AddDefineSymbol ("DEBUG");
			else if (kind == ConfigurationKind.Release)
				pars.Optimize = true;
			return pars;
		}
开发者ID:pabloescribanoloza,项目名称:monodevelop,代码行数:12,代码来源:CSharpProjectExtension.cs

示例15: CreateExecutionCommand

		/// <summary>
		///   Creates the execution command.
		/// </summary>
		/// <param name = "configSel">The configuration selector.</param>
		/// <param name = "configuration">The configuration.</param>
		/// <returns>The execution command.</returns>
		protected override ExecutionCommand CreateExecutionCommand (ConfigurationSelector configSel, DotNetProjectConfiguration configuration)
		{
			if (this.CompileTarget != CompileTarget.Exe) {
				return base.CreateExecutionCommand (configSel, configuration);
			}

			if (this.projectType == MonobjcProjectType.None) {
				return base.CreateExecutionCommand (configSel, configuration);
			}

			// Infer application name from configuration
			MonobjcProjectConfiguration conf = (MonobjcProjectConfiguration)configuration;
			String applicationName = this.GetApplicationName (configSel);
			conf.ApplicationName = applicationName;
			
			switch (this.ApplicationType) {
			case MonobjcProjectType.CocoaApplication:
				{
					// Create the bundle maker to get the path to the runtime
					BundleMaker maker = new BundleMaker (applicationName, conf.OutputDirectory);
					conf.Runtime = maker.Runtime;
				}
				break;
			case MonobjcProjectType.ConsoleApplication:
				{
					// Build the command line
					conf.Runtime = FileProvider.GetPath (this.TargetOSVersion, "runtime");
					conf.CommandLineParameters = this.GetOutputFileName (configSel);
				}
				break;
			default:
				throw new NotSupportedException ("Unsupported application type " + this.ApplicationType);
			}

			// Create the command
			MonobjcExecutionCommand command = new MonobjcExecutionCommand (conf);
			command.UserAssemblyPaths = this.GetUserAssemblyPaths (configSel);

			return command;
		}
开发者ID:Monobjc,项目名称:monobjc-monodevelop,代码行数:46,代码来源:MonobjcProject.cs


注:本文中的DotNetProjectConfiguration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。