Cleanup the exiting .NET Core rpms and install preview2, then create a web project.
~
$ sudo dnf remove dotnet-*
$ sudo dnf install dotnet-sdk-2.1.300-preview2-008530-2.1.300_preview2_008530-1.x86_64
$ dotnet new mvc -o mvc-preview2
$ dotnet run
~
Run the project without errors.
See the error.
~~~
$ dotnet run
Using launch settings from /home/tatanaka/mvc-preview2/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0-preview2-final' was not found.
~~~
$ dotnet --info
.NET Core SDK (reflecting any global.json):
Version: 2.1.300-preview2-008530
Commit: 822ae6d43a
Runtime Environment:
OS Name: fedora
OS Version: 27
OS Platform: Linux
RID: fedora.27-x64
Base Path: /usr/share/dotnet/sdk/2.1.300-preview2-008530/
Host (useful for support):
Version: 2.1.0-preview2-26406-04
Commit: 6833f3026b
.NET Core SDKs installed:
2.1.300-preview2-008530 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
~~~
@leecow are you aware of any issues with Fedora?
@tanaka-takayoshi, try:
dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
before running dotnet run. The issue is, not all packages are published to default nuget.org for 2.1.300-preview3.
@steveharter, this can happen on any platform, if we remove the stable version of dotnet and install unstable (aka: having only unstable/preview version of dotnet)
Packages were pulled while we worked out the host issue. Will begin uploading again later today.
I found a newer version "dotnet-sdk-2.1.300-preview2-008533-2.1.300_preview2_008533-1.x86_64" was released. However, the same error happens after I removed the old rpms and installed new ones.
$ sudo dnf remove dotnet*
$ sudo dnf install dotnet-sdk-2.1.300-preview2-008533-2.1.300_preview2_008533-1.x86_64
The following command didn't resolve the issue.
$ dotnet restore -s https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
dotnet add package Microsoft.AspNetCore.All resolve the issue.
SDK do .NET Core (refletindo qualquer global.json):
Version: 2.1.300-preview2-008533
Commit: 996eb6c92c
Ambiente de tempo de execu莽茫o:
OS Name: opensuse
OS Version: 20170721
OS Platform: Linux
RID: linux-x64
Base Path: /usr/share/dotnet/sdk/2.1.300-preview2-008533/
Host (useful for support):
Version: 2.1.0-preview2-26406-04
Commit: 6833f3026b
.NET Core SDKs installed:
2.1.300-preview2-008533 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
dotnet add package Microsoft.AspNetCore.All doesn't resolve the issue on my side.
(both for 2.0.7 and 2.1.0-preview2-final)
Before reinstall the SDK try to remove ~/.nuget and ~/.dotnet. After creates an asp.net project and add the package (dotnet add package Microsoft.AspNetCore.All). This will force the download of all deps. I was facing exactly the same error.
I'm having the same issues on fedora 27, but I'm not being able to resolve it, I've tried removing ~/.nuget, ~/.dotnet and also installing package Microsoft.AspNetCore.All with command line.
Runing:
dotnet new mvc -o dotnet-mvc
cd dotnet-mvc
dotnet run
I get:
Usando la configuraci贸n de inicio de /home/joalcava/Projects/templates/dotnet-mvc/Properties/launchSettings.json...
It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.1.0-preview2-final' was not found.
- Check application dependencies and target a framework version installed at:
/usr/share/dotnet/
- Installing .NET Core prerequisites might help resolve this problem:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
- The .NET Core framework and SDK can be installed from:
https://aka.ms/dotnet-download
and runing dotnet --info:
SDK de .NET Core (reflejando cualquier global.json):
Version: 2.1.300-preview2-008533
Commit: 996eb6c92c
Entorno de tiempo de ejecuci贸n:
OS Name: fedora
OS Version: 27
OS Platform: Linux
RID: fedora.27-x64
Base Path: /usr/share/dotnet/sdk/2.1.300-preview2-008533/
Host (useful for support):
Version: 2.1.0-preview2-26406-04
Commit: 6833f3026b
.NET Core SDKs installed:
2.1.104 [/usr/share/dotnet/sdk]
2.1.300-preview2-008533 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.NETCore.App 2.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0-preview2-26406-04 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Looks like ASPNET package is not getting installed.
@leecow , is this publishing issue ?
Any update on this issue? I am seeing the same problem on Fedora 27
Same on CENTOS 7. Did the same steps as above on 2.1.300-preview2. Worked out of the box on UBUNTU.
In rpm based distros the aspnetcore-runtime-2.1.0-preview2-final package is getting installed in /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/shared/. Just move to /usr/share/dotnet/shared/.
sudo mv /opt/rh/rh-dotnet20/root/usr/lib64/dotnet/shared/* /usr/share/dotnet/shared/
@thild Thanks a lot!
I can workaround on Fedora 27. Also, this workaround works well on a custom docker image with RHEL based.
RC1 was just released but I dont see the packages available in Fedora 28. Is it an issue or should we wait until final release?
re the aspnetcore-runtime-2.1.0-preview2-final package installing to the wrong location causing th error when installing from the https://packages.microsoft.com/rhel/7/prod/ repo.
Looks like a package which is specifically for Red Hat support (aspnetcore-runtime-2.1.0-preview2-final-rh.rhel.7-x64.rpm) was also uploaded alongside the 'generic' rpm (aspnetcore-runtime-2.1.0-preview2-final-x64.rpm). I'll work with the repo owners to get this pulled down. There are now Fedora-specific repos for 26 and 27/28 that won't have this problem. Update your feed baseurl to https://packages.microsoft.com/fedora/26/prod/ or https://packages.microsoft.com/fedora/27/prod/ and you'll be good to go. Not that only the latest 2.0 release and 2.1 RC are available on this feed. If you need older versions, the rhel/7/ repo can be used.
@joalcava - You can use the Fedora/27/ repo on 28. Update your existing repo config baseurl to https://packages.microsoft.com/fedora/27/prod/ or here are the complete feed setup steps if needed.
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
wget -q https://packages.microsoft.com/config/fedora/27/prod.repo
sudo mv prod.repo /etc/yum.repos.d/microsoft-prod.repo
I'm having the same issues on Mac OS, and I resolve this problem with change Microsoft.AspNetCore.All version of 2.1.2 to 2.1.0.
Most helpful comment
re the aspnetcore-runtime-2.1.0-preview2-final package installing to the wrong location causing th error when installing from the https://packages.microsoft.com/rhel/7/prod/ repo.
Looks like a package which is specifically for Red Hat support (
aspnetcore-runtime-2.1.0-preview2-final-rh.rhel.7-x64.rpm) was also uploaded alongside the 'generic' rpm (aspnetcore-runtime-2.1.0-preview2-final-x64.rpm). I'll work with the repo owners to get this pulled down. There are now Fedora-specific repos for 26 and 27/28 that won't have this problem. Update your feed baseurl to https://packages.microsoft.com/fedora/26/prod/ or https://packages.microsoft.com/fedora/27/prod/ and you'll be good to go. Not that only the latest 2.0 release and 2.1 RC are available on this feed. If you need older versions, the rhel/7/ repo can be used.@joalcava - You can use the Fedora/27/ repo on 28. Update your existing repo config baseurl to https://packages.microsoft.com/fedora/27/prod/ or here are the complete feed setup steps if needed.