Can you deploy a .net 5 app using VS Installer project?

Shawn Eckley 101 Reputation points

Hi; I recently had to migrate a small C# WinForms app from .Net 4.6.1 (VS 2015) to .Net 5 (VS 2019) and then deploy it. There is an existing VS install project that is used to install the WinForms app. I have the app up and running in .Net 5 and i have updated the VS Install Project to VS 2019. Everything seemed to go great. I changed the files that get installed to use the newly generated ones under the new "Net5-Windows" folder that gets created when you build with .Net 5. I built the installer and attempted to do the installation on a VM. As soon as the installation is complete and i try to run the application, it pops up a dialog that tells me to install .Net 5. Question 1) During migration to .Net 5 i had all the projects setup as SDK Style. If i included the entirety of the "Net5-Windows" folder, why do i still have to install .Net 5? Question 2) i installed .Net 5 on the VM but every time i try to run my app i am still getting the pop up telling me to install .Net 5. How do you get around this?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,141 questions
0 comments No comments
{count} votes

Accepted answer
  1. Shawn Eckley 101 Reputation points

    to answer my own question...
    i was installing the application on a x64 OS so i installed the .NET 5 SDK x64 version. The application i was trying to run was x86. This configuration would not run. I wound up installing the x86 version of the .NET 5 SDK and i was finally able to get the application to run.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Jerry Cai-MSFT 991 Reputation points


    You can download .net 5.0 SDK and runtime here:

    Download .NET 5.0

    Then verify you have successfully installed the .net 5 by using

    dotnet --info

    in cmd.

    Best Regards,
    Jerry Cai

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Shawn Eckley 101 Reputation points

    Hi Jerry;
    Thanks for your reply. I didn't have the sdk install so i went ahead and installed it. I still get the same response when i try to launch the application ".Net must be installed".

    0 comments No comments