Questions tagged [msbuild-15]

Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework. This tag is related with MSBuild version 15.

Microsoft Build Engine, also known as MSBuild, is a build platform for managed code and was part of .NET Framework. This tag is related with MSBuild version 15.

Project on GitHub.

32 questions
20
votes
1 answer

MSBuild deploy only - no build

Is there anyway to do the publish/deploy part of a /p:DeployOnBuild=true call to MSBuild? For instance, doing the build in one call, then the publish (file copy) in another call. There is an issue with MSBuild 15 and publish profiles when called…
Francois
  • 10,730
  • 7
  • 47
  • 80
14
votes
2 answers

MSBuild 15.0 (Visual Studio 2017) error MSB4067 for SSDT (SSRS and SSAS) projects: "The element beneath element is unrecognized"

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…
11
votes
2 answers

How-to migrate old WinForms projects to the new VS2017 project format

We are currently in the process of upgrading our projects to the new VS2017 project format. The main reason behind this was converting some libraries from PCL to .NetStandard and being able to use the new built in Nuget Package features that come…
Roman Mueller
  • 348
  • 2
  • 11
10
votes
6 answers

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 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…
Jeremy Morton
  • 375
  • 2
  • 13
7
votes
0 answers

MSBuild Design Practice for Custom Props/Targets

I have a NuGet package I'm working on with custom props/targets files and am wondering about best practice for how to many Properties, Items, and Targets in terms of definition and overriding. Is it better to have all properties directly in my…
Jeff
  • 35,755
  • 15
  • 108
  • 220
6
votes
2 answers

How do I merge properties in a Directory.Build.props file instead of overwriting properties?

I have the following Directory.Build.props files:
Gizmo
  • 1,990
  • 1
  • 24
  • 50
4
votes
2 answers

Where to put Rule Sets for MSBuild 15 (Build Tools for Visual Studio 2017)

When enabling Static Code Analysis on my builds, I get the following error thrown by MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\Microsoft.CSharp.CurrentVersion.targets(134,9): warning MSB3884: Could not…
Bouke
  • 11,768
  • 7
  • 68
  • 102
4
votes
2 answers

.NET Multi-Target with .NET Standard and Portable Library MSBuild 15

Porting to .NET standard version, you may be source identical to a portable library, but the platforms supported may not. For example .NET standard 1.6 might be the lowest version that has your api's available from portable Profile47. Profile47…
jbtule
  • 31,383
  • 12
  • 95
  • 128
4
votes
3 answers

MSBuild 15: The "Error" task could not be instantiated

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() ?…
Ian Newson
  • 7,679
  • 2
  • 47
  • 80
4
votes
1 answer

How to properly specify DocumentationFile in MsBuild 15 .csproj with multitargeting

I am using the latest preview of MsBuild 15 and I have a multitarget project file targeting both net40 and netstandard1.6. I am struggling with specifying correctly. For any path I would specify, the resultant xml file after the…
Alexey Subach
  • 11,903
  • 7
  • 34
  • 60
3
votes
1 answer

MSBuild fails for solution with project dependencies

The build for my solution, which contains multiple projects, suddenly appears to be broken and the cause of the issue isn't clear. All of the projects in the solution target the same framework (4.5.1), however, some of the projects' dependencies…
DaRussian
  • 173
  • 3
  • 13
3
votes
1 answer

Msbuild 15 includes config files not set as "do not copy"

We are wanting to start using MSbuild 15 instead of MSBuild 14. We have a small problem though. Previously in MSBuild 14, when a file was marked in Visual Studio as "Do not copy" in the "Copy to Output Directory" setting on the file properties,…
Ryan Blake
  • 79
  • 7
2
votes
0 answers

is it possible to debug an msbuild 15 script with VS 2017?

There is this old article - https://blogs.msdn.microsoft.com/visualstudio/2010/07/06/debugging-msbuild-script-with-visual-studio/ But it does not seem relevant for msbuild 15.
mark
  • 59,016
  • 79
  • 296
  • 580
2
votes
1 answer

Include additional files in build using MSBuild ProjectReference?

I have a class library that has several files that it depends on, and those files must be packaged up for deployment with any project that depends on this library. Right now this means that I must customize each one of those dependent projects to…
bwerks
  • 8,651
  • 14
  • 68
  • 100
2
votes
0 answers

Creating a NuGet Metapackage as a MSBuild Project

Is there any real way to create a NuGet metapackage as an msbuild .proj instead of directly using a nuspec? I want to do this so I can leverage other MSBuild functionality including PackageVersioning, including content files, etc. What I mean is…
Jeff
  • 35,755
  • 15
  • 108
  • 220
1
2 3