1

I have visual studio 2017 and .net core 2.1 but still not able to make it run.

While I am creating project I got this error Microsoft.AspNetCore.Blazor.Cli 0.5.1 is not compatible with netcoreapp2.0

enter image description here

Check the below Available .net core SDKs and Runtimes are

enter image description here

2
  • The error suggests that you're targeting .NET Core 2.0 instead of .NET Core 2.1 as you claim. Have a look at your .csproj file's TargetFramework element. Commented Aug 30, 2018 at 10:22
  • I have created my project in .net core 2.1 only Commented Aug 30, 2018 at 11:13

1 Answer 1

1

As of version 0.5.0 the CLI package targets .NET Core 2.1 rather than .NET Core 2.0. You will have to update the <TargetFramework> element in your csproj file to netcoreapp2.1 if you want to use this pacakge.

I wonder though, why would you take a dependency on this package? It is a global tool. You should probably include packages like Microsoft.AspNetCore.Blazor.Build, Microsoft.AspNetCore.Blazor.Browser, etc.

Sign up to request clarification or add additional context in comments.

3 Comments

I have tried this too but getting different error now.. The current .NET SDK does not support targeting .NET Standard 2.1. Either target .NET Standard 2.0 or lower, or use a version of the .NET SDK that supports .NET Standard 2.1. I have installed 2.1.4 version but still same problem.
please check attached new screenshot on top.
@vijaysahu you should either target netcoreapp2.1 or netstandard2.0. Please note that .NET Core is on version 2.1 and .NET Standard is on 2.0.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.