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


C# Microsoft.SetProperty方法代码示例

本文整理汇总了C#中Microsoft.SetProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Microsoft.SetProperty方法的具体用法?C# Microsoft.SetProperty怎么用?C# Microsoft.SetProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft的用法示例。


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

示例1: Generate

 public override void Generate(ProjectType projectType, Microsoft.Build.Evaluation.Project project) {
     project.SetProperty(Name, Value + projectType.CodeExtension);
 }
开发者ID:ReedCopsey,项目名称:VisualFSharpPowerTools,代码行数:3,代码来源:StartupFileProjectProperty.cs

示例2: ResolveAssemblyReferences

        private IEnumerable<string> ResolveAssemblyReferences(Microsoft.Build.Evaluation.Project project)
        {
            var projectInstance = project.CreateProjectInstance();
            projectInstance.SetProperty("BuildingProject", "false");
            project.SetProperty("DesignTimeBuild", "true");

            projectInstance.Build("ResolveAssemblyReferences", new[] { new ConsoleLogger(LoggerVerbosity.Minimal) });
            var items = projectInstance.GetItems("_ResolveAssemblyReferenceResolvedFiles");
            return items.Select(i => Path.Combine(Path.GetDirectoryName(this.FileName), i.GetMetadataValue("Identity")));
        }
开发者ID:rpepato,项目名称:StructEx,代码行数:10,代码来源:Project.cs

示例3: SetTreatLevel

        private static void SetTreatLevel(Microsoft.Build.BuildEngine.Project project, BuildIntegration buildIntegration)
        {
            Param.AssertNotNull(project, "project");
            Param.AssertNotNull(buildIntegration, "enable");

            switch (buildIntegration)
            {
                case BuildIntegration.None:
                    break;
                case BuildIntegration.TreatErrorAsWarning:
                    project.SetProperty(StyleCopTreatErrorsAsWarnings, true.ToString(), string.Empty);
                    break;
                case BuildIntegration.TreatErrorAsError:
                    project.SetProperty(StyleCopTreatErrorsAsWarnings, false.ToString(), string.Empty);
                    break;
                default:
                    throw new ArgumentOutOfRangeException("buildIntegration");
            }
        }
开发者ID:transformersprimeabcxyz,项目名称:_TO-FIRST-stylecop,代码行数:19,代码来源:ProjectUtilities.cs

示例4: SetWarehouseVersion

        public void SetWarehouseVersion(Microsoft.TeamFoundation.Warehouse.WarehouseDataAccessComponent dac)
        {
            var assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;

            dac.SetProperty(null, VersionPropertyBagKey, assemblyVersion.ToString());
        }
开发者ID:devopsteamberlin,项目名称:TFSDatawarehouse,代码行数:6,代码来源:TFSUsersAdapterVersion.cs

示例5: ResolveAssemblyReferences

		IEnumerable<string> ResolveAssemblyReferences(Microsoft.Build.Evaluation.Project project)
		{
			// Use MSBuild to figure out the full path of the referenced assemblies
			var projectInstance = project.CreateProjectInstance();
			projectInstance.SetProperty("BuildingProject", "false");
			project.SetProperty("DesignTimeBuild", "true");
			
			projectInstance.Build("ResolveAssemblyReferences", new [] { new ConsoleLogger(LoggerVerbosity.Minimal) });
			var items = projectInstance.GetItems("_ResolveAssemblyReferenceResolvedFiles");
			string baseDirectory = Path.GetDirectoryName(this.FileName);
			var result = items.Select(i => Path.Combine(baseDirectory, i.GetMetadataValue("Identity"))).ToList();
			if (!result.Any(t => t.Contains("mscorlib") || t.Contains("System.Runtime")))
				result.Add(typeof(object).Assembly.Location);
			return result;
		}
开发者ID:0xb1dd1e,项目名称:NRefactory,代码行数:15,代码来源:CSharpProject.cs


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