msbuild-15

How to make an MSBuild Target that only runs once instead of once, before Targets that run once per framework in the TargetFrameworks tag?

我与影子孤独终老i 提交于 2019-12-21 21:43:07
问题 I have a code generator tool that I partially own, and now that csproj files can list multiple Target Frameworks in them and building builds all of them, I am trying to figure out how to make an MSBuild Target to do the code generation only once per running the build, no matter how many Target Frameworks are listed, and have the compiling for each of the Target Frameworks wait until the code generation has completed. I currently have it conditional on a specific value of TargetFramework. For

MSBuild 15.0 (Visual Studio 2017) error MSB4067 for SSDT (SSRS and SSAS) projects: “The element <State> beneath element <Project> is unrecognized”

99封情书 提交于 2019-12-20 12:15:17
问题 MSBuild 14.0 (the version included with Visual Studio 2015) logs warnings (MSB4078) when building a solution which contains SSDT projects (rptproj or dwproj projects). For example: warning MSB4078: The project file "Reports.rptproj" is not supported by MSBuild and cannot be built. This is fine, MSBuild does not support SSDT projects, and we have to fall back to building them with Visual Studio (i.e. devenv.com ). See, for example, this answer. When using MSBuild 15.0 (the version included

MSBuild 15: The “Error” task could not be instantiated

不问归期 提交于 2019-12-07 08:19:26
问题 I'm attempting to programmatically build a project which uses C#7, and therefore MSBuild 15, but this task is failing seemingly because of mismatched assembly references. Here is my code: string projectFilePath = Path.Combine(args.Any() ? args.First() :@"C:\Users\newsoni\Documents\Visual Studio 2017\Projects\ConsoleApp2\ConsoleApp2.sln"); ProjectCollection pc = new ProjectCollection(); Dictionary<string, string> globalProperty = new Dictionary<string, string>(); globalProperty.Add(

MSBuild 15: The “Error” task could not be instantiated

早过忘川 提交于 2019-12-05 14:57:08
I'm attempting to programmatically build a project which uses C#7, and therefore MSBuild 15, but this task is failing seemingly because of mismatched assembly references. Here is my code: string projectFilePath = Path.Combine(args.Any() ? args.First() :@"C:\Users\newsoni\Documents\Visual Studio 2017\Projects\ConsoleApp2\ConsoleApp2.sln"); ProjectCollection pc = new ProjectCollection(); Dictionary<string, string> globalProperty = new Dictionary<string, string>(); globalProperty.Add("Configuration", "Debug"); globalProperty.Add("Platform", "x86"); BuildParameters bp = new BuildParameters(pc); bp

How to make an MSBuild Target that only runs once instead of once, before Targets that run once per framework in the TargetFrameworks tag?

╄→гoц情女王★ 提交于 2019-12-04 19:12:26
I have a code generator tool that I partially own, and now that csproj files can list multiple Target Frameworks in them and building builds all of them, I am trying to figure out how to make an MSBuild Target to do the code generation only once per running the build, no matter how many Target Frameworks are listed, and have the compiling for each of the Target Frameworks wait until the code generation has completed. I currently have it conditional on a specific value of TargetFramework. For example, Condition="'netstandard2.0' == '$(TargetFramework)'" . This avoids the code generation tool

MSBuild 15.0 (Visual Studio 2017) error MSB4067 for SSDT (SSRS and SSAS) projects: “The element <State> beneath element <Project> is unrecognized”

纵饮孤独 提交于 2019-12-03 02:31:25
MSBuild 14.0 (the version included with Visual Studio 2015) logs warnings (MSB4078) when building a solution which contains SSDT projects (rptproj or dwproj projects). For example: warning MSB4078: The project file "Reports.rptproj" is not supported by MSBuild and cannot be built. This is fine, MSBuild does not support SSDT projects, and we have to fall back to building them with Visual Studio (i.e. devenv.com ). See, for example, this answer . When using MSBuild 15.0 (the version included with Visual Studio 2017), however, building the same solution file gives the following error : Reports