locked
TargetFrameworkVersion keeps automatically changing RRS feed

  • Question

  • User158279 posted

    Working on a Xamarin Forms solution and in the Droid Project every time I set <TargetFrameworkVersion>v6.0</TargetFrameworkVersion> in the Project file Visual Studio immediately updates it to <TargetFrameworkVersion>v7.0</TargetFrameworkVersion> How do I disable this. Its causing hell with source control. I cant Undo switch branches or anything because as soon as I get any branch open Visual studio again updates the proj file. I have no desire to commit this change but can barely function unless I do.

    Note: These are often branches I'm merely reviewing. They are not branches I wish to make ANY change to but as soon as I open the project Visual Studio\Xamarin decides to stage the change and requires that I commit the change before it will let me move on to reviewing the next branch.

    Monday, October 3, 2016 6:02 PM

Answers

  • User37696 posted

    @DavidStrickland0,

    Thanks for bringing this to our attention. I was able to reproduce the same thing and I filed a bug here: https://bugzilla.xamarin.com/show_bug.cgi?id=45073

    I did notice that if you change the value via the Properties menu it will save. That might be a workaround for you in the meantime.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, October 5, 2016 6:08 PM

All replies

  • User180523 posted

    Are you hard coding it in the manifest.xml? Or are you setting it in the project properties view of Visual Studio? Sounds like you might be trying to change it "behind the back" of Visual Studio, which then does it job by saving the last value it was told about when you hit 'Save'

    Monday, October 3, 2016 6:42 PM
  • User158279 posted

    Im just downloading a project from source control and opening it and poof there is a change staged for the proj file. Undo the change and poof its changed back. Manually undo the change and save and poof it changes back. Close the solution undo the changes at the Folder level reopen the solution and... you guessed it ... poof its changed again.

    Tuesday, October 4, 2016 1:29 AM
  • User6371 posted

    FWIW, the same thing is happening for me. Weird. I haven't figured out yet what is going on.

    Tuesday, October 4, 2016 3:43 PM
  • User37696 posted

    @DavidStrickland0,

    Thanks for bringing this to our attention. I was able to reproduce the same thing and I filed a bug here: https://bugzilla.xamarin.com/show_bug.cgi?id=45073

    I did notice that if you change the value via the Properties menu it will save. That might be a workaround for you in the meantime.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, October 5, 2016 6:08 PM
  • User101424 posted

    It's because you have the latest SDK's installed Android 7.0 (Nougat) and by default most projects use Compule Using Android version: Use Latest Platform.

    If you don't want that, set it to Android 6.0 manually, which is I think John suggests as well.

    Friday, October 21, 2016 8:36 AM
  • User158279 posted

    Still would require a change to code that shouldn't change. Probably best to read up and respond over on the bug thread though if you have an opinion on this issue. https://bugzilla.xamarin.com/show_bug.cgi?id=45073

    Saturday, October 22, 2016 12:59 PM
  • User158279 posted

    @JohnMiller

    Looks like @benjaminbeckley has decided this is "Answered".. Not exactly sure how or who answered it but the tickets closed.

    Fixed it with 7.0 and now getting the privilege of going through and fixing it for 7.1. So I Thought I'd check on the status.

    Reopened this here https://bugzilla.xamarin.com/show_bug.cgi?id=53270

    Sunday, March 12, 2017 9:10 PM