xamarin/xamarin-android

Merged
merged 1 commit into from Mar 27, 2018

Conversation

Projects
None yet
3 participants
Contributor

dellis1972 commented Mar 26, 2018 • edited

 The previous commit 029a8b4 fixed up some issues with resolving the correct nuget. However on windows we get some weird pathing issues because the project.assets.json file is using / as path seperators. This is probably to be platform independent. So in the project.assets.json we have a PackageName of System.IO.Packaging/4.4.0 note the use of the /. But our string comparision was using what ever path we had, on windows that was \. c:\pathtonuget\system.io.packaging\4.4.0\ref\netstandard1.3\System.IO.Packaging.dll So we never found the Library were we looking for because system.io.packaging/4.4.0 != system.io.packaging\4.4.0. We just got lucky that it worked on Mac because the path separator is /. We also need to normalize the resulting full path to match the system path separator, otherwise we end up looking for files like c:\pathtonuget\system.io.packaging/4.4.0\lib\netstandard1.3/System.IO.Packaging.dll which do not work.
 [Xamarin.Android.Build.Tasks] Fix an issue where the 'ref' nuget is n… 
…ot found on windows.

The previous commit 029a8b4 fixed up some issues with resolving
the correct nuget. However on windows we get some weird pathing
issues because the project.assets.json file is using / as
path seperators. This is probably to be platform independent.
But our string comparision was using what ever path we had, on
windows that was \. So we never found the Library were we
looking for. We also need to normalize the resulting full path
to match the system path separator.
 59b2038 

Closed

Contributor

jonathanpeppers commented Mar 26, 2018

 I'm starting a Windows PR build for this one

jonpryor merged commit 43fa142 into xamarin:master Mar 27, 2018 5 checks passed

5 checks passed

Ubuntu+xbuild PR Build Build finished. No test results found.
Details
VSTS: Xamarin.Android (Windows) VSTS build finished
Details
Details
macOS+msbuild PR Build Build finished. No test results found.
Details
macOS+xbuild PR Build Build finished. 37146 tests run, 895 skipped, 0 failed.
Details

jonpryor added a commit that referenced this pull request Mar 27, 2018

 [Xamarin.Android.Build.Tasks] Find runtime NuGet on Windows. (#1474) 
The previous commit 029a8b4 fixed up some issues with resolving
the correct nuget. However on windows we get some weird pathing
issues because the project.assets.json file is using / as
path seperators. This is probably to be platform independent.

So in the project.assets.json we have a PackageName of

System.IO.Packaging/4.4.0

note the use of the /.

But our string comparision was using what ever path we had, on
windows that was \:

c:\pathtonuget\system.io.packaging\4.4.0\ref\netstandard1.3\System.IO.Packaging.dll

So we never found the Library were we
looking for because system.io.packaging/4.4.0 != system.io.packaging\4.4.0.
We just got lucky that it worked on Mac because the path separator is /.

We also need to normalize the resulting full path
to match the system path separator, otherwise we end up looking for files like

c:\pathtonuget\system.io.packaging/4.4.0\lib\netstandard1.3/System.IO.Packaging.dll

which do not work.
 dfb56d5