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

dotnet run looking for Microsoft.NETCore.App 1.1.0 (not preview), without me referencing it #4599

Closed
kierenj opened this Issue Nov 3, 2016 · 20 comments

Comments

Projects
None yet
6 participants
@kierenj

kierenj commented Nov 3, 2016

Steps to reproduce

Unfortunately I only have a fairly complex, private set of projects which exhibit this.

I am very happy to spend time diagnosing, sharing specific information and trying things out.

Basically, though: dotnet run on my project, whose setup is described in a little more detail here: http://stackoverflow.com/questions/40396769/dotnet-run-looking-for-microsoft-netcore-app-1-1-0-not-preview-i-never-ref . Key facts:

  • I have preview1-001100-00 installed (it works with new and other projects)
  • I only reference Microsoft.NETCore.App 1.1.0-preview1-*

Expected behavior

Project runs as it did before.

Actual behavior

The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.1
      1.1.0-preview1-001100-00
  - Alternatively, install the framework version '1.1.0'.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-preview2-1-003155)

Product Information:
 Version:            1.0.0-preview2-1-003155
 Commit SHA-1 hash:  d7b0190bd4

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64

Anything I can do to dig in deeper, diagnose, things to look for, I'm all ears!

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

I hit this, too. The preview must be installed locally:

Windows x64: https://go.microsoft.com/fwlink/?LinkID=831453
Windows x86: https://go.microsoft.com/fwlink/?LinkID=831458
macOS x64: https://go.microsoft.com/fwlink/?LinkID=831445
Linux x64: https://github.com/dotnet/core/blob/master/release-notes/preview-download.md

[EDIT] It wasn't enough to merely reference the metapackage for my self-contained app ...

"Microsoft.NETCore.App": "1.1.0-preview1-001100-00",

... I had to run the installer to get the bits into C:\Program Files\dotnet\shared\Microsoft.NETCore.App

Contributor

guardrex commented Nov 3, 2016

I hit this, too. The preview must be installed locally:

Windows x64: https://go.microsoft.com/fwlink/?LinkID=831453
Windows x86: https://go.microsoft.com/fwlink/?LinkID=831458
macOS x64: https://go.microsoft.com/fwlink/?LinkID=831445
Linux x64: https://github.com/dotnet/core/blob/master/release-notes/preview-download.md

[EDIT] It wasn't enough to merely reference the metapackage for my self-contained app ...

"Microsoft.NETCore.App": "1.1.0-preview1-001100-00",

... I had to run the installer to get the bits into C:\Program Files\dotnet\shared\Microsoft.NETCore.App

@livarcocc

This comment has been minimized.

Show comment
Hide comment
@livarcocc
Member

livarcocc commented Nov 3, 2016

@kierenj

This comment has been minimized.

Show comment
Hide comment
@kierenj

kierenj Nov 3, 2016

@guardrex, I think I have that already - as I say, I've installed the preview1, other 1.1.0-preview1 apps work fine, and the output of dotnet run states I have 1.1.0-preview1-001100 installed. Are you /sure/ its the same issue?

kierenj commented Nov 3, 2016

@guardrex, I think I have that already - as I say, I've installed the preview1, other 1.1.0-preview1 apps work fine, and the output of dotnet run states I have 1.1.0-preview1-001100 installed. Are you /sure/ its the same issue?

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

Oh, sorry. 😄 I was just remarking on Slack that I haven't had enough ☕️ yet this morning (or 🍺 Hooray Cubs!)

Anywho, yeah, I sort of wanted to just ref the metapackage and 🎵 jam on it 🎵, but I hit the same thing you did.

Contributor

guardrex commented Nov 3, 2016

Oh, sorry. 😄 I was just remarking on Slack that I haven't had enough ☕️ yet this morning (or 🍺 Hooray Cubs!)

Anywho, yeah, I sort of wanted to just ref the metapackage and 🎵 jam on it 🎵, but I hit the same thing you did.

@gkhanna79

This comment has been minimized.

Show comment
Hide comment
@gkhanna79

gkhanna79 Nov 3, 2016

Member

I believe the activation path only supports specifying exact version of M.N.App.

Member

gkhanna79 commented Nov 3, 2016

I believe the activation path only supports specifying exact version of M.N.App.

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

... but "Microsoft.NETCore.App": "1.1.0-preview1-001100-00", is the exact version, no? (confused 😕 )

Contributor

guardrex commented Nov 3, 2016

... but "Microsoft.NETCore.App": "1.1.0-preview1-001100-00", is the exact version, no? (confused 😕 )

@gkhanna79

This comment has been minimized.

Show comment
Hide comment
@gkhanna79

gkhanna79 Nov 3, 2016

Member

Yes, that is the exact version. Maybe I misunderstood since -* was being referred to above:

I only reference Microsoft.NETCore.App 1.1.0-preview1-*

Is that not correct?

Member

gkhanna79 commented Nov 3, 2016

Yes, that is the exact version. Maybe I misunderstood since -* was being referred to above:

I only reference Microsoft.NETCore.App 1.1.0-preview1-*

Is that not correct?

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

In my case what I did was use the exact version in a self-contained project, so I didn't have "type": "platform" on the dep. I saw that this package was listed at NuGet. I naively thought that I could just list the metapackage, restore, and publish, but it choked and demanded that the metapackage appear at C:\Program Files\dotnet\shared\. After I ran the installer and the package was there, it worked.

I guess the thing that I'm confused about is that this requirement didn't seem to be the case for other packages or metapackages referenced this way in project.json IIRC. Why does this particular metapackage need to be installed locally in that folder?

Contributor

guardrex commented Nov 3, 2016

In my case what I did was use the exact version in a self-contained project, so I didn't have "type": "platform" on the dep. I saw that this package was listed at NuGet. I naively thought that I could just list the metapackage, restore, and publish, but it choked and demanded that the metapackage appear at C:\Program Files\dotnet\shared\. After I ran the installer and the package was there, it worked.

I guess the thing that I'm confused about is that this requirement didn't seem to be the case for other packages or metapackages referenced this way in project.json IIRC. Why does this particular metapackage need to be installed locally in that folder?

@gkhanna79

This comment has been minimized.

Show comment
Hide comment
@gkhanna79

gkhanna79 Nov 3, 2016

Member

M.N.App defines the core .NET Core FX and when referencing it, it is expected to be present in dotnet\shared for portable apps or will be published alongwith the app when it is published as standalone.

it choked and demanded that the metapackage appear at C:\Program Files\dotnet\shared.

Did you publish the application as standalone? If so, can you please share the repro project for @schellap to take a look at?

Member

gkhanna79 commented Nov 3, 2016

M.N.App defines the core .NET Core FX and when referencing it, it is expected to be present in dotnet\shared for portable apps or will be published alongwith the app when it is published as standalone.

it choked and demanded that the metapackage appear at C:\Program Files\dotnet\shared.

Did you publish the application as standalone? If so, can you please share the repro project for @schellap to take a look at?

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

Yes, the app is self-contained and published as such. I'll repro myself one more time in a few hours and then put up a repro project and signal you back here.

Contributor

guardrex commented Nov 3, 2016

Yes, the app is self-contained and published as such. I'll repro myself one more time in a few hours and then put up a repro project and signal you back here.

@kierenj

This comment has been minimized.

Show comment
Hide comment
@kierenj

kierenj Nov 3, 2016

(In case you are referring to my original issue - I'll try without the preview1-* shortly and report back)

kierenj commented Nov 3, 2016

(In case you are referring to my original issue - I'll try without the preview1-* shortly and report back)

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

@gkhanna79 @schellap

It's up now at https://github.com/GuardRex/CLI_Issue_4599

If the metapackage folder is present at C:\Program Files\dotnet\shared\Microsoft.NETCore.App ...

capture

... it's all good. If I just drag that version folder out, I get the ...

The specified framework 'Microsoft.NETCore.App', version '1.1.0-preview1-001100-00' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.0
      1.0.1
  - Alternatively, install the framework version '1.1.0-preview1-001100-00'.

... message.

[EDIT] The problem for me was a publish (not a run) with ...

dotnet publish --configuration Release --runtime win10-x64

... I wasn't trying to run the project locally.

I think this is just going to turn out to be a misunderstanding on my part about the local requirement for Microsoft.NETCore.App vis-a-vis the tooling.

What I originally attempted to do was use 1.0 (or 1.0.x) tooling while upgrading the project to 1.1.0 thinking that I could just drop in a dep for "Microsoft.NETCore.App": "1.1.0-preview1-001100-00" and go.

Contributor

guardrex commented Nov 3, 2016

@gkhanna79 @schellap

It's up now at https://github.com/GuardRex/CLI_Issue_4599

If the metapackage folder is present at C:\Program Files\dotnet\shared\Microsoft.NETCore.App ...

capture

... it's all good. If I just drag that version folder out, I get the ...

The specified framework 'Microsoft.NETCore.App', version '1.1.0-preview1-001100-00' was not found.
  - Check application dependencies and target a framework version installed at:
      C:\Program Files\dotnet\shared\Microsoft.NETCore.App
  - The following versions are installed:
      1.0.0
      1.0.1
  - Alternatively, install the framework version '1.1.0-preview1-001100-00'.

... message.

[EDIT] The problem for me was a publish (not a run) with ...

dotnet publish --configuration Release --runtime win10-x64

... I wasn't trying to run the project locally.

I think this is just going to turn out to be a misunderstanding on my part about the local requirement for Microsoft.NETCore.App vis-a-vis the tooling.

What I originally attempted to do was use 1.0 (or 1.0.x) tooling while upgrading the project to 1.1.0 thinking that I could just drop in a dep for "Microsoft.NETCore.App": "1.1.0-preview1-001100-00" and go.

@livarcocc

This comment has been minimized.

Show comment
Hide comment
@livarcocc

livarcocc Nov 3, 2016

Member

Yeah, you need to have the runtime installed in the box in order to be able to run your project.

Member

livarcocc commented Nov 3, 2016

Yeah, you need to have the runtime installed in the box in order to be able to run your project.

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

@livarcocc ok, cool 👍 ... I just didn't "get it" on that one, but I wasn't trying to run it locally tho. I was just trying to publish it with the metapackage not having "type": "platform" on it (self-contained app), so that's why I was confused. I certainly don't mind having to have the metapackage installed locally in order for it to compile/publish correctly.

Thx for clearing it up for me. I think a few others tho will hit that and scratch their head, so perhaps its just as well it came up here.

Contributor

guardrex commented Nov 3, 2016

@livarcocc ok, cool 👍 ... I just didn't "get it" on that one, but I wasn't trying to run it locally tho. I was just trying to publish it with the metapackage not having "type": "platform" on it (self-contained app), so that's why I was confused. I certainly don't mind having to have the metapackage installed locally in order for it to compile/publish correctly.

Thx for clearing it up for me. I think a few others tho will hit that and scratch their head, so perhaps its just as well it came up here.

@livarcocc

This comment has been minimized.

Show comment
Hide comment
@livarcocc

livarcocc Nov 3, 2016

Member

@kierenj Have you had a chance to try this out without the preview1-*?

Member

livarcocc commented Nov 3, 2016

@kierenj Have you had a chance to try this out without the preview1-*?

@schellap

This comment has been minimized.

Show comment
Hide comment
@schellap

schellap Nov 3, 2016

Dup of #2454

@guardrex we spent a long thread on this one!

schellap commented Nov 3, 2016

Dup of #2454

@guardrex we spent a long thread on this one!

@guardrex

This comment has been minimized.

Show comment
Hide comment
@guardrex

guardrex Nov 3, 2016

Contributor

I didn't realize that was the case (and truly I forgot about the other one! lol 😄 )

Contributor

guardrex commented Nov 3, 2016

I didn't realize that was the case (and truly I forgot about the other one! lol 😄 )

@livarcocc

This comment has been minimized.

Show comment
Hide comment
@livarcocc

livarcocc Nov 3, 2016

Member

ok. Closing this one.

Member

livarcocc commented Nov 3, 2016

ok. Closing this one.

@livarcocc livarcocc closed this Nov 3, 2016

@kierenj

This comment has been minimized.

Show comment
Hide comment
@kierenj

kierenj Nov 4, 2016

I've tried it without the wildcard, and it works fine. Not sure it's a clean dupe of the other issue (which was to do with publish, had a different error message, etc)? - and this was kind of hijacked, but whatever, it works!

kierenj commented Nov 4, 2016

I've tried it without the wildcard, and it works fine. Not sure it's a clean dupe of the other issue (which was to do with publish, had a different error message, etc)? - and this was kind of hijacked, but whatever, it works!

@68681395

This comment has been minimized.

Show comment
Hide comment
@68681395

68681395 Dec 12, 2017

There is the same problem with my project, the workaround to resolve it successfully is that remove the item 'C:\Program Files (x86)\dotnet' from the Path of Environment Variable because I found I did not install the right netcore version under X86. I have not tried to install the proper version with x86, appreciate that you tell me if you have done that test.

68681395 commented Dec 12, 2017

There is the same problem with my project, the workaround to resolve it successfully is that remove the item 'C:\Program Files (x86)\dotnet' from the Path of Environment Variable because I found I did not install the right netcore version under X86. I have not tried to install the proper version with x86, appreciate that you tell me if you have done that test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment