-
Notifications
You must be signed in to change notification settings - Fork 531
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
[installers] Ship NuGet*
assemblies needed by <AndroidMavenLibrary>
.
#9098
Conversation
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 the pdb
files, we might get a SymbolCheck failure when we go to insert into VS. I'm not sure if it would somehow be able to "find" the symbols for these assemblies, since it is NuGet.
It would be OK if SymbolCheck fails, we just will have to update an exclusion list.
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.
Could we also add a test for the failing AndroidMavenLibrary case?
Unfortunately I don't think that's possible, as it only occurs inside Visual Studio. Running from the command line succeeds, presumably from a copy of these libraries already loaded into the We do have tests for the basic android/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BindingBuildTest.cs Lines 800 to 818 in 3ab04df
|
…9098) Fixes: #9037 Attempting to use `@(AndroidMavenLibrary)` in Visual Studio 17.11 P3, which ships .NET 9 P5, like this: <ItemGroup> <AndroidMavenLibrary Include="com.squareup.okhttp3:okhttp" Version="4.9.3" /> </ItemGroup> gives you the error: …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: System.IO.FileNotFoundException: Could not load file or assembly 'NuGet.ProjectModel, Version=6.9.1.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The specified file cannot be found. …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: File name: 'NuGet.ProjectModel, Version=6.9.1.3, Culture=neutral, PublicKeyToken=31bf3856ad364e35' …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: at Xamarin.Android.Tasks.NuGetPackageVersionFinder.Create(String filename, TaskLoggingHelper log) …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: at Xamarin.Android.Tasks.DependencyResolver..ctor(String lockFile, TaskLoggingHelper log) in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/JavaDependencyVerification.cs:line 124 …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: at Xamarin.Android.Tasks.JavaDependencyVerification.RunTask() in /Users/runner/work/1/s/xamarin-android/src/Xamarin.Android.Build.Tasks/Tasks/JavaDependencyVerification.cs:line 77 …\Microsoft.Android.Sdk.Windows\34.99.0-preview.5.308\tools\Xamarin.Android.Bindings.JavaDependencyVerification.targets(27,5): error XAJDV7028: at Microsoft.Android.Build.Tasks.AndroidTask.Execute() in /Users/runner/work/1/s/xamarin-android/external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs:line 25 We need to ship `NuGet.ProjectModel.dll` as well as its dependencies to ensure they are always available to our MSBuild tasks. Note that NuGet does not ship `.pdb` files for these assemblies in their NuGet packages. We will need to exclude these assemblies from `.pdb` checking. This wasn't caught by CI because CI tests use `dotnet build`, *not* Visual Studio, and the `dotnet` install contains `NuGet.ProjectModel` and related dependencies: % find bin/Debug/dotnet -iname NuGet.Project\* bin/Debug/dotnet/sdk/…/Sdks/Microsoft.NET.Sdk/tools/net472/NuGet.ProjectModel.dll bin/Debug/dotnet/sdk/…/NuGet.ProjectModel.dll …
@jpobst @pjcollins do we have See: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2208678/ |
No, they do not have any in their packages, ex: |
We found you can download them like:
I think the plan is @pjcollins is going to add a step to the release pipeline where we won't have to actually ship these, but VS will have them. |
Fixes: #9037
Attempting to use
<AndroidMavenLibrary>
in Visual Studio 17.11 P3, which ships .NET 9 P5, like this:gives you the error:
We need to ship
NuGet.ProjectModel.dll
as well as its dependencies to ensure they are always available to our MSBuild tasks.Note that NuGet does not ship
.pdb
files for these assemblies in their NuGet packages. We will need to exclude these assemblies from.pdb
checking.