dotnet / dotnet/project-system

Ignore automatic nesting for Designer files

Open
#7,105 1 comment 0 reactions 0 assignees View on GitHub
Feature-File-Nesting Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

I'm currently using the filenesting for C# projects. Everything works fine except that .Designer.cs files are automatically nested.

Background: We are having CUDA-files with the cu extensions. A process creates three additional files. Aas an example I have named my CUDA file Convolution.cu. So what is created is

```
Convolution.cu
+ Convolution.cs
+ Convolution.Designer.cs
+ Convolution.ptx
```

which is also the hierarchy I expect in the solution explorer.
I have defined my own file nesting so that I don't have to use the complex DependentUpon project entries:

```
{
"help": "https://go.microsoft.com/fwlink/?linkid=866610",
"root": true,

"dependentFileProviders": {
"add": {
"extensionToExtension": {
"add": {
".cs": [
".cu"
],
".ptx": [
".cu"
]
}
}
}
}
}
```

What I get is this:

```
Convolution.cu
+ Convolution.cs
+ Convolution.Designer.cs
+ Convolution.ptx

```

Obviously some other mechanism is already active that does the nesting.

I search a while but there is obviously not Default filenesting.json I can have a look at.
I expect that this mechanism is not done by filenesting.json but some other method?

Is there any way to remove the nesting?

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.