![](/img/trans.png)
[英]Read Feature flags from AppConfiguration in a Custom Nuget package
[英]Can't import classes from custom NuGet package
我有一個帶有1個接口和1個類的.NET標准庫:
public interface ITestService
{
void Test(string test);
}
public class TestService : ITestService
{
public void Test(string test)
{
Console.WriteLine("Got this string: " + test);
}
}
我使用nuspec文件使用Azure Pipelines(dotnet包和dotnet push)將庫發布到Azure Artifacts中:
<?xml version="1.0"?>
<package>
<metadata>
<id>Service.Client</id>
<version>5.0.2</version>
<title>Service Client</title>
<authors>auth</authors>
<owners>owner</owners>
<projectUrl>https://dev.azure.com/yyy/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>My test nuget description</description>
<releaseNotes>Test release</releaseNotes>
<copyright>Copyright 2019</copyright>
<tags>latest 5.0.2</tags>
</metadata>
</package>
將這個庫成功導入到我的其他項目中時,即使在nupkg中可以看到它們,我也無法通過VS2019看到ITestService / TestService!
有人可以幫我導入我的圖書館嗎?
我正在使用nuspec和nuget pack
命令,但似乎沒有用。 我使用csproj字段和Azure Devops進行了切換,以使用dotnet pack
命令,並且一切正常。
感謝zivkan的靈感:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.