dotnet / dotnet/Scaffolding

Areas scaffolded from the command line are not included in the project

Open
#964 1 comment 0 reactions 1 assignee Claimed by @deepchoudhery View on GitHub
area-scaffolding
Dominant language
C#
Stars
818
Forks
260
Avg merge
1d 8h
Merged PRs (30d)
10

Description

### Describe the bug
An area scaffolded into an existing .NET Core 2.2/3.0 project from the command line with dotnet-aspnet-codegenerator 2.2.2 successfully creates the new area but it is not included in the project.

I'm also *extremely* confused on how this is a thing with the new project format. Aren't all files and folders included by default? If I manually include the newly-added area it gets explicitly added to the csproj, which I thought was no longer how they worked?

### To Reproduce
Steps to reproduce the behavior:
1. Using this version of ASP.NET Core: 2.2 or 3.0
2. Run this code
```
dotnet aspnet-codegenerator area SomeArea
````
4. Back in Visual Studio 2019 preview 3, the newly-added folder `SomeArea` under the existing `Areas` folder (I had previously applied the identity scaffolding) is hidden unless you have 'show all items' enabled, in which case it is visible but in grey (excluded).

### Expected behavior
The newly added area should be included in the project.

### Screenshots
![image](https://user-images.githubusercontent.com/606923/52888305-dc960d00-3140-11e9-8188-923c6af9cea1.png)

![image](https://user-images.githubusercontent.com/606923/52888325-e881cf00-3140-11e9-88a0-a1ee383a842e.png)

### Additional context

```
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview-010184
Commit: c57bde4593

Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview-010184\

Host (useful for support):
Version: 3.0.0-preview-27324-5
Commit: 63a01b08e5

.NET Core SDKs installed:
2.2.104 [C:\Program Files\dotnet\sdk]
2.2.200-preview-009748 [C:\Program Files\dotnet\sdk]
2.2.200-preview-009804 [C:\Program Files\dotnet\sdk]
3.0.100-preview-010184 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27324-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview-27325-3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop
.App]

To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
```

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.