我从https://github.com/aspnet/MusicStore/tree/dev
中提取了最新代码修改代码以添加少量导入
using Microsoft.AspNetCore.Testing;
using Microsoft.AspNetCore.Testing.xunit;
我为dotnet cli构建了应用程序
使用的命令
c:\...\...\Musicstore>dotnet.exe restore
c:\...\...\Musicstore>dotnet.exe build
我收到以下错误 命名空间“Microsoft.AspNetCore”中不存在类型或命名空间名称“Testing”(您是否缺少程序集引用?)
相同的代码库最初工作,但现在无法构建 这个包装有没有变化?
答案 0 :(得分:0)
dnu restore
dnu build
答案 1 :(得分:0)
对于那些来这里遇到同样问题的人: 只需在nuget设置中添加其他来源即可 https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json 然后像往常一样通过nuget安装Microsoft.AspNetCore.Testing