-
Notifications
You must be signed in to change notification settings - Fork 534
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xabuild] Find Microsoft.Portable.CSharp.targets
Builds on Windows were failing because `Microsoft.Portable.CSharp.targets` couldn't be found: > bin\Debug\bin\xabuild /bl Xamarin.Android-Tests.sln ... ...\xamarin-android\external\Java.Interop\lib\mono.linq.expressions\Mono.Linq.Expressions.csproj(108,3): error MSB4019: The imported project "...\xamarin-android\bin\Debug\lib\xamarin.android\xbuild\Microsoft\Portable\v4.0\Microsoft.Portable.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. Turns Out that there are *multiple* `Microsoft` directories of consequence, and we need *all* of them to build, including: * `%ProgramFiles(x86)%\Microsoft Visual Studio\2019\*\MSBuild\Microsoft` * `%ProgramFiles(x86)%\MSBuild\Microsoft\Portable` `xabuild.exe` would symlink the first one into `bin\$(Configuration)\lib\xamarin.android\xbuild`, but not the latter, and lack of the `Microsoft\Portable` directory prevented `Microsoft.Portable.CSharp.targets` from being found. Update `xabuild.exe` to know about `%ProgramFiles(x86)%\MSBuild\Microsoft`. Furthermore, because we now have two `Microsoft` directories, `Microsoft` must now become a "normal" directory, which contains symlinks to *all* the known child directories. To support this, "invert" the `symbolicLinks` dictionary so that the keys are the in-tree paths, making it easier to detect when we need to do such merges. Finally, add code to detect if an existing "conflicting" directory (such as `Microsoft`) is a symlink, and remove it if necessary. This should allow `git pull` + rebuild scenarios to work.
- Loading branch information
Showing
3 changed files
with
136 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters