Wrong TargetFrameworkVersion. warning XA0105. BUG

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.

Posts

  • StanislavTsukrovStanislavTsukrov DEMember ✭✭

    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.

  • devoooo4udevoooo4u USMember
    edited April 2017

    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"

  • RoyOgbornRoyOgborn USMember

    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.

  • JCoxJCox USMember

    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?

  • IckeIcke RSMember
    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

  • duanduanduanduan CNMember

    @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.

  • LanceJZLanceJZ USMember
    edited August 2017

    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.

  • RyanWemmerRyanWemmer USMember

    @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.

  • StanislavTsukrovStanislavTsukrov DEMember ✭✭
    edited September 2017

    @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.

  • AndyShokalookAndyShokalook USUniversity ✭✭

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

  • AdrianGhiAdrianGhi USMember ✭✭
    edited November 2017

    @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.
  • TaqwaDwaib.1339TaqwaDwaib.1339 USMember ✭✭

    @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

  • MarioGagnon.1935MarioGagnon.1935 USMember ✭✭

    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?

Sign In or Register to comment.