you need to specify the version:
pm> NuGet\Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 6.0.11
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design
renders following error message:
PM> install-package microsoft.VisualStudio.Web.CodeGeneration.Design
Restoring packages for C:\Users\User1\Desktop\Authentication\WebApplication1\WebApplication1\WebApplication1.csproj...
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/index.json
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/index.json 89ms
GET https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/7.0.3/microsoft.visualstudio.web.codegeneration.design.7.0.3.nupkg
OK https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.web.codegeneration.design/7.0.3/microsoft.visualstudio.web.codegeneration.design.7.0.3.nupkg 57ms
Installed Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.3 from https://api.nuget.org/v3/index.json with content hash xiXuMTZFwZ0efmfUCbK4bABMip+bENVS6B7vgkGd7wNeOg8+p7b0b2vt8YZIMTyQvlH7Qo+HzNhZRHsLNvlILw==.
install-package : NU1202: Package Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.3 is not
compatible with net6.0 (.NETCoreApp,Version=v6.0). Package
Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.3 supports: net7.0
(.NETCoreApp,Version=v7.0)
At line:1 char:1
+ install-package microsoft.VisualStudio.Web.CodeGeneration.Design
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCm
dlets.InstallPackageCommand
install-package : Package restore failed. Rolling back package changes for 'WebApplication1'.
At line:1 char:1
+ install-package microsoft.VisualStudio.Web.CodeGeneration.Design
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCm
dlets.InstallPackageCommand
Time Elapsed: 00:00:01.7330233
PM>
The tutorial is suppose to be for .net core 6.0 / the error message indicates there is a version discrepency...it wants to install for 7.0 (which I'm not running).
Any help appreciated.
you need to specify the version:
pm> NuGet\Install-Package Microsoft.VisualStudio.Web.CodeGeneration.Design -Version 6.0.11
(extra post to make my previous display)