Bug 60770 - msbuild on Linux packages directories on wrong level
Summary: msbuild on Linux packages directories on wrong level
Status: RESOLVED FIXED
Alias: None
Product: Installers
Classification: Mono
Component: Linux packages ()
Version: 5.4.0 (2017-06)
Hardware: PC Linux
: --- major
Target Milestone: ---
Assignee: Jo Shields
URL:
Depends on:
Blocks:
 
Reported: 2017-11-20 13:34 UTC by Alexander Köplinger [MSFT]
Modified: 2017-11-27 21:06 UTC (History)
3 users (show)

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

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 GitHub or Developer Community 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 FIXED

Description Alexander Köplinger [MSFT] 2017-11-20 13:34:47 UTC
We have /usr/lib/mono/xbuild/ExtensionsPath and /usr/lib/mono/xbuild/15.0/ExtensionsPath-ToolsVersion but we should only ship the **content** of those folders.

Relevant copying of the folders is here: https://github.com/mono/msbuild/blob/d15.4/install-mono-prefix.sh#L54-L55

@Jo: this seems to be an issue in 5.2 too so not a 5.4 regression (but still important to fix).
Comment 1 Brandon Ording 2017-11-25 22:35:18 UTC
After spending time investigating a build failure, I discovered that the problem was with the ExtensionsPath folders, and found this bug already filed.

I wanted to comment here to point out the severity of this problem, in case it's not immediately apparent based on the original bug description alone.

With the extensions not being in the correct location, this completely breaks the ability of mono's MSBuild to be able to compile a net461-net47 project that references a netstandard2.0 assembly.
Comment 2 Jo Shields 2017-11-27 15:18:57 UTC
(In reply to Alexander Köplinger [MSFT] from comment #0)
> We have /usr/lib/mono/xbuild/ExtensionsPath and
> /usr/lib/mono/xbuild/15.0/ExtensionsPath-ToolsVersion but we should only
> ship the **content** of those folders.
> 
> Relevant copying of the folders is here:
> https://github.com/mono/msbuild/blob/d15.4/install-mono-prefix.sh#L54-L55
> 
> @Jo: this seems to be an issue in 5.2 too so not a 5.4 regression (but still
> important to fix).

To be crystal clear:

/usr/lib/mono/xbuild/15.0/ExtensionsPath-ToolsVersion/Microsoft.Common.targets -> /usr/lib/mono/xbuild/15.0/Microsoft.Common.targets

and

/usr/lib/mono/xbuild/ExtensionsPath/Microsoft -> /usr/lib/mono/xbuild/Microsoft

?
Comment 3 Alexander Köplinger [MSFT] 2017-11-27 15:22:45 UTC
@Jo: yes. We need to fix the install script in msbuild to not use "cp -r" as that works differently on Linux than on Mac.
Comment 4 Jo Shields 2017-11-27 15:32:27 UTC
Either use install(1), or `cp foo/*` instead of `cp foo`
Comment 5 Jo Shields 2017-11-27 19:15:34 UTC
Fixed package is currently propagating across all release branches. Will take a couple of hours to do unattended.
Comment 6 Brandon Ording 2017-11-27 20:40:35 UTC
Which versions will this be fixed in?
Comment 7 Jo Shields 2017-11-27 20:42:19 UTC
debs: 1:15.4+xamarinxplat.2017.09.14.16.14-0xamarin2+ubuntu1404b1
rpms: 15.4+xamarinxplat.2017.09.14.16.14-0.xamarin.4.epel7
Comment 8 Brandon Ording 2017-11-27 20:47:57 UTC
How do those packages relate to the mono packages? Does that mean there will be a new mono release that I can update to and get the fixes?
Comment 9 Jo Shields 2017-11-27 20:49:15 UTC
If you are subscribed to the prealpha, alpha, beta, or stable package repositories, the fixed msbuild package will turn up in there shortly. If you subscribe to a snapshot version, that cannot be fixed.
Comment 10 Brandon Ording 2017-11-27 21:06:59 UTC
Thanks, I've updated to the new MSBuild packages and can confirm that everything is working now.