You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature-Project-File-SimplificationRelated to cleaning up and simplification of the project format.Feature-WinFormsFeatures related to bringing up the Windows Forms designer and related features.Parity-Legacy-FeatureMissing features from the legacy project system.Parity-XProjMissing features from xproj/project.json project system from Visual Studio 2015.
C# and VB have a registration API for automatically registering dependency relationship between files so that they are automatically parented underneath and hidden in some cases.
For example, in VB, Foo.Designer.cs and Foo.resx is automatically grouped under Foo.cs, and both are hidden by default.
We should implement similar support - but I'd like to see an MSBuild equivalent of this - not via the registry as it is today:
See: CVbPackage::InitializeRelatedFiles and CCSharpPackage::InitializeRelatedFiles internally.
We should make sure that we have sensible defaults that do not require DependantUpon metadata item to be written to the project file.
Reacted by Mike-E, Asbjørn Ulsberg, Pablo Montilla, Brendan Enrick, Diego Vega, Kristian Hellang, Yuriy Ostapenko and Daniel Chalmers
Today in VB if you add an existing form, the related don't always get copied and if you use the OS to copy all the files you have to restart Visual Studio for the nesting to happen. It would be nice if these were cleaned up as part of the change.
I've experienced cases where related files like these aren't automatically grouped unless you hand edit the .csproj file and add some MSBuild voodoo. What and where, I don't remember. I just mention it as another argument for doing something about this grouping, which I agree is a nice feature. 😃
People seem to want this feature turned off too, so a flexible way to configure which files are nested by which pattern and the ability to turn this on and off on a per-file basis (without writing megabytes of XML) would be neat.
@lifengl added support for this in CPS, but we need to opt in to a capability I think. @lifengl - can you let us know what the capability is? @drewnoakes do you want to tackle adding that?
Your project need turn on the capability "DynamicDependentFile", which enables the feature to compute file dependencies dynamically. It was turn on in web .Net Core projects, but not in a plain .Net Core projects. Note: web project has its own dynamic dependencies rule applied, The code to read registry for file dependencies is only added in the next version of CPS. (BTW, I think maybe ML team is the right team to own this logic, since it is only turned on for .Net Core projects. Let me know if you agree, and want to move that piece of code to the ML project system codebase.)
BTW, the logic to use project registry for file dependencies is turned on for .Net Core project, with or without the capability. Without the capability, the dependency is only computed for new files, and persisted into the project file like the old project system. With the capability, it will not persisted, but dynamically computed.
@davkean from this old comment #159 (comment)
Is this still the case? It appears so to me - I'm using VS2019 and VS2022 preview 3 on a Microsoft.NET.Sdk.Worker console app and not getting appsettings.json nesting. This issue is closed but is there one open specific for non-ASPNET projects?
File nesting is definitely not working for me either in 2019 or 2022 p3. I have both .core 3.1, .net5 and 6 projects and non of then apply nesting outside of the web project.
Feature-Project-File-SimplificationRelated to cleaning up and simplification of the project format.Feature-WinFormsFeatures related to bringing up the Windows Forms designer and related features.Parity-Legacy-FeatureMissing features from the legacy project system.Parity-XProjMissing features from xproj/project.json project system from Visual Studio 2015.
Activity
paul1956 commentedon May 17, 2016
Today in VB if you add an existing form, the related don't always get copied and if you use the OS to copy all the files you have to restart Visual Studio for the nesting to happen. It would be nice if these were cleaned up as part of the change.
davkean commentedon May 17, 2016
👍
davkean commentedon May 25, 2016
Wonder if a hybrid approach of using project.json's heuristics + flags to hide nested types for the VB cases might be enough.
asbjornu commentedon May 25, 2016
I've experienced cases where related files like these aren't automatically grouped unless you hand edit the
.csprojfile and add some MSBuild voodoo. What and where, I don't remember. I just mention it as another argument for doing something about this grouping, which I agree is a nice feature. 😃davkean commentedon May 26, 2016
Also see: https://visualstudio.uservoice.com/forums/121579-visual-studio-2015/suggestions/4280193-identify-and-nest-dependent-files-in-solution-expl
asbjornu commentedon May 26, 2016
People seem to want this feature turned off too, so a flexible way to configure which files are nested by which pattern and the ability to turn this on and off on a per-file basis (without writing megabytes of XML) would be neat.
63 remaining items
Pilchie commentedon Sep 14, 2018
@lifengl added support for this in CPS, but we need to opt in to a capability I think. @lifengl - can you let us know what the capability is? @drewnoakes do you want to tackle adding that?
drewnoakes commentedon Sep 14, 2018
@Pilchie for sure. I'll take a look on Monday. @lifengl anything you can tell me about CPS support for this would be appreciated.
lifengl commentedon Sep 17, 2018
Your project need turn on the capability "DynamicDependentFile", which enables the feature to compute file dependencies dynamically. It was turn on in web .Net Core projects, but not in a plain .Net Core projects. Note: web project has its own dynamic dependencies rule applied, The code to read registry for file dependencies is only added in the next version of CPS. (BTW, I think maybe ML team is the right team to own this logic, since it is only turned on for .Net Core projects. Let me know if you agree, and want to move that piece of code to the ML project system codebase.)
lifengl commentedon Sep 17, 2018
BTW, the logic to use project registry for file dependencies is turned on for .Net Core project, with or without the capability. Without the capability, the dependency is only computed for new files, and persisted into the project file like the old project system. With the capability, it will not persisted, but dynamically computed.
drewnoakes commentedon Sep 17, 2018
Related: https://github.com/Microsoft/VSProjectSystem/blob/master/doc/extensibility/automatic_DependentUpon_wireup.md
drewnoakes commentedon Jan 4, 2019
This was fixed in #4376.
Update dependencies from https://github.com/dotnet/arcade build 20190…
dferretti commentedon Aug 25, 2021
@davkean from this old comment #159 (comment)
Is this still the case? It appears so to me - I'm using VS2019 and VS2022 preview 3 on a Microsoft.NET.Sdk.Worker console app and not getting appsettings.json nesting. This issue is closed but is there one open specific for non-ASPNET projects?
Allann commentedon Aug 26, 2021
File nesting is definitely not working for me either in 2019 or 2022 p3. I have both .core 3.1, .net5 and 6 projects and non of then apply nesting outside of the web project.
drewnoakes commentedon Aug 31, 2021
@Allann for now this is behind a feature flag for non-web projects: