Cannot use nuget package within the project

97 Views Asked by At

Hi I have created a nuget package for my xamarin.iOS project. I have included the DLL which is generated from my Xamarin binding project. This is my .nuspec file

<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
    <metadata>
        <id>ABC.SDK</id>
        <version>1.0.0.0</version>
        <title>Title</title>
        <authors>ABC</authors>
        <owners/>
        <requireLicenseAcceptance>false</requireLicenseAcceptance>
        <description>Your description</description>
        <releaseNotes/>
        <copyright>Your copyright notice</copyright>
        <tags/>
        <dependencies>
            <dependency id=""/>
        </dependencies>
        <summary/>
    </metadata>
    <files>
        
        <file src="D:\ABC\proj\BindingProject\UnityBinding\UnityBinding\bin\Release\ABCLibrary.dll" target="iOS\ABCLibrary.dll"/>
        
    </files>
</package>

I installed this nuget package into my Xamarin project using local repository. My problem is it is not included in the project solution's package folder.

Also in the project.assets.json file, for my nuget package it has only this

"ABC.SDK/1.0.0": {
        "type": "package"
      },

What is the wrong I have done? Please help me. Thanks

1

There are 1 best solutions below

1
On

The target you are using is wrong. For Xamarin.iOS you should use lib/Xamarin.iOS10 and not iOS/ABCLibrary.dll.