Che cos'è il formato di file WAPPROJ?
Un file .wapproj è un Windows Application Packaging Project, un tipo di progetto Visual Studio introdotto da Microsoft nel 2017. Il suo compito è quello di «avvolgere» un'app desktop esistente (Windows Forms, WPF o Win32 classico) in modo che possa essere compilata in un pacchetto .msix. Questo fa parte del Desktop Bridge, che consente a un programma Win32 tradizionale di essere pacchettizzato e distribuito come una moderna app Windows.
Il file è in formato XML semplice secondo lo schema MSBuild. Non contiene codice applicativo proprio. Invece, importa i target di compilazione del Desktop Bridge e fa riferimento a tre elementi: il progetto dell'app desktop, il file Package.appxmanifest che descrive il pacchetto e gli asset visivi conservati in una cartella Images. Si aggiunge il progetto di packaging a una soluzione, si punta un riferimento di progetto all'app che si desidera pacchettizzare e si contrassegna un eseguibile come punto di ingresso quando ne sono inclusi diversi.
Sicurezza e incolumità
RISCHIO: LOWA .wapproj is a plain-text XML MSBuild project. It contains no executable code of its own, though like any MSBuild file it can define build targets and pre/post-build commands, so only build projects from sources you trust. The file is harmless to open and read in a text editor.
Dettagli del formato
in sintesiProgrammi che aprono file WAPPROJ
.wapproj loads as a Windows Application Packaging Project where you can edit the manifest, add references, and run the Create App Packages wizard. msbuild YourProject.wapproj /p:UapAppxPackageBuildMode=SideLoadOnly /p:AppxBundle=Never, with the UWP build tools and Windows SDK components installed. .wapproj as plain XML to inspect or hand-edit the MSBuild properties, imports, and project references. Dettagli tecnici
specifiche approfondite| Encoding | UTF-8 text |
| Byte order | N/A (text file) |
| Container | MSBuild XML project |
| Typical size | 2-20 KB |
| Structure | An MSBuild project file whose root <Project> element imports the Desktop Bridge / Windows Application Packaging targets and props (for example Microsoft.DesktopBridge.props and Microsoft.DesktopBridge.targets). It declares a <ProjectGuid>, <TargetPlatformVersion> and <TargetPlatformMinVersion>, references the packaged desktop app(s) as <ProjectReference> items, and lists the Package.appxmanifest and the visual assets in the Images folder. Building it produces an MSIX/APPX package or bundle. |
| Integrity | None built into the project file; the produced MSIX/APPX package is digitally signed. |
| Platforms | Windows 10 (1607+), Windows 11 |
| Notes | The .wapproj itself contains no application code. It sits inside a Visual Studio solution (.sln) alongside the desktop app project (.csproj or .vcxproj), and its only job is to configure and generate a deployable package. Requires the desktop app to target Windows 10 Anniversary Update (10.0; Build 14393) or later. Can bundle multiple executables into one package, with one marked as the entry point. |
| Rilasciato | 2017 |
| Specifica | learn.microsoft.com |
Conversioni WAPPROJ
Domande e risposte della community
chiesto dagli utentiAncora nessuna domanda - sii il primo a chiedere informazioni sui file WAPPROJ.
Domande frequenti
Come si apre un file .wapproj?
.sln) che lo contiene in Visual Studio 2017 15.5 o versioni successive. Il progetto di packaging si caricherà automaticamente. Puoi anche aprire il file in qualsiasi editor di testo per visualizzarne l'XML.Perché non vedo il template Windows Application Packaging Project?
Posso compilare un .wapproj senza aprire Visual Studio?
msbuild dal Developer Command Prompt o dai Visual Studio Build Tools, passando proprietà come /p:UapAppxPackageBuildMode e /p:AppxBundle. È comunque necessario che gli strumenti di compilazione UWP e il Windows SDK siano installati.Cosa contiene effettivamente un file .wapproj?
Package.appxmanifest e agli asset visivi. Non contiene codice applicativo.Ho ancora bisogno di un .wapproj per le app WinUI 3?
.csproj dell'app. Un progetto di packaging separato serve principalmente per combinare più eseguibili in un unico pacchetto.