dotnet / dotnet/Scaffolding

Microsoft.VisualStudio.Web.CodeGeneration.Design package should not be deployed

Open
#2,504 1 comment 5 reactions 0 assignees View on GitHub
area-scaffolding customer-reported type-enhancement
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

When I scaffold an **API Controller with actions, using Entity Framework**:

![image](https://github.com/dotnet/Scaffolding/assets/88981/924eaba4-2a44-4c85-8e70-bc89eddebaf4)

I will get two packages installed which is equivalent with the following commands:

```sh
dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design
dotnet add package Microsoft.EntityFrameworkCore.Tools
```

In the csproj file, you will see this:

```xml


all
runtime; build; native; contentfiles; analyzers; buildtransitive

```

I think [Microsoft.VisualStudio.Web.CodeGeneration.Design](https://www.nuget.org/packages/Microsoft.VisualStudio.Web.CodeGeneration.Design/) package should only be used by design-time and shouldn't be published with the app. Is it possible install `Microsoft.VisualStudio.Web.CodeGeneration.Design` NuGet package with a `all` definition by default?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.