locked
Wrong TargetFrameworkVersion. warning XA0105. BUG RRS feed

  • Question

  • User8131 posted

    Building a class library project with

    <TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
    <AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
    

    Getting a dll with:

    [assembly: TargetFramework("MonoAndroid,Version=v7.0", FrameworkDisplayName = "Xamarin.Android v7.0 Support")]
    

    Than the compiler shows a warning XA0105. What's that? Anyway to get rid of that? Looks like a bug on your side.

    XamarinAndroidVersion=7.0.1-2
    AndroidSdkBuildTools=23.0.3
    Java=1.8.101
    
    MSBuild v14, Windows 7.
    
    Friday, October 14, 2016 10:55 AM

All replies

  • User8131 posted

    Ok. Cleaned the temp folder. Removed the

    ..\Users\me\AppData\Local\Temp\MonoAndroid,Version=v6.0.AssemblyAttributes.cs

    Works fine now. msbuild state depends on temp files. Huge.

    Sunday, October 16, 2016 12:01 PM
  • User311474 posted

    I had the similar issue resolved by following steps 1. Go to C:\Program Files (x86)\Android\android-sdk 2. run SDK Manager.exe. 3. Click on Update the Packages. (It will download necessary updates) 4. Go to Application properties 5. Set the Target Android version (6 or 7 according to the error).

    Thursday, March 23, 2017 7:08 PM
  • User315362 posted

    This may sound very usual but this is what happened with me: I was not able to update the package using using SDK manager as explained by shyju in previous answer. Some error was appearing as the output text. I have solved this by running the SDK Manager by doing "Run as Administrator"

    Thursday, April 13, 2017 11:52 AM
  • User209240 posted

    Thank you Shyju & Devansh for posting your solution(s) to this issue. I had same warning messages as Stanislav posted, and your solution(s) worked for me. Thank you all for posting!

    I was had just started a new project using the Prism Unity App (Xamarin.Forms) from the Prism Template Pack in a fresh install of Visual Studio 2017, and without touching anything else, just compiling, these warnings were coming up in the Error List.

    Sanity Tip: It took a while for that update to finish. Definitely go find something else to do while it's downloading the updates.

    Saturday, May 13, 2017 2:16 AM
  • User328992 posted

    I'm having the same issue but I'm using Visual Studio for Mac.

    What is the equivalent of the TEMP folder (\Users\me\AppData\Local\Temp) on MacOS computers that I should clean out to fix this problem?

    Wednesday, June 7, 2017 6:11 AM
  • User331367 posted
    1. Go to C:\Program Files (x86)\Android\android-sdk
    2. run SDK Manager.exe.

    --

    Run application As Administrator with right click

    -- 3. Click on Update the Packages. (It will download necessary updates) 4. Go to Application properties 5. Set the Target Android version (6 or 7 according to the error).

    Kind regards

    Monday, June 19, 2017 3:16 AM
  • User344840 posted

    @Icke said: 1. Go to C:\Program Files (x86)\Android\android-sdk 2. run SDK Manager.exe.

    --

    Run application As Administrator with right click

    -- 3. Click on Update the Packages. (It will download necessary updates) 4. Go to Application properties 5. Set the Target Android version (6 or 7 according to the error).

    Kind regards

    Hi, may I know where is the Application properties? Thanks very much.

    Sunday, August 27, 2017 10:49 AM
  • User345154 posted

    I'm using Android Studio, it does not have an SDK manager as a separate program. Where do you set the target version? I only have the SDK for 6 installed, but I still get "warning XA0105: The $(TargetFrameworkVersion) for Urho.dll (v7.1) is greater than the $(TargetFrameworkVersion) for your project (v6.0)." I did all the stuff mentioned above to no avail.

    Thursday, August 31, 2017 11:05 PM
  • User156429 posted

    @JCox said: I'm having the same issue but I'm using Visual Studio for Mac.

    What is the equivalent of the TEMP folder (\Users\me\AppData\Local\Temp) on MacOS computers that I should clean out to fix this problem?

    Did anyone ever find the solution for a Mac? I've been struggling with this issue for awhile. I can't seem to find any Mac related resources for this.

    Sunday, September 3, 2017 1:58 PM
  • User8131 posted

    @RyamWemmer

    I would do the following: switch the most verbose logging of your build tool to find the evil file in the list of the files to be compiled.

    Sunday, September 3, 2017 6:07 PM
  • User159322 posted

    Cleaned Solution... Rebuild Solution...
    That did the trick for me.

    Monday, October 16, 2017 7:18 PM
  • User355483 posted

    @RyanWemmer

    1. Right click on the Android project and Unload it.
    2. Right click again, Tools -> Edit
    3. Search for <TargetFrameworkVersion>v8.0</TargetFrameworkVersion>, and change to the Version you need.
    4. Maybe you will have to download some SDK, press ok for that.
    5. Right click again on the project, Reload, press ok, and then should work.
    Tuesday, November 14, 2017 8:26 AM
  • User355083 posted

    @JCox said: I'm having the same issue but I'm using Visual Studio for Mac.

    What is the equivalent of the TEMP folder (\Users\me\AppData\Local\Temp) on MacOS computers that I should clean out to fix this problem?

    Open Terminal , and then Type "open /tmp". without Quotation marks

    Wednesday, May 9, 2018 6:12 PM
  • User319680 posted

    Adrian, how and where do you get "change to the version you need"? I keep looking and for the life of me, trying all versions in iOS I can think of, where is this version?

    Wednesday, August 8, 2018 8:06 PM