dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.47k stars 10.03k forks source link

Can't add new Identity Scaffolded item to project #25898

Closed abbasghomi closed 4 years ago

abbasghomi commented 4 years ago

Describe the bug

I cannot add new Identity Scaffolded item in Asp .Net 5 RC1 MVC Project

To Reproduce

1- Open visual studio preview edition last update 2- Create new Asp .Net Core (.Net 5 Rc1) MVC project 3- In solution explorer right click on the project name 4- Got to Add-> New Scaffolded Item 5- Choose Identity and click on add button 6- choose what ever you want and go through process but at the end it will show the error message

Exceptions (if any)

It can be seen in the image below

image

Further technical details

mkArtakMSFT commented 4 years ago

Thanks for contacting us. @HaoK can you get details about what is going wrong here or should this go to the scaffolding folks in VS?

HaoK commented 4 years ago

@deepchoudhery @vijayrkn do you have any ideas what could be causing this?

vijayrkn commented 4 years ago

@HaoK - Looks like we need to update the scaffolding dependency to the latest version. We got another report of this as well. @deepchoudhery - Can you please take care of this.

abbasghomi commented 4 years ago

Sorry that I'm responding after 6 days, What info I can provide? It happened in the Visual studio but it is because of the Scaffolding dependency @mkArtakMSFT

I had this problem with preview 8 and it is still happening in RC1 I did add info to reproduce it @HaoK

deepchoudhery commented 4 years ago

@xocodedev What VS version are you using?

abbasghomi commented 4 years ago

Visual Studio 2019 Preview edition

abbasghomi commented 4 years ago

It seems the issue is resolved in the last Visual Studio update. Thank you for your accompanying me in this matter

ilyanaDev commented 4 years ago

What's the workaround for this in the Console? I'm getting:

error NU1603: Microsoft.VisualStudio.Web.CodeGeneration 5.0.0-rc.1.20453.2 depends on Microsoft.Extensions.DependencyInjection (>= 5.0.0-rc.1.20451.2) but Microsoft.Extensions.DependencyInjection 5.0.0-rc.1.20451.2 was not found. An approximate best match of Microsoft.Extensions.DependencyInjection 5.0.0-rc.1.20451.14 was resolved.

Here's my project file:

    <ItemGroup>
        <PackageReference Include="Ardalis.ListStartupServices" Version="1.1.3" />
        <PackageReference Include="Autofac" Version="5.2.0" />
        <PackageReference Include="Autofac.Extensions.DependencyInjection" Version="6.0.0" />
        <PackageReference Include="Dapper" Version="2.0.35" />
        <PackageReference Include="MediatR" Version="8.1.0" />
        <PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="8.1.0" />
        <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.AspNetCore.Identity.UI" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Microsoft.Web.LibraryManager.Build" Version="2.0.96" />
        <!-- Added to fix this: https://github.com/aspnet/Scaffolding/issues/834 -->
        <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.7.0" />
        <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
        <PackageReference Include="Sendgrid" Version="9.12.6" />
        <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0-rc.1.*" />
        <PackageReference Include="Swashbuckle.AspNetCore" Version="5.0.0" />
        <PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="5.0.0" />
        <PackageReference Include="TagHelperSamples.Authorization" Version="3.0.56" />
        <PackageReference Include="Westwind.AspNetCore.Markdown" Version="3.2.4" />
        <PackageReference Include="WindowsAzure.Storage" Version="9.3.3" />

    </ItemGroup>

Thanks!