Why convert WAPPROJ to CSPROJ?
People land on this because both files sit side by side in a packaged desktop-app solution and look interchangeable. They are not: a .csproj defines an app's C# source, dependencies and build, while a .wapproj contains only packaging metadata (manifest, assets, dependencies) and a reference to the app project it packages. There is nothing in a .wapproj to compile into C#.
How to convert WAPPROJ to CSPROJ
Edit the C# project in Visual Studio FREE
Open the solution in Visual Studio 2022 and work in the existing .csproj for code; the .wapproj stays as the packaging wrapper that references it. Right-click the packaging project's Applications node to add the reference.
Move to single-project MSIX FREE
For a WinUI 3 / Windows App SDK app you can drop the separate .wapproj and use single-project MSIX, where packaging lives inside one .csproj with a Package.appxmanifest. Create a new Blank App, Packaged project and move your code in.
Inspect both files in a text editor FREE
Open the .wapproj and .csproj in VS Code or Notepad to see they are different MSBuild project types. This confirms there is no code to migrate, only a reference to reconnect.
About these formats
A .wapproj file is a Windows Application Packaging Project used in Visual Studio to package a desktop app (Windows Forms, WPF, or Win32) as an MSIX or APPX package for the Microsoft Store…
Open .WAPPROJ details →A CSPROJ file is a C# project file - an XML file created by Microsoft that tells the build system how to compile one C# project: which source files to include, which NuGet packages to use,…
Open .CSPROJ details →Quality & what to watch
- A
.wapprojholds no application source code, so there is nothing to "convert" into a.csproj. - The two projects are meant to coexist: the packaging project references the code project, not replace it.
- The older two-project
.wapprojmodel does not fully support the newer SDK-style.csprojformat, which is a common source of build errors.
Frequently asked questions
Can I just rename .wapproj to .csproj?
Where is my actual app code then?
.csproj (or .vcxproj) project that the .wapproj references, not in the packaging project itself.How do I get rid of the .wapproj?
.csproj.Why does adding a .wapproj break my build?
.csproj files; check the project reference and target framework.