Search Unity

Question .net framework 4.7.1 VS .net 6.0 of Visual Studio

Discussion in 'Windows' started by JamesW940516, Oct 15, 2023.

  1. JamesW940516

    JamesW940516

    Joined:
    May 19, 2023
    Posts:
    31
    Hello

    How are you these busy days?

    I have one stupid question.

    I was gonna make a very simple application using Visual Studio .net C# WPF. (a very simple application : line count is less than 500)

    I wanted to make this application could run on most of (not all of) Windows 10 and Windows 11.

    I needed to choose the project template and framework.

    So I googled to choose the project template.

    They said .net framework 4.7.1 is built in installed on most version of Windows 10. But some other guy said that .net framework is not supported anymore, so use .net 6.0.

    There are some other requirements.

    I want to make this application very simple.

    #1. Users don't have to install the application(I mean it's portable and ready to run)

    #2. Users don't need any dependency or extra install for this app. (sth like .net runtime)

    #3. There are not any dlls around the exe file (Hopefully, but I am using a Octokid for github interaction, so there will be at least this one.)


    So. the questions is.

    #1. What project template should I use?

    #2. Do I need to publish to run this?

    #3. Debug build or release build for final production?


    Another thing I found is :

    I saw the Visual Studio target framework version of Unity 2022.3[LTS] project is .net framework 4.7.1. This doesn't mean my Unity app will run on .net framework 4.7.1 and alove?

    I think, Unity windows standalone build runs well as I wanted on most of windows 10 and 11.

    I hope my WPF app would run like this.

    So will I choose .net framework 4.7.1 for my WPF app?

    I am very confused and I need help.

    Thank you in advance.
    upload_2023-10-14_16-33-42.png


    upload_2023-10-14_16-34-3.png
    upload_2023-10-14_16-34-11.png
    upload_2023-10-14_16-35-4.png
     
  2. CaseyHofland

    CaseyHofland

    Joined:
    Mar 18, 2016
    Posts:
    615
    Out of context it is hard to judge, but "not supported anymore" could refer to many more things than what you thought it meant. I do believe .net framework 4.7.1 comes preinstalled, but you should definitely do your own research on this because I'm just going from the top of my head.

    That said, if you create an installer you can configure it so it will check if any requirements are installed before hand. If an installer is a bit overkill you can always write some "Installation Instructions" with a "install this and this first". Here is the link for the .NET 6 runtime for example.
    https://aka.ms/dotnet/6.0/windowsdesktop-runtime-win-x64.exe

    Hope to have helped a little.
     
  3. JamesW940516

    JamesW940516

    Joined:
    May 19, 2023
    Posts:
    31
    Thank you very much for you advice