You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 1, 2024. It is now read-only.
[windows] fix for when $(VsInstallRoot) is missing a trailing slash (#9)
Usage of Xamarin.Legacy.Sdk on xamarin-android's CI fails with:
error MSB4057: The target "_GetRestoreSettingsPerFramework" does not exist in the project.
Reviewing the build logs, `Xamarin.Android.CSharp.targets` fails to be
imported at all due to:
_LegacyExtensionsPath = C:\Program Files (x86)\Microsoft Visual Studio\2019\EnterpriseMSBuild
It appears that if either `%VSINSTALLDIR%` or `$(VsInstallRoot)` were
missing a trailing slash, then `$(_LegacyExtensionsPath)` would be
incorrect.
First I added a new `samples/tests` folder, to start throwing in
one-off projects as pseudo-unit tests. Or maybe integration tests is a
better term? `dotnet build samples.sln` should be the equivalent of
running tests in this repo.
Next, I moved the `$(VsInstallRoot)` logic to its own
`Xamarin.VsInstallRoot.targets` file to be shared between iOS and
Android.
Lastly, I added the appropriate `EnsureTrailingSlash()` call:
https://docs.microsoft.com/visualstudio/msbuild/property-functions#msbuild-ensuretrailingslash
0 commit comments