Msbuild: BaseOutputPath is not respected as per the documentation

Created on 2 Feb 2017  路  5Comments  路  Source: dotnet/msbuild

Going back to Visual Studio 2008 (and up to the current version) it is documented that BaseOutputPath is a "Common MSBuild Project Property".

Specifically it is specified:

Specifies the base path for the output file. If it is set, MSBuild will use OutputPath = $(BaseOutputPath)\$(Configuration).

However, BaseOutputPath is not actually defined or used anywhere in the Common props or targets files.

Most helpful comment

Yes, I believe we should move it from the SDK to the Common props.

All 5 comments

That property doesn't seem to have appeared in common props/targets for any released version of MSBuild. Amusingly, it _is_ now respected for Sdk projects (https://github.com/dotnet/sdk/pull/138#r78616345): https://github.com/dotnet/sdk/blob/c6542db9e04b376d8a2f38574bd6eb3ea36b78e5/src/Tasks/Microsoft.NET.Build.Tasks/build/Microsoft.NET.DefaultOutputPaths.targets#L33-L36

Yes, I believe we should move it from the SDK to the Common props.

@rainersigwald, is this something that is on the roadmap? If so, the change appears to be simple and I can likely do it this weekend.

I ran into this as well. BaseOutputPath is documented as a common project property, but it isn't actually supported unless you use Microsoft.NET.Sdk.

https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties

This is needed for NuGet/Home#9234.

Was this page helpful?
0 / 5 - 0 ratings