Skip to content
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

Microsoft.Packaging.Tools.Trimming package can't be found #518

Closed
voltagex opened this Issue Sep 30, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@voltagex
Copy link

voltagex commented Sep 30, 2017

VS2017, .NET Core 2.0.

The instructions in https://github.com/dotnet/standard/blob/release/2.0.0/Microsoft.Packaging.Tools.Trimming/docs/trimming.md say to install Microsoft.Packaging.Tools.Trimming however I can't locacte that package.

PM> Install-Package Microsoft.Packaging.Tools.Trimming
Install-Package : Unable to find package 'Microsoft.Packaging.Tools.Trimming'
At line:1 char:1
+ Install-Package Microsoft.Packaging.Tools.Trimming
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Time Elapsed: 00:00:01.2276512
PM> 
@voltagex

This comment has been minimized.

Copy link
Author

voltagex commented Sep 30, 2017

Got it:

First, create a solution-level NuGet.config with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
 <packageSources>
 	<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
 </packageSources>
</configuration>

I had to restart VS2017 to get it to pick up the new feed but there's probably another way. At this point, I still couldn't get the package to appear in the GUI NuGet browser, so the console command is the way to go:

PM> Install-Package -pre Microsoft.Packaging.Tools.Trimming
  GET https://dotnet.myget.org/F/dotnet-core/api/v3/registration1/microsoft.packaging.tools.trimming/index.json
  GET https://api.nuget.org/v3/registration3-gz-semver2/microsoft.packaging.tools.trimming/index.json
  OK https://api.nuget.org/v3/registration3-gz-semver2/microsoft.packaging.tools.trimming/index.json 238ms
  OK https://dotnet.myget.org/F/dotnet-core/api/v3/registration1/microsoft.packaging.tools.trimming/index.json 1026ms
  GET https://dotnet.myget.org/F/dotnet-core/api/v3/registration1/microsoft.packaging.tools.trimming/page/1.1.0-preview1-25618-01/1.1.0-preview1-25729-01.json
  OK https://dotnet.myget.org/F/dotnet-core/api/v3/registration1/microsoft.packaging.tools.trimming/page/1.1.0-preview1-25618-01/1.1.0-preview1-25729-01.json 1013ms
Restoring packages for C:\Users\Adam\Documents\Visual Studio 2017\Projects\Music\Music\Music.csproj...
  GET https://api.nuget.org/v3-flatcontainer/microsoft.packaging.tools.trimming/index.json
  GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.packaging.tools.trimming/index.json
  OK https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.packaging.tools.trimming/index.json 914ms
  GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.packaging.tools.trimming/1.1.0-preview1-25729-01/microsoft.packaging.tools.trimming.1.1.0-preview1-25729-01.nupkg
  OK https://api.nuget.org/v3-flatcontainer/microsoft.packaging.tools.trimming/index.json 1096ms
  OK https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.packaging.tools.trimming/1.1.0-preview1-25729-01/microsoft.packaging.tools.trimming.1.1.0-preview1-25729-01.nupkg 406ms
Installing Microsoft.Packaging.Tools.Trimming 1.1.0-preview1-25729-01.
Installing NuGet package Microsoft.Packaging.Tools.Trimming 1.1.0-preview1-25729-01.
Committing restore...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
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.