-
Notifications
You must be signed in to change notification settings - Fork 555
[macos] Fix msbuild issues with shprojj/projitem library #1936
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
Conversation
- In some build cases this chunk of code:
<ItemGroup Condition=" '$(NoCompilerStandardLib)' == 'true' and '$(NoStdLib)' != 'true' ">
<!-- Note that unlike VB, C# does not automatically locate System.dll as a "standard library"
instead the reference is always passed from the project. Also, for mscorlib.dll
we need to provide the explicit location in order to maintain the correct behaviour
-->
<_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />
</ItemGroup>
would trigger and force us to use mscorlib from system mono. That does not work well.
- By setting FrameworkPathOverride, we can get the right mscorlib
- However, that ItemGroup happens outside of a target, so we must move our setting to match for it to take effect
radical
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The msbuild change looks fine. I didn't really look at the test.
|
Build success |
spouliot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for adding a test case :)
|
|
||
| <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <!-- MSBuild specific hacks - Teach msbuild where to find our BCL and facades --> | ||
| <PropertyGroup> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should have a Condition="'$(OS)' != 'Win_NT'"
| <MacBclPath Condition="'$(TargetFrameworkIdentifier)' == 'Xamarin.Mac'">$(XamarinMacFrameworkRoot)/lib/mono/Xamarin.Mac</MacBclPath> | ||
| <FrameworkPathOverride>$(MacBclPath)</FrameworkPathOverride> | ||
| </PropertyGroup> | ||
| <Target Name="FixTargetFrameworkDirectory" AfterTargets="GetReferenceAssemblyPaths"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto here: Condition="'$(OS)' != 'Win_NT'"
|
@kzu Changes made. |
|
Build failure |
1 similar comment
|
Build failure |
|
Known random failure - https://bugzilla.xamarin.com/show_bug.cgi?id=52968 |
In some build cases this chunk of code:
<_ExplicitReference Include="$(FrameworkPathOverride)\mscorlib.dll" />would trigger and force us to use mscorlib from system mono. That does not work well.