Setup Project (.vdproj) shows .NET Framework dependency in .NET 8 WinForms app.

Aman Agrahari 140 Reputation points
2025-09-29T07:10:53.7933333+00:00

Hello,

I have migrated my WinForms application from .NET Framework 4.7.2 to .NET 8 (Windows Forms, framework-dependent deployment). The application builds and runs fine after migration.

To create an installer, I am using Visual Studio Installer Projects 2022 extension (which generates a .vdproj file). Firstly, I have published the main (which is the last project according to build order of application) project of my windows form application with this way (https://free.blessedness.top/en-us/visualstudio/deployment/installer-projects-net-core?view=vs-2022). Then followed the Microsoft documentation to create setup (https://free.blessedness.top/en-us/previous-versions/visualstudio/visual-studio-2010/k3bb4tfd(v=vs.100). The setup is created successfully, but in the Requirement on Target Machine -> Launch Conditions, it still shows:

  • .NET Framework (e.g., 4.7.2)
  • .NET Core / .NET Runtime

May be this cause problems during installation on a test machine, because the MSI seems to expect both .NET Framework and .NET 8 runtime, while my application only needs .NET 8 Desktop Runtime.

My questions:

Why does .vdproj still add a .NET Framework dependency after migration to .NET 8?

Is there a way to remove the old .NET Framework launch condition and only require .NET 8 Desktop Runtime?

What is the recommended way to package a .NET 8 WinForms app with MSI (keep using .vdproj, or move to MSIX / WiX / other tooling)?

Do I need to change anything in the .csproj or app.config files to stop referencing .NET Framework 4.7.2?

Environment:

  • Visual Studio 2022 (latest)
  • Windows 10 x64
  • Visual Studio Installer Projects extension
  • Application: WinForms .NET 8, framework-dependent deployment

Any guidance or best practices for setup creation in .NET 8 would be appreciated.

Thanks in advance!

Developer technologies | .NET | .NET Runtime
0 comments No comments
{count} votes

Answer accepted by question author
  1. Gade Harika (INFOSYS LIMITED) 1,185 Reputation points Microsoft External Staff
    2025-09-29T08:03:41.29+00:00

    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:

    1. Opening the Setup Project in Visual Studio.
    2. Navigating to Launch Conditions.
    3. Deleting the .NET Framework condition.

    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 Framework assemblies.

    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".


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.