[d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)#6361
[d16-2] Bump VSMac to 8.1.0.2742 to fix msbuild issues (#6279)#6361rolfbjarne merged 3 commits intodotnet:d16-2from
Conversation
* Bump VSMac to 8.1.0.2742 to fix msbuild issues
This is required to get the support for the msbuild `ToolsVersion`
change from `15.0` to `Current`.
* [tests][msbuild] Fix Binding resources test with updated msbuild
Test failure with updated msbuild and vsmac 8.1:
```
Xamarin.iOS.Tasks.NativeReferencesNoEmbedding("iPhone").ShouldNotUnnecessarilyRebuildBindingProject(True)
Binding project build did not create package?
Expected: True
But was: False
at Xamarin.iOS.Tasks.NativeReferencesNoEmbedding.ShouldNotUnnecessarilyRebuildBindingProject (System.Boolean framework) [0x000a0] in <74b8f7d8a53e40109916d305bb4d7403>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo cul
ture) [0x0006a] in <0519fa732e8845b6a809ce9180f541db>:0
```
The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target `_CreateBindingResourcePackage`
doesn't depend on that project file. So, add that to the target inputs.
* [nuget] Use xibuild to run nuget
Fix errors seen during `nuget restore` for tests:
```
Users/builder/jenkins/workspace/xamarin-macios-pr-builder/tests/xammac_tests/xammac_tests.csproj(213,3): error MSB4024: The imported project file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets" could not be loaded. Could not find file "/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Mac/Xamarin.Mac.CSharp.targets"
```
|
The only change we're shipping is the change in Also note that that 8.1.0.2742 is the d16-1 stable version of VSfM. |
This comment has been minimized.
This comment has been minimized.
* [xibuild] Fix incorrect mscorlib.dll being used The `GuiUnit_NET_4_5` project, when built with `xibuild` uses the wrong `mscorlib.dll`. From dotnet#5760 (comment) : ``` - mscorlib.dll is being used from mono/4.5 and the other system assemblies are from mono/4.5-api - GuiNet* project is built with xibuild What is happening here is: xibuild sets[1] `SetToolsetProperty ("TargetFrameworkRootPath", FrameworksDirectory + Path.DirectorySeparatorChar);` which points to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks`. This causes $(FrameworkPathOverride) to be set[2] to `/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/xbuild-frameworks/.NETFramework/v4.5`, but that doesn't have a mscorlib.dll, so it gets reset[3] to /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5/. If we don't set TargetFrameworkRoothPath, then we get `FrameworkPathOverride = /Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api`, causing `_ExplicitReference=/Library/Frameworks/Mono.framework/Versions/5.22.0/lib/mono/4.5-api/mscorlib.dll`(correct one) to be used. ``` Fixes dotnet#5760 1. https://github.com/xamarin/xamarin-macios/blob/master/tools/xibuild/Main.cs#L209 2. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L79 3. https://github.com/mono/msbuild/blob/xplat-master/src/Tasks/Microsoft.Common.CurrentVersion.targets#L84 * Revert "Workaround dotnet#5760 in generator csproj" This reverts commit 9bd927b. The previous commit for xibuild removes the need for this.
) msbuild property names are case insensitive. While generating the custom app.config, in `SetToolsetProperty(..)` we try to update the property if it already exists. But the name lookup was case sensitive, thus causing the lookup to fail, resulting in two entries for the same property name differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`. Fixed to ignore case. Fixes mono/mono#14765 .
|
Build failure Test results3 tests failed, 96 tests passed.Failed tests
|
|
This PR is becoming a bit more important, since without this pretty much every test is failing to build. |
chamons
left a comment
There was a problem hiding this comment.
This is approved to land and but will not go out until Preview 4.
This is required to get the support for the msbuild
ToolsVersionchange from
15.0toCurrent.Test failure with updated msbuild and vsmac 8.1:
The test builds the project multiple times. Before the 3rd build, the project
file's timestamp is updated and expects that the binding package will be
rebuilt. But it is not, because the target
_CreateBindingResourcePackagedoesn't depend on that project file. So, add that to the target inputs.
Fix errors seen during
nuget restorefor tests:This is a backport of #6068, #6202 and #6279.