I am developing an application using Xamarin and got stuck into this error. The error has been generated from my .Droid project while building the solution (Clean Solution is successful). The 'Interface' is a folder which is present inside my Portable PCL project. Basically I want to implement an interface (declared inside my Portable project) into my.Droid project. I have already tried to refer that Interface folder with using keyword but it says does not exist . And since the folder is not getting referenced, all the interfaces inside that folder are also not getting referenced.
The below code is of .Droid project file in which interface has to be implemented.
using ProjectName;
using ProjectName.Interface;
using Xamarin.Forms;
[assembly: Dependency(typeof(FileName))]
namespace ProjectName.Droid
{
class FileName : InterfaceName
{
....
}
}
The below code is of one of the Portable project interface file inside Interface folder.
using System;
using ProjectName;
namespace ProjectName.Interface
{
public interface InterfaceName
{
....
}
}
When I try to Add Reference of Portable project into.Droid project it says:
Unable to add reference to Portable project. The current project's target is not one of or compatible with the targets of Portable Project.
Please Note:
Any kind of help will be appreciated.
I have solved this problem by myself. I have edited ProjectName.Droid.csproj file and manually inserted reference code for my Portable Project. No need to convert into .net standard at all. All errors are gone. Thank You everyone who contributed. Cheers.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.