Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

The specified framework 'Microsoft.NETCore.App', version '1.0.4' was not found #933

Closed
draptik opened this issue Mar 14, 2017 · 5 comments
Closed
Assignees

Comments

@draptik
Copy link

draptik commented Mar 14, 2017

Short issue description

Generator uses outdated version of Microsoft.NETCore.App. Am I doing anything wrong? Are there any updates I missed?

Expected behavior

dotnet run should not throw exception when using default yo aspnet with EmptyWebApplication option.

Actual behavior

The specified framework 'Microsoft.NETCore.App', version '1.0.4' was not found.
  - Check application dependencies and target a framework version installed at:
      /opt/dotnet/shared/Microsoft.NETCore.App
  - The following versions are installed:
      1.1.1
  - Alternatively, install the framework version '1.0.4'.

Steps to reproduce the behavior

npm install -g generator-aspnet
yo aspnet # select all default for EmptyWebApplication
cd EmptyWebApplication
dotnet restore
dotnet build
dotnet run

OS version (Win/Mac/*Nix?)

Arch Linux

Dotnet version

dotnet --info

.NET Command Line Tools (1.0.1)

Product Information:
Version: 1.0.1
Commit SHA-1 hash: 005db40cd1

Runtime Environment:
OS Name: arch
OS Version:
OS Platform: Linux
RID: ubuntu.16.10-x64
Base Path: /opt/dotnet/sdk/1.0.1

NodeJS version

node --version

v6.9.4

Yeoman version

yo --version

1.8.5

Generator version

NPM 3.*:

npm list -g generator-aspnet

└── generator-aspnet@0.3.2

NPM 2.*:

npm ls generator-aspnet -ls=0 --long

└── (empty)

@peterblazejewicz
Copy link
Member

That's correct. Let me udpate this asap. In the meantime update packages version on generated content.

@peterblazejewicz peterblazejewicz self-assigned this Mar 15, 2017
@peterblazejewicz
Copy link
Member

@ducoudray
Copy link

Hi, I changed the image to microsoft/dotnet also in the docker run you have to put the -e "ASPNETCORE_URLS=http://+:80" for example : docker run -it -p 8000:80 -e "ASPNETCORE_URLS=http://+:80" your_image_name. after that you will be able to reach the http://localhost:8000.

Let me know if this works for you.

@draptik
Copy link
Author

draptik commented Mar 21, 2017

So I can't use the generator if the installed version of dotnet is newer?

[~/tmp/deleteme] has 0 total files, 0 hidden, 0 executable.
 $ yo aspnet

     _-----_     ╭──────────────────────────╮
    |       |    │      Welcome to the      │
    |--(o)--|    │  marvellous ASP.NET Core │
   `---------´   │        generator!        │
    ( _´U`_ )    ╰──────────────────────────╯
    /___A___\   /
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

? What type of application do you want to create? Empty Web Application
? What's the name of your ASP.NET application? EmptyWebApplication
   create EmptyWebApplication/.gitignore
   create EmptyWebApplication/Program.cs
   create EmptyWebApplication/Startup.cs
   create EmptyWebApplication/EmptyWebApplication.csproj
   create EmptyWebApplication/web.config
   create EmptyWebApplication/Properties/launchSettings.json
   create EmptyWebApplication/runtimeconfig.template.json
   create EmptyWebApplication/README.md
   create EmptyWebApplication/global.json


Your project is now created, you can use the following commands to get going
    cd "EmptyWebApplication"
    dotnet restore
    dotnet build (optional, build will also happen when it's run)
    dotnet run


[~/tmp/deleteme] has 1 total files, 0 hidden, 0 executable.
 $ cd EmptyWebApplication/
[~/tmp/deleteme/EmptyWebApplication] has 10 total files, 1 hidden, 2 executable.
 $ dotnet restore
  Restoring packages for /home/patrick/tmp/deleteme/EmptyWebApplication/EmptyWebApplication.csproj...
  Generating MSBuild file /home/patrick/tmp/deleteme/EmptyWebApplication/obj/EmptyWebApplication.csproj.nuget.g.props.
  Generating MSBuild file /home/patrick/tmp/deleteme/EmptyWebApplication/obj/EmptyWebApplication.csproj.nuget.g.targets.
  Writing lock file to disk. Path: /home/patrick/tmp/deleteme/EmptyWebApplication/obj/project.assets.json
  Restore completed in 1.12 sec for /home/patrick/tmp/deleteme/EmptyWebApplication/EmptyWebApplication.csproj.
  
  NuGet Config files used:
      /home/patrick/.nuget/NuGet/NuGet.Config
  
  Feeds used:
      https://api.nuget.org/v3/index.json
[~/tmp/deleteme/EmptyWebApplication] has 11 total files, 1 hidden, 2 executable.
 $ dotnet run
The specified framework 'Microsoft.NETCore.App', version '1.0.4' was not found.
  - Check application dependencies and target a framework version installed at:
      /opt/dotnet/shared/Microsoft.NETCore.App
  - The following versions are installed:
      1.1.1
  - Alternatively, install the framework version '1.0.4'.

Just asking...

My version(s):

$ dotnet
Microsoft .NET Core Shared Framework Host
  Version  : 1.1.0
  Build    : 928f77c4bc3f49d892459992fb6e1d5542cb5e86
[...]
 $ dotnet --version
1.0.1

peterblazejewicz added a commit that referenced this issue Mar 22, 2017
Update runtime dependencies to 1.0.4/1.1.1. Closes #933
@AlexeyVT
Copy link

AlexeyVT commented Apr 5, 2017

In the .csproj file
1.0.4
change to
1.1.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants