Open myth384 opened 7 months ago
FYI @melytc
Thanks @drewnoakes.
@myth384, I have a couple of questions to better understand the issue:
We have implemented a change to generate the Application.myapp
file when a project is created; however, it is only utilized if the Application Framework property is activated. Is the concern that the Application.myapp
file is being employed irrespective of its state? If not, could you clarify the scenario that is impacted by the presence of this file, even when it remains unused?
Hi @melytc, Thanks for your timely response. I'm surprised this was actually a design decision, as lot of the changes I encountered during the migration of .NET Framework projects brought simplification to project metadata, removing a lot of redundancy. Adding unused data to a project feels counter intuitive in that regard. The presence of the file is also confusing for developers coming from .NET Framework, as the file indicates the project is using the VB Application Framework. The behaviour for class libraries is especially odd, which start off without the file, to later find out the file is generated somehow. I just wanted to share my view of my experiences I made during migrations, in an effort to improve project data even more. Our projects will be converted to C# anyway this year, so it's not a big issue for us at all.
@melytc
We have implemented a change to generate the
Application.myapp
file when a project is created; however, it is only utilized if the Application Framework property is activated.
The last few days I noticed (re)generation of this Application.myapp
file in existing class library projects (<OutputType>Library</OutputType>
) also utilizing WinForms functionality (<UseWindowsForms>true</UseWindowsForms>
), targeting .NET 8. I cannot determine which aspects and factors are actually influencing this file generation behavior, or in which precise version of Visual Studio this file generation behavior was introduced.
Is the concern that the
Application.myapp
file is being employed irrespective of its state? If not, could you clarify the scenario that is impacted by the presence of this file, even when it remains unused?
Perhaps I am mistaken, but I get the impression that you try to defend the useless generation of this file as long as it would not impact the behavior. I would disagree with that point of view. The scenario itself that an unnecessary file is being generated is rather confusing and annoying. Generating files with useless content will eventually lead to code bloat, especially if everybody would start making changes in Visual Studio that would generate useless content.
Currently, I have to manually delete this file from time to time. Not nice. :-(
But I would certainly agree that it would be much better (and wiser) to start migrating my codebase to C#. Or Java/Scala/Kotlin. ;-)
Visual Studio Version
17.9.6
Summary
After migrating several VB.NET projects from .NET 4.8 to .NET 8
Application.myapp
files are getting generated which were previously absent in the solution. We are experiencing this behavior for both Forms Application as Forms Class Library projects. The Visual Basic Application Framework is disabled in both .NET 4.8 and .NET 8. After deleting the files, they will get regenerated as soon as the Project Property Editor is opened. The same behavior can be observed for WPF projects.Steps to Reproduce
Application.myapp
after the property editor has openedApplication.myapp
already exists)Application.myapp
Application.myapp
Expected Behavior
Application.myapp
should not be created when Visual Basic Application Framework is disabled in any case. Additionally, I doubt the Application Framework option should be available outside of Forms or WPF Application projects.Actual Behavior
Application.myapp
is generated regardless of the status of the Visual Basic Application Framework checkbox.User Impact
I won't sleep tonight... :-(