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

Version for package `Microsoft.AspNetCore.Blazor.Cli` could not be resolved after installing VS2019 Preview #1755

Closed
mynkow opened this Issue Dec 7, 2018 · 10 comments

Comments

Projects
None yet
4 participants
@mynkow
Copy link

mynkow commented Dec 7, 2018

Today I have installed VS2019 Preview and when I tried to run my Blazor App using VS2017 the log under ASP.NET Core Web Server says => Version for package 'Microsoft.AspNetCore.Blazor.Cli' could not be resolved.

Can I do do anything to make the Blazor app working again?

EDIT:
Unistalling VS2019 did not help.

Recently I have updated to VS 15.9.3

File => New Project => Blazor template produces the same error

Reinstalling the ASP.NET Core Blazor Language Services did not help.

@mynkow

This comment has been minimized.

Copy link

mynkow commented Dec 7, 2018

This is my current dotnet sdk list

C:\Users\mynkow>dotnet --list-sdks
1.0.0 [C:\Program Files\dotnet\sdk]
1.0.3 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
1.1.0-preview1-005098 [C:\Program Files\dotnet\sdk]
1.1.0 [C:\Program Files\dotnet\sdk]
2.0.0-preview1-005977 [C:\Program Files\dotnet\sdk]
2.0.0-preview2-006497 [C:\Program Files\dotnet\sdk]
2.0.0 [C:\Program Files\dotnet\sdk]
2.0.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.105 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
2.1.402 [C:\Program Files\dotnet\sdk]
2.1.403 [C:\Program Files\dotnet\sdk]
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.600-preview-009426 [C:\Program Files\dotnet\sdk]
2.2.200-preview-009648 [C:\Program Files\dotnet\sdk]

Creating a global.json made the project working again:

{
  "sdk": {
    "version": "2.1.500"
  }
}
@mkArtakMSFT

This comment has been minimized.

Copy link

mkArtakMSFT commented Dec 7, 2018

Thanks for contacting us, @mynkow.
We could reproduce the issue you're describing.

@mkArtakMSFT

This comment has been minimized.

Copy link

mkArtakMSFT commented Dec 7, 2018

We'll update this thread when we'll know how to work around this problem.

@mkArtakMSFT mkArtakMSFT added this to the 0.8.0 milestone Dec 7, 2018

@mkArtakMSFT

This comment has been minimized.

Copy link

mkArtakMSFT commented Dec 7, 2018

@SteveSandersonMS, can you please look into this? Thanks!

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Dec 7, 2018

I was able to reproduce this on my machine. I have both .NET Core 2.2 and 3.0 Preview 1 installed. If I try to use 3.0 Preview 1 I see this error. If I use global.json to pin to 2.2 then the error goes away.

@mynkow mynkow changed the title Version for package `Microsoft.AspNetCore.Blazor.Cli` could not be resolved. Version for package `Microsoft.AspNetCore.Blazor.Cli` could not be resolved after installing VS2019 Preview Dec 7, 2018

@SteveSandersonMS

This comment has been minimized.

Copy link
Member

SteveSandersonMS commented Dec 11, 2018

I'm afraid I've been unable to repro the issue described. What I tried:

  • Installed VS2019 preview, which implicitly installs the dotnet 2.1.600-preview-009426 SDK
    • ... then tried running Blazor apps from the command line under both the regular 2.1 SDK and the 2.1.600-preview-009426 SDK that comes with VS2019 pre 1. Both worked.
    • ... then tried running Blazor apps from VS2017, using both the regular 2.1 SDK and the 2.1.600-preview-009426 SDK that comes with VS2019 pre 1. Both worked.
  • Installed the 3.0 preview 1 SDK (3.0.100-preview-009812)
    • ... then tried running Blazor apps from the command line using the 3.0.100-preview-009812 SDK. Worked.
    • ... then tried running Blazor apps from VS2017 using the supported 2.1 SDK and the 2.1.600-preview-009426 SDK that comes with VS2019 pre 1. Both still worked.
    • ... then tried running Blazor apps from VS2017 using the 3.0.100-preview-009812 SDK. This does not work (VS refuses to open the project, saying "Expected imports are missing"). But this is completely unrelated to Blazor. VS2017 can't create/open any .NET Core projects with the 3.0 preview SDKs, which I understand is expected since VS2017 doesn't recognize that the 3.0 SDKs even exist. The 3.0 preview release notes say you must use it with VS2019.

So to investigate this any further I'd need more details about how to reproduce it. Just installing VS2019 preview isn't enough.

Assigning to @danroth27 for more repro details.

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Dec 12, 2018

Ugh, I also can no longer reproduce this.

@mynkow Where did you get SDK 2.2.200-preview-009648 from?

@mynkow

This comment has been minimized.

Copy link

mynkow commented Dec 12, 2018

@danroth27 I guess that SDK 2.2.200-preview-009648 was installed as part of VS2019 because I did not have it before that. Is there any way to check this?

Here is a screenshot of the selected Workloads where everything is default except Development time IIS support => https://gyazo.com/8387f5be27e608490d695beaac0da8a2

@danroth27

This comment has been minimized.

Copy link
Member

danroth27 commented Dec 13, 2018

Yeah, it looks like SDK 2.2.200-preview-009648 is installed by VS 2019 when you select the option to install .NET Core 2.2 in the workload options (although it's strange that the 2.2 option is unchecked in your screenshot).

But even after installing 2.2.200-preview-009648 through VS2019, I still can't reproduce this issue any more. New Blazor projects run cleanly for me.

Can you confirm that restoring NuGet packages for the Blazor project succeeds?

@mynkow

This comment has been minimized.

Copy link

mynkow commented Dec 13, 2018

Hmm, I am also not able to reproduce it anymore BUT I have installed netcore 2.2 since that moment. Packages are restored properly.

I am closing this and I hope we never get back to this issue.

Thank you all

@mynkow mynkow closed this Dec 13, 2018

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