MSB3539 (BaseIntermediateOutputPath modified after use) is triggered incorrectly
See original GitHub issueFrom Microsoft.Common.CurrentVersion.targets:
<Warning Condition=" '$(EnableBaseIntermediateOutputPathMismatchWarning)' == 'true' And '$(_InitialBaseIntermediateOutputPath)' != '$(BaseIntermediateOutputPath)' And '$(BaseIntermediateOutputPath)' != '$(MSBuildProjectExtensionsPath)' "
Code="MSB3539"
Text="The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild which can lead to unexpected build results. Tools such as NuGet will write outputs to the path specified by the "MSBuildProjectExtensionsPath" instead. To set this property, you must do so before Microsoft.Common.props is imported, for example by using Directory.Build.props. For more information, please visit https://go.microsoft.com/fwlink/?linkid=869650"
/>
If MSBuildProjectExtensionsPath
is overridden but BaseIntermediateOutputPath
is not, the _InitialBaseIntermediateOutputPath
will be a relative path (obj\
) while BaseIntermediateOutputPath
will be an absolute path. So the warning will be triggered when it shouldn’t.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
MSB3539 (BaseIntermediateOutputPath modified after use ...
MSB3539 (BaseIntermediateOutputPath modified after use) is triggered incorrectly #3244. Open. dsplaisted opened this issue on Apr 27, ...
Read more >The value of the property "BaseIntermediateOutputPath ...
I keep getting this warning but I don't know why. The value of the property "BaseIntermediateOutputPath" was modified after it was used by ......
Read more >Error DependsOnTargets. _collectBundleResourses
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item. Then copy/paste the version information (you can use the " ......
Read more >Out-of-band DotNet core
targets(813,5): warning MSB3539: The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild which can lead ...
Read more >Microsoft.Common.CurrentVersion.targets
Code="MSB3539". Text="The value of the property "BaseIntermediateOutputPath" was modified after it was used by MSBuild which can ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Also seeing this issue in our project where we set
MSBuildProjectExtensionsPath
in Directory.Build.props as shown below. The warning only triggers on projects that import theMicrosoft.NET.Sdk.Web
Sdk.Out of the 130 NetStandard/NetCore projects that I have, I am only hitting this error on projects that import “Microsoft.NET.Sdk.Web” even though they all set the InterMediateOutputPath the same as the code block below. Reading this PR I think that this is a false warning in my circumstance too, am I truly safe to ignore it until it is resolved in Preview3 or will it cause non-deterministic build behavior?
This section is in my Directory.Build.Props. The purpose of this section is to assure that all build artifacts are placed at the root where our solution is located in each of our repos. Do I also need to set BaseIntermediateOutputPath?