我用下面的Nuspec创建了Nuget "Uplink.NET“:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata>
<id>uplink.NET</id>
<version>1.3.1</version>
<title>Connector to the storj-network</title>
<authors>TopperDEL,Storj Labs Inc.</authors>
<owners>TopperDEL,Storj Labs Inc.</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<projectUrl>https://github.com/TopperDEL/uplink.net</projectUrl>
<iconUrl>https://storj.io/press-kit/Storj-symbol.png</iconUrl>
<description>This library provides access to the secure and decentralised Storj-network. It allows you to:
- create and delete buckets
- upload and download files
It is - like Storj itself - open source and developed on GitHub.</description>
<releaseNotes>Initial release</releaseNotes>
<copyright>(c) 2019 TopperDEL, Storj Labs Inc.</copyright>
<tags>storj tardigrade storage decentralised secure bucket file xamarin android</tags>
<repository type="git" url="https://github.com/TopperDEL/uplink.net.git" />
<contentFiles>
<files include="uplink.NET\bin\release\netstandard2.0\storj_uplink.dll" buildAction="None" copyToOutput="true" flatten="true" />
</contentFiles>
</metadata>
<files>
<file src="uplink.NET.targets" target="build\uplink.NET.targets" />
<file src="uplink.NET.Droid\bin\Release\uplink.NET.Droid.dll" target="lib\MonoAndroid7.0\uplink.NET.Droid.dll" />
<file src="uplink.NET.Droid\bin\Release\uplink.NET.Droid.dll" target="lib\MonoAndroid7.1\uplink.NET.Droid.dll" />
<file src="uplink.NET.Droid\bin\Release\uplink.NET.Droid.dll" target="lib\MonoAndroid8.0\uplink.NET.Droid.dll" />
<file src="uplink.NET.Droid\bin\Release\uplink.NET.Droid.dll" target="lib\MonoAndroid8.1\uplink.NET.Droid.dll" />
<file src="uplink.NET.Droid\bin\Release\uplink.NET.Droid.dll" target="lib\MonoAndroid9.0\uplink.NET.Droid.dll" />
<file src="uplink.NET\bin\Release\netstandard2.0\uplink.NET.dll" target="lib\netstandard2.0\uplink.NET.dll" />
<file src="uplink.NET\bin\Release\netstandard2.0\uplink.NET.dll" target="netstandard2.0\uplink.NET.dll" />
<file src="uplink.NET\bin\Release\netstandard2.0\uplink.NET.dll" target="lib\uap10.0.16299\uplink.NET.dll" />
<file src="uplink.NET\storj_uplink.dll" target="storj_uplink.dll" />
</files>
</package>我可以将其添加到NetStandard2.0类库中,但会将其添加为包含以下条目的PackageReference:
<PackageReference Include="uplink.NET" Version="1.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>我现在不能访问我的库中的对象。但同样的Nuget正在与Xamarin.Android和UWP一起工作。
有人能帮上忙吗?
发布于 2019-10-08 01:18:13
是,当包是开发依赖项时,如our NuGet docs say
如果使用PackageReference (NuGet 4.8+),则此标志还意味着它将从编译中排除编译时资产。
A linked page进一步解释:
当package的developmentDependency为true时,将PrivateAssets设置为All,将ExcludeAssets设置为编译项目中的PackageReference项,而:
即使developmentDependency是真的,也不要做任何事情,把它当做普通的PackageReference,而:
为了将package
),
https://stackoverflow.com/questions/58260234
复制相似问题