Forum Visual Studio
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Error - Invalid value for 'TargetFrameworkVersion'.

I have just updated to the latest version of Xamarin for Visual Studio. I have opened an existing project that needs a fix.
When I tried to build the app I got the following error:-
'Error 4 Invalid value for 'TargetFrameworkVersion'. BudgetPlanner

I have looked on Google and the forums for this error and it was suggested that I remove Xamarin and re-install from the direct download link.

I have downloaded and installed v1.8.365.0.msi but still get the error.

When I go to the properties of the project I it says Target Framework = Monotouch. I also have a class lib in the solution withe the same target framework.

Thanks Ash..

Best Answer


  • I am seeing this now as well. Any help would be great.

  • Also having this issue.

  • BrendanZagaeskiBrendanZagaeski USForum Administrator, Xamarin Team Xamurai

    This error indicates a problem with the <TargetFrameworkVersion> element in the project's .csproj file. You can edit the .csproj file using a text editor.

    For Xamarin.iOS projects, you can try deleting the whole <TargetFrameworkVersion> element from the project file.

    For Xamarin.Android projects, you can ensure that the TargetFrameworkVersion matches one of your installed Android SDK versions. For example, for Android 4.3 Jelly Bean, you would see:

  • AshleyJacksonAshleyJackson GBMember ✭✭

    Thanks Bill, that has fixed my problem!! How did I miss that from the helpful error message!
    Cheers Ash...

  • MattiaDurliMattiaDurli ITMember ✭✭

    I'm using VS2013, when I go to Project->Properties->Application (of a brand new project, the starting template) and try to change any of the Android versions (target,minimum,compile) I receive an messagebox with "Exception from HRESULT 0x8000FFFF E_UNEXPECTED".
    I notice that the VS csproj is missing the v4.3, but the Xamarin Studio one has it, so I copied, but still I can't change the other two (minimum/compile).


    The application is compiled on the simulator and the device, but when you try to publish, I immediately get the message:
    Invalid value for 'TargetFrameworkVersion'.

    After that, neither the device nor the simulator I can not run the application, keep getting this message until you remove it from the project file:


    ... and so the circle. It's definitely a bug, and how to get rid of it - is not clear.

    P.S. All updates are installed.

  • YannAngladeYannAnglade FRMember

    I'm experiencing the same problem as Alexey, can we have a clue how to resolve this ?

  • Same problem and billspain's solution fixed it. Thanks so much! May have spent a long time finding that one without your post...

  • PaulRoyPaulRoy FRMember, University ✭✭

    Experiencing the same problem, even if billspain's solution fixes the build, « publish » recreates the tag in csproj / forces it to « true » and the error shows up again.

  • Same issue as Paul, he phrased it perfect " Experiencing the same problem, even if billspain's solution fixes the build, « publish » recreates the tag in csproj / forces it to « true » and the error shows up again."

    Paul ever find a solution?

  • AnitaSheffieldAnitaSheffield USMember

    Did anyone find a solution for this? I am having the same issue as Wade and Paul. I remove the lines, but "publish" recreates the tag in csproj and the error shows up again.

  • AshleyJacksonAshleyJackson GBMember ✭✭

    @AnitaSheffield - Bills answer (second one down) was the one that solved my issue

  • DmitryMoiseevDmitryMoiseev USMember ✭✭

    I don't have "GenerateManifests" at all, but have some bug. Try to add line to project-file - this is don't help...

  • DanVanderboomDanVanderboom USUniversity ✭✭
    edited May 2015

    After reverting to Xamarin Studio 5.8.3 (to get around problems caused by the 5.9 releases), I'm not seeing this problem when trying to build an Android project.

    /Users/danvanderboom/company/MyApp/MyApp.Android/MyApp.Android.csproj (Build) ->
    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_SetLatestTargetFrameworkVersion target) ->

    /Users/danvanderboom/company/MyApp/MyApp.Android/MyApp.Android.csproj: error XA0001: Unsupported or invalid $(TargetFrameworkVersion) value of 'v4.0'. Please update your Project Options.

    I can create a new Android app from scratch, and that seems to work fine when I deploy to a device for testing. But when working on a client's project, I get the above error when trying to build it. My client has no problems building the same project, and we have confirmed we're on the same version of Xamarin Studio (5.8.3).

    Why is target framework 4.0 unsupported? Every time the solution is opened, Xamarin Studio asks if we want to upgrade the target framework. (I've been told to say no every time, to avoid other problems.)

    Is there an older version of Xamarin Studio that will support target framework 4.0?

  • ShawnLee.4281ShawnLee.4281 USMember ✭✭

    Thanks Bill,
    after I set true as false, everything go well!

  • sonyjsonyj INMember

    if anybody got the solution .Please help me.i tried to set false.But when tried to publish the project valuechanged to true

  • Hi, maybe toofar but nee jist delete this:


  • JamesParker.3081JamesParker.3081 USMember

    Just started getting this. I have no idea why. I'm running Visual Studio 2015. None of the values stated in this thread are located in my .csproj file in the iOS Project. First Xamarin project and probably my last. This is awful, dead in the water at this point and from what I can tell I didn't even do anything. It was building fine 1hr ago on all devices. Now I can't get it to work on the iOS Simulator or my Phone.

  • TamilSelvanRTamilSelvanR USMember ✭✭

    Thanks @billspain, That's fixes my issue.

    I got this issue when I tried to publish my iOS project from VS2015 with Mac build server. After that I can't run my iOS project to simulator and device.

    As @billspain said I changed that property into false. That fixed my issue.

    Hope It will be helpful to someone.

  • HGiritzerHGiritzer ATMember ✭✭

    @TamilSelvanR - very same setup here, same issue, same solution as suggested by @billspain.
    Thank you so much!

  • dpedrinhadpedrinha DEMember ✭✭✭
    edited June 2016

    None of the solutions worked for me. Changing GenerateManifest to false, deleting it at all or deleting the <TargetFrameworkVersion> tag. For the first two solutions, it gets back as soon as I Publish. For the 3rd solution, the project stops "existing" on my solution and I have to right click on it and "install missing features". Once I do it, the tag is back.

Sign In or Register to comment.