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
2
votes
1 answer

Treat ProjectReference as PackageReference or allow PackageReference to local csproj

I have a netstandard2.0 csproj (let's call it MyPackage) that is packed at build time (as specified by GeneratePackageOnBuild) into a nuget package. This nuget package has custom props and targets in the build directory (so referencing projects get…
Jeff
  • 35,755
  • 15
  • 108
  • 220
2
votes
1 answer

Wrong App.Config publish.targets MSBuild 15

I posted this question on GitHub/Microsoft/MSBuild but I'm hoping the wider community might have some early experience with this. I'm working on converting a solution / projects from VS 2015 (.NET core preview) to VS 2017 and latest .NET Core. The…
jflsitecore
  • 121
  • 3
1
vote
1 answer

MSBuild not adding a /reference for nuget PackageReference when building with jenkins

I have a jenkins build that cleans, restores, and then builds a unit test project. This project, along with my others, have recently been migrated to use PackageReference. The clean works, and the restore works. I verified that NUnit exists in…
Chris
  • 3,400
  • 1
  • 27
  • 41
1
vote
1 answer

Does msbuild 15 support before solution targets?

I have installed VS 2017 and started building my solution with MSBuild 15. Immediately I notice that none of my before.{SolutionName}.sln.targets files are loaded. I checked with ProcMon and the files are open and read without errors. But none of…
mark
  • 59,016
  • 79
  • 296
  • 580
1
vote
1 answer

How to remove the dependencies section from nuspec file in the generated nuget package using msbuild 15

I use msbuild v15.8.168.64424 (vs 2017.8) commandline to build nuget package for console application. I used ILMerge to merge all dependencies, so I get only one exe file without dependencies. When runing the command msbuild…
M.Hassan
  • 10,282
  • 5
  • 65
  • 84
1
vote
1 answer

PackageReference Resolve Version Logic as API

Is there any accessible API via an MSBuild task, target or otherwise that allows me to query what version of a NuGet package a given PackageReference will resolve (or has already resolved) to? For example, if I have a csproj with
Jeff
  • 35,755
  • 15
  • 108
  • 220
1
vote
1 answer

MSBuild 15 csproj with NuSpecFile

We are working to migrate to PackageReference restore style csproj's but have many nuspec's for such projects the rely on some of the default nuget pack CLI behavior. Specifically: version substitution auto-generation of dependencies section auto…
Jeff
  • 35,755
  • 15
  • 108
  • 220
1
vote
1 answer

How do I set AssemblyVersion with * for auto build number in MBUILD 15?

I still want to let my new csproj generate the version number for my library with the new msbuild. But how do I allow the old msbuild behavior of filling in a random build number with an asterix * placeholder?
jbtule
  • 31,383
  • 12
  • 95
  • 128
1
vote
1 answer

How do I set the build-specific version number for a projectReference so that the NuGet package dependency lists the correct version

Using the new CSProj format in Visual Studio 2017, I have written a targets file to handle a new Configuration called CreateLocalPackages, which has the build create a NuGet package in a specific local folder and has it automatically increment its…
Jeremy Morton
  • 375
  • 2
  • 13
1
vote
2 answers

MSBuild 2017 failing to build Cordova solution

I have recently upgraded my Cordova solution to work with Visual Studio 2017. I am able to successfully build Android APKs from within the Visual Studio Professional 2017 IDE. When I try to build the solution using MSBuild 2017 from the command…
Callum
  • 11
  • 4
0
votes
1 answer

element below element is unknown — why?

I manually edited my MSBuild file to execute a few commands only when a certain condition is met:
AxD
  • 2,714
  • 3
  • 31
  • 53
0
votes
0 answers

C# MSBuild not including the NuGet packages (works in Visual Studio 17)

I am using PackageReference in my .csproj file and my build works in Visual Studio (2017). I'm building with .net 4.5 I have looked at this: (MSBuild not adding a /reference for nuget PackageReference when building with jenkins) I was at first…
0
votes
0 answers

upgrading Asp.net Webapi project to .net 4.7.2 from .net 4.6.2 framework and also changing existing project format to MsBuild 15 format

I'm upgrading Asp.net Webapi project to .net 4.7.2 from .net 4.6.2 framework and also changing existing project format to MsBuild 15 format. On local dev machine it works fine with out any issue. My application is deployed on Azure webapp. When try…
Movva
  • 140
  • 1
  • 3
  • 11
0
votes
1 answer

MSBuild15 CS0121 ambiguous 'List.List(params T[])' and 'List.List(params List[])'

The following code will compile in MSBuild12, but will fail in MSBuild15 using System; using System.Collections; using System.Collections.Generic; using System.Linq; namespace Example { public class List : IEnumerable { …
abc123
  • 17,855
  • 7
  • 52
  • 82
0
votes
0 answers

SonarQube parallel builds: System.IO.IOException: The file SonarQube.Integration.ImportBefore.targets already exists

When running multiple different or parallel jobs in Jenkins that involve the SonarQube Scanner for MSBuild, this exception immediately terminates the build job: 10:46:22 [workspace] $…