Aspnetcore.docs: Unable to find package Microsoft.AspNetCore.Blazor.Templates

Created on 27 Jan 2020  Â·  5Comments  Â·  Source: dotnet/AspNetCore.Docs

From @FANMixco on https://github.com/aspnet/AspNetCore.Docs/issues/16729 ...

It seems the Blazor version is incorrect:

Unable to find package Microsoft.AspNetCore.Blazor.Templates with version (>= 3.1.0-preview4.19579.2)


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Blazor Source - Docs.ms support-request

Most helpful comment

I think you have a NuGet feeds problem of some sort.

Try re-running the command with an explicit source for nuget.org ...

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2 --nuget-source https://api.nuget.org/v3/index.json

Indeed, your solution worked, _don't you think this could be added as a workaround or suggestion in the documentation?_ I'd say I might not be the only one who could face this issue, especially in corporate environments.

Thank you @guardrex.

All 5 comments

https://www.nuget.org/packages/Microsoft.AspNetCore.Blazor.Templates/3.1.0-preview4.19579.2

You may have a nuget.config file somewhere in the directory tree above the project that's changing the NuGet feed.

https://www.nuget.org/packages/Microsoft.AspNetCore.Blazor.Templates/3.1.0-preview4.19579.2

You may have a _nuget.config_ file somewhere in the directory tree above the project that's changing the NuGet feed.

Hi @guardrex, could you explain me? Maybe I don't understand well your viewpoint. I'm running it from the console, I'm not in any specific folder. I tried with Admin rights too.

VSCommand

Also, I followed this instructions:

Optionally install the Blazor WebAssembly template:

Install the .NET Core 3.1 or later (Preview) SDK.
Run the following command in a command shell. The Microsoft.AspNetCore.Blazor.Templates package has a preview version while Blazor WebAssembly is in preview.
.NET Core CLI

Copy
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2

From here:

https://docs.microsoft.com/en-us/aspnet/core/blazor/get-started?view=aspnetcore-3.1&tabs=visual-studio

And I have confirmed that I have the SDK 3.1 installed. Thanks.

I think you have a NuGet feeds problem of some sort.

Try re-running the command with an explicit source for nuget.org ...

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2 --nuget-source https://api.nuget.org/v3/index.json

I think you have a NuGet feeds problem of some sort.

Try re-running the command with an explicit source for nuget.org ...

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.1.0-preview4.19579.2 --nuget-source https://api.nuget.org/v3/index.json

Indeed, your solution worked, _don't you think this could be added as a workaround or suggestion in the documentation?_ I'd say I might not be the only one who could face this issue, especially in corporate environments.

Thank you @guardrex.

Very few issues (only one or two over the past year) have been opened for this scenario. Usually, developers having NuGet feed/source issues in corporate environments are aware of their circumstances, so they generally seem to know how to address it. I'll keep an :ear: open for more feedback. If devs ping on this more frequently, then yes ... I'll add something to the topic about it.

Was this page helpful?
0 / 5 - 0 ratings