所有的引用都存储在您的DemoLibrary.Tests.csproj
中。您可以直接在其中进行编辑,或使用dotnet cli:
dotnet add DemoLibrary.Tests/DemoLibrary.Tests.csproj reference DemoLibrary/DemoLibrary.csproj
remove
和list
。您可以在这里查找文档和示例:https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-add-reference, https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-list-reference, https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-remove-reference。PackageReference
选项卡,它会展示您应直接向项目文件添加哪个元素。packages.config
。整个生态系统现在都围绕着软件包引用展开。您似乎下载了一个非常旧的示例(使用.NET Framework),由于存在破坏性变化,这将给您带来更多的麻烦。请尝试寻找新鲜和新的示例项目(如.NET Core中的示例)。