Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 3118 [details]
patch to unify obj/ with bin/ logic
Currently the ProjectConfiguration.IntermediateOutputPath is always set to:
In order to match xbuild/msbuild, it needs to be as above when $(Platform) == 'AnyCPU', but otherwise:
The xbuild script says:
mcs/tools/xbuild/xbuild/4.5/Microsoft.Common.targets: <IntermediateOutputPath Condition=" '$(PlatformName)' == 'AnyCPU'">$(BaseIntermediateOutputPath)$(Configuration)\</IntermediateOutputPath>
mcs/tools/xbuild/xbuild/4.5/Microsoft.Common.targets: <IntermediateOutputPath Condition=" '$(PlatformName)' != 'AnyCPU'">$(BaseIntermediateOutputPath)$(PlatformName)\$(Configuration)\</IntermediateOutputPath>
The result of this is when you have a project set to a platform other than 'AnyCPU', and you have a .resx file in it (it may not be limited to resx), it will look for the built .resource file in the wrong place, and the build will be considered out of date.
I've attached a patch that will set the default obj/ path in the same way bin/ is currently handled. It should also allow IntermediateOutputPath to be set explicitly in the build script (without being visible in the UI), but I haven't tested that yet.
P.S. I put this in 'general' because the patch extends slightly outside of DotNetProject.
Thanks for the patch, however it will unnecessarily cause the IntermediateOutputPath value to be stored explicitly in the csproj file for every configuration. I have committed a different implementation that handles custom values, but instead of storing the default value, computes it as needed.