I can't change target framework [Visual Studio 2017]


  • Hi.

    I'm working with Unity, but it doesn't recognize .NET v4+, so I wanted to change the .NET target framework on my project, but I didn't managed to find it. I searched on the internet and they said that we could change it in Project -> Properties -> Application, but it does not appears on my project (it's a class library). 

    When I built my project and send my .dll to Unity, it says that it can't work with it because it's a 4.* version and not a 3.5 or less version.
    What can I do ? I even tried to create another project specifying 3.5 version, but it's still a v4 built.

    Tuesday, April 25, 2017 3:51 PM

All replies

  • Hi FlynnSP,

    I test it in my side, I could change the target framework for class library project.

    There is also another way to get it. In Visual Studio, in Solution Explorer, select your project. On the menu bar, open the Project menu and choose Unload project. This unloads the project (.vsproj) file for your project and edit your .vsproj file. In the project file, locate the entry for the target Framework version. For example, if your project is designed to use the .NET Framework 4.5, locate <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> in the <PropertyGroup >element of the <Project> element. You could change target framework here.

    When you create new project, you could change framework here:

    Best regards,


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, April 27, 2017 7:04 AM
  • This is the reason why this is a useless forum!

    Did you really tested it Joyce? Have you tried opening the project properties page while visual studio is opened via Unity?
    Have tried to change the target framework in the .csproj file?

    I guess not if this is your answer.

    The most upsetting part is that after saving the project in 2017 you cannot open it again in monodevelop to changed the target framework as suggested here:

    • Edited by Itay Gal Thursday, August 3, 2017 9:33 AM
    Thursday, August 3, 2017 9:31 AM
  • In Unity (2017.1) Goto BuildSettings -> Players Settings -> Other Settings -> configuration and choose your desired scripting runtime version.

    • Proposed as answer by Itay Gal Thursday, August 3, 2017 9:44 AM
    Thursday, August 3, 2017 9:44 AM
  • A Bit Harsh on Joyce..

    Whilst I am not using UNITY, I had a similar problem with VS 2017 and a project that was forcing me to keep at Framework 4.0. 

    After reading Joyce Yin 's post , I modified the project file and successfully set the target to 4.6.1.

    So Thankyou for your help .

    Friday, April 6, 2018 6:15 AM