Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to find package Microsoft.NETCore.App with version(>=3.0.0)

I am trying to migrate my WPF(.net framework) project to WPF(.net core 3). So i have installed this Visual Studio Extension and i m now able to create a new Wpf(.net core) project , but the problem starts when i add a nuget package ! , VS throws me this error :

Unable to find package Microsoft.NETCore.App with version (>= 3.0.0-preview6-27730-01)
- Found 69 version(s) in nuget.org [ Nearest version: 3.0.0-preview5-27626-15 ]
- Found 0 version(s) in Microsoft Visual Studio Offline Packages    TestwpfCore C:\Users\sintware\source\repos\TestwpfCore\TestwpfCore\TestwpfCore.csproj   1   
like image 561
A.HADDAD Avatar asked Jun 07 '19 09:06

A.HADDAD


1 Answers

As dotnet core 3.0 is still in preview, you should put the following in a file called NuGet.Config in the root of your project (or merge with your existing file):

<configuration>
  <packageSources>
    <add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
    <add key="dotnet-windowsdesktop" value="https://dotnetfeed.blob.core.windows.net/dotnet-windowsdesktop/index.json" />
    <add key="aspnet-aspnetcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json" />
    <add key="aspnet-aspnetcore-tooling" value="https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore-tooling/index.json" />
    <add key="aspnet-entityframeworkcore" value="https://dotnetfeed.blob.core.windows.net/aspnet-entityframeworkcore/index.json" />
    <add key="aspnet-extensions" value="https://dotnetfeed.blob.core.windows.net/aspnet-extensions/index.json" />
    <add key="gRPC repository" value="https://grpc.jfrog.io/grpc/api/nuget/v3/grpc-nuget-dev" />
  </packageSources>
</configuration>

This will make sure the preview versions can be found!

This information can be found here: https://github.com/dotnet/core-sdk#installers-and-binaries

As soon as dotnet core 3.0 is released you should be able to remove these package sources.

like image 196
Robin Krom Avatar answered Sep 25 '22 11:09

Robin Krom