Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSB3539 when redirecting build output in web project #4881

Open
urbanhop opened this issue Nov 4, 2019 · 3 comments
Open

MSB3539 when redirecting build output in web project #4881

urbanhop opened this issue Nov 4, 2019 · 3 comments
Labels
Milestone

Comments

@urbanhop
Copy link

urbanhop commented Nov 4, 2019

A most common task when configuring a build is to specify the output path. This task must be really easy and hasslefree.

Currently it is not possible to redirect the path for a web project without receiving a warning. Using the following directory.build.properties

<PropertyGroup>
  <OutputPath>../acmebin</OutputPath>
  <BaseIntermediateOutputPath>../acmebin/obj</BaseIntermediateOutputPath>
  <MSBuildProjectExtensionsPath>../acmebin/obj/$(MSBuildProjectName)</MSBuildProjectExtensionsPath>
  <RestoreOutputPath>../acmebin/obj/$(MSBuildProjectName)</RestoreOutputPath>
</PropertyGroup>

gives the warning

C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(813,5): warning MSB3539: The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild which can lead to unexpected build results. ...

Expected behavior is no warning. Alternatively any simple way to configure the output directory would be ok.

@livarcocc
Copy link
Contributor

@dsplaisted can you direct to appropriate docs/answer for this?

@livarcocc livarcocc added this to the Discussion milestone Nov 4, 2019
@urbanhop
Copy link
Author

urbanhop commented Nov 5, 2019

@livarcocc Is there any (correct) documentation about BaseIntermediateOutputPath at all? See this question: https://stackoverflow.com/questions/45096549/where-is-full-documentation-about-the-csproj-format-for-net-core

When searching for documentation I just find people struggling with setting the output path of a build - again the most rudimentary aspect one would want to configure. For instance in https://stackoverflow.com/questions/45750068/setting-of-baseintermediateoutputpath-prevents-running-targets-from-nuget Martin Ulrich comments:

"Note that a Directory.Build.props file would be imported early enough in the common props to correctly set BaseIntermediateOutputPath. – Martin Ullrich"

While that works for some projects, it does not work clean for AspNet core applications, where setting the BaseIntermediateOutputPath in Directory.Build.Props raises the warning mentioned in my first post above. So in other words the problem raised here is:

How can I change the build output directory of an AspNet core application? Setting it in build.props works but gives a warning whose meaning remains unknown.

@dsplaisted
Copy link
Member

We want to make this a lot simpler. Here is the issue tracking that: #3497

In that issue or in other issues it links to you can find examples of how people are doing this today.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants