Bug 57812 - CopyNonResxEmbeddedResources target broken on msbuild but not xbuild
Summary: CopyNonResxEmbeddedResources target broken on msbuild but not xbuild
Status: RESOLVED DUPLICATE of bug 55147
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: MSBuild ()
Version: Master
Hardware: Macintosh Mac OS
: High normal
Target Milestone: 15.4
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2017-06-27 21:12 UTC by Devan Stormont
Modified: 2017-07-31 18:24 UTC (History)
6 users (show)

Tags: xamextfollowed
Is this bug a regression?: ---
Last known good build:


Attachments
Build output from Xamarin Studio and Visual Studio for Mac (big gap between the two snippets on line 232) (70.35 KB, text/plain)
2017-06-27 21:12 UTC, Devan Stormont
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED DUPLICATE of bug 55147

Description Devan Stormont 2017-06-27 21:12:01 UTC
Created attachment 23152 [details]
Build output from Xamarin Studio and Visual Studio for Mac (big gap between the two snippets on line 232)

CopyNonResxEmbeddedResources target fails to run on Visual Studio for Mac

Building the same solution with Xamarin Studio and Visual Studio for Mac generates different Mac app packages. Specifically, the CopyNonResxEmbeddedResources target is run by Xamarin Studio, but not by VS4Mac.

Examining the build output, we can see that XS runs three targets against the missing linked resources: _CollectBundleResources, _PackLibraryResources, and CopyNonResxEmbeddedResources.
VS4Mac only runs the first two targets: _CollectBundleResources and _PackLibraryResources.

Snippets of the build output from a dependent project have been attached, from which these differences can be observed.

Reproducible against:

- Every system/VM we've tested with so far (4 or so).
- Whether the resources are copied or linked into the project.
- Regardless of whether the top-level project includes the resources, or if they are linked in a dependent project.

Tested against:

- Latest Xamarin Studio [Community] (v6.3 build 864)
- Latest Visual Studio for Mac [Community and Professional] (v7.0.1 build 24)
- Latest Visual Studio for Mac Preview [Community] (v7.1 build 583)
- Mono frameworks 4.8.1, 5.0.1, and 5.2.0.104
Comment 1 Cody Russell 2017-07-05 15:46:59 UTC
Would you mind trying a couple things?

1. In Preferences -> Projects -> Build, disable MSBuild and switch back to xbuild.

2. Try running msbuild from the command line instead of through MacVS and see if that is any different.
Comment 2 Devan Stormont 2017-07-05 16:44:12 UTC
1) Produces the same (correct) build package as Xamarin Studio. Looks like basically the same output as the successful XS build.

2) Produces the same (incorrect) build package as running through MacVS with MSBuild enabled. This is actually how we first noticed the issue, building through TeamCity with MSBuild at the command line. I've verified this again on my local dev system.
Comment 3 Cody Russell 2017-07-05 20:32:39 UTC
Chris, are you familiar with this issue? Jeff said he thinks it may already be fixed but said you might know better.
Comment 4 Chris Hamons 2017-07-06 21:56:58 UTC
So this appears to be another msbuild/xbuild issue. Moving to XM.
Comment 5 Jeffrey Stedfast 2017-07-31 17:29:53 UTC
I think this might be a duplicate of bug #55147
Comment 6 Chris Hamons 2017-07-31 18:24:19 UTC
I believe so as well. The PR included appears to match.

*** This bug has been marked as a duplicate of bug 55147 ***