Upgrading vb.net .netframework app to .net 6 missing application.xaml

Viewed 68

I'm trying to upgrade an existing Vb.net app from Netframework 4.8 to .Net 6 in VS 2022 and having all sorts of problems. Currently my most immediate issue is that I can't open the project properties page in VS. I get an error: Microsoft.VisualStudio.ProjectSystem.Query.QueryExecutionException: The file ...\Application.xaml is not part of any project in the solution so it cannot be opened. Add the file to a project and try again.

The file does not exist anywhere, nor are there any similar .xaml files as part of the project. I tried creating a new project, to see what that file is supposed to contain, but it also has no such file, and no error complaining about its absence. I've searched for some reference to application.xaml in every file I could open with notepad, without success. Can anyone tell me, either how to create the file, and what's in it, or how to get rid of any reference that is preventing the project properties page from opening?

On a perhaps related note, or maybe not, the other big problem I have is an error claiming one of my projects targets framework 4.8, and it cannot reference a .net 6 project. But I've changed the framework in the vbproj file, and can't find any specific references to framework 4.8 anywhere. Any idea where it could be hiding?

I also get the error that windows.winmd can not be referenced in .net6, but I don't know what Windows metadata could be in my program, and double clicking on the error only takes me to the line that tells the program to check for winmd errors.

1 Answers

Application.xaml is the declarative portion of your code (usually generated by Visual Studio) extending System.Windows.Application. If you create a new WPF project with .net 6, there should be an Application.xaml.

Related