Thanks for your detailed question and for outlining your setup clearly. You're absolutely right to be cautious about the legacy .NET Framework dependency showing up in your .vdproj installer for a .NET 8 WinForms app.
Why the .NET Framework Dependency Appears
The Visual Studio Installer Projects extension (.vdproj) was originally designed for .NET Framework apps. Even after migrating to .NET 8, it may still include outdated launch conditions due to legacy defaults in the project template.
How to Remove the .NET Framework Launch Condition
You can manually remove the .NET Framework dependency by:
- Opening the Setup Project in Visual Studio.
- Navigating to Launch Conditions.
- Deleting the
.NET Frameworkcondition.
Alternatively, you can edit the .vdproj file directly and remove the relevant launch condition entries.
Recommended Packaging Options
While .vdproj can work, it’s not ideal for modern .NET apps. Consider switching to:
- WiX Toolset – powerful and flexible for MSI creation.
- MSIX – modern packaging with built-in support for .NET Core/.NET 8.
- Squirrel or NSIS – lightweight options for desktop deployment.
These tools offer better compatibility and control over dependencies.
Project File Cleanup
Make sure your .csproj file:
- Targets
net8.0-windows. - Doesn’t reference any
.NET Frameworkassemblies.
Also, check app.config (if present) for legacy bindings and remove them.
Let me know if the issue persists after following these steps. I’ll be happy to assist further if needed. If the issue has been resolved, please click "Accept Answer".