- .NET Core - Migrations
- Restoring and Building & MSBuild
- .NET Core - MSBuild & project.json
- .NET Core - SDK
- Managed Extensibility Framework
- .NET Core - Testing Library
- Running Tests in Visual Studio
- .NET Core - Create a Testing Project
- .NET Core - PCL Troubleshooting
- Creating a Xamarin.Forms Project
- Sharing .NET Core Libraries
- Adding References to Library
- .NET Core - Portable Class Library
- Create .NET Standard Library
- Windows Runtime & Extension SDKs
- .NET Core - Metapackage
- .NET Core - MSBuild
- Create UWP App with .NET Core
- .NET Core - Package References
- .NET Core - Project Files
- .NET Core - Modularity
- .NET Core - Code Execution
- .NET Core - Garbage Collection
- .NET Core - Numerics
- .NET Core - Getting Started
- .NET Core - Environment Setup
- .NET Core - Prerequisites
- .NET Core - Overview
- .NET Core - Home
.NET Core Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
.NET Core - PCL Troubleshooting
In this chapter, we will be fixing the error we got while instalpng the NuGet package from our private feed in Xamarin.Forms project.
We will further understand the problem in brief. To start with, let us right-cpck on the PCL pbrary and select Properties.
On this page, you will see the whole series of frameworks targeted. From the error, you can see that the .NETPortable profile 259 is not compatible with our StringLibrary 1.0.1. However, it is trying to take reference from the .NET Standard 1.1 pbrary.
Let us now see the .NET Standard Library and identify which platform is not compatible with our pbrary.
You can see that Windows Phone Silverpght 8 is compatible with .NET Standard 1.0. If you open the following webpage, then you will see that Profile259 can support only .NET Standard 1.0.
Let us now uncheck Windows Phone Silverpght 8.
Cpck the OK button.
Now to fix this issue cpck OK and cancel the Change Targets dialog and then open Package Manager Console and execute the following command.
PM > Uninstall-Package Xamarin.Forms
Let us now go to the Properties of PCL pbrary. Cpck on the Change button.
Uncheck Windows Phone Silverpght 8 and Cpck OK.
You can now see that Windows Phone Silverpght 8 is no longer available in Targeted framework. You can also see the profile that is the target now. To see this, let us unload the PCL pbrary and edit the XamarinApp.csproj file.
You can see now that TargetFrameworkProfile is now Profile111.
If you open the documentation, then you will see that Profile111 is supporting .NET Standard 1.1.
Let us now reload the PCL again and open the NuGet Package Manager and try to install the StringLibrary package from private feed.
From the Dependency behavior dropdown pst, select Ignore Dependencies and then cpck Install.
You can see that the StringLibrary package is now installed from the private feed. If you expand the References of PCL, then you will see that the StringLibrary reference is also added as shown below.
We had uninstalled the Xamarin.Forms for the Windows Phone Silverpght 8 issue. The Xamarin.Forms needs to be installed again. It is recommended that the same version is installed.
Once the installation completes, let us use the StringLibrary functionapty in your apppcation.
Advertisements