Skip to content

Conversation

@VincentDondain
Copy link
Contributor

Given a Nuget Package added via the "package reference" mechanism and the said package having netstandard 'lib' and 'ref' folders;
MTouch was getting reference assemblies and was trying to AOT them. This resulted in an error as those assemblies are only facades.

'ResolveNuGetPackageAssets' computes the NuGet packages using their json asset file, adds the full assemblies to 'ReferenceCopyLocalPaths' and outputs the resolved references via '_ReferencesFromNuGetPackages'.

This is exactly what "Microsoft.NuGet.Build.Tasks"'s 'ResolveNuGetPackageAssets' target does.

- Fixes issue dotnet#3199: Could not AOT the assembly System.Runtime.CompilerServices.Unsafe.dll (MT3001)
  (dotnet#3199)
- Test case: https://www.dropbox.com/s/kxt3isgzn74nq35/Issue3199.zip?dl=0

### Problem

Given a Nuget Package added via the "package reference" mechanism and the said package having netstandard 'lib' **and** 'ref' folders;
MTouch was getting reference assemblies and was trying to AOT them. This resulted in an error as those assemblies are only facades.

### Solution

'ResolveNuGetPackageAssets' computes the NuGet packages using their json asset file, adds the full assemblies to 'ReferenceCopyLocalPaths' and outputs the resolved references via '_ReferencesFromNuGetPackages'.

This is exactly what "Microsoft.NuGet.Build.Tasks"'s 'ResolveNuGetPackageAssets' target does.
@VincentDondain
Copy link
Contributor Author

@spouliot ahem, better late than never...

@spouliot spouliot added this to the d15-7 milestone Apr 6, 2018
@monojenkins
Copy link
Collaborator

Build success
Build comment file:

Provisioning succeeded
Build succeeded
API Diff (from stable)
API Diff (from PR only)
Generator Diff
Test run succeeded


@spouliot spouliot merged commit aa27dba into dotnet:d15-7 Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants