ardalis / CleanArchitecture

Clean Architecture Solution Template: A starting point for Clean Architecture with ASP.NET Core
MIT License
16.23k stars 2.8k forks source link

Web Project: Remove unused references #761

Closed sadukie closed 5 days ago

sadukie commented 3 months ago

Running Clean Architecture template 9.1.2 with .NET 8.0.300

Saw these in the Web project. Are these still needed?

  <PackageReference Include="Microsoft.EntityFrameworkCore.Design" />
   <PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" PrivateAssets="All" />

I removed them from my project locally and am not seeing any side effects.

Emopusta commented 4 weeks ago

Hello,

First of all, if you remove Microsoft.EntityFrameworkCore.Design you won't be able to use migration or update database at the initialization of the project because it includes dotnet ef migrations ... etc. so this package necessary for database initialization operations.

In the other hand, Microsoft.VisualStudio.Web.CodeGeneration.Design seems auto added when the scaffolding operation. I am depending on this stackoverflow answer about scaffolding auto package addition. I searched inside the repo and I could not find anything about dotnet aspnet-codegenerator * except #12 pull request but it has lack of relevancy with this situation so we may delete that package.

Emopusta commented 2 weeks ago

Hello,

With this #812 Pull Request I concluded this issue. If there is no other problem relevant to this issue can you complete this issue @sadukie. Thank you.

Best Regards,

Emre Duman