Search code examples
c#.netvisual-studioxamarin.formswindows-phone

Xamarin Forms, Remove WinPhone Target Platform on Visual Studio


Currently I am trying to add service reference for mine Portable Class Library (PLC) in my Xamarin.Forms apps. For that point, I read that I have to remove Windows Phone 8.1 target platform.

I am opening PLC properties and I see where the target platforms are, there I find WinPhone and Silverlight, unfortunately when I click Change they disappear and I cannot remove them.

Screenshot of libraries

Can anybody suggest what the issue could be and how can I fix it?

Please keep in mind that I am doing it with Visual Studio Community 2017 (version 15.2).

Thanks in advance


Solution

  • 1 option is to change the .net profile version manually in your .csproj file.

    1. Visual Studio unload your current PCL Project.
    2. Edit your .csproj File (Right Click on the unloaded project)
    3. Find Node <TargetFrameworkProfile></TargetFrameworkProfile>
    4. Change Value to Profile7

    Save and close the file.

    And than reload your .csproj file.