命名空间“Microsoft.AspNetCore”

时间:2016-03-16 23:38:06

标签: asp.net dotnet-cli

我从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”(您是否缺少程序集引用?)

相同的代码库最初工作,但现在无法构建 这个包装有没有变化?

2 个答案:

答案 0 :(得分:0)

你的意思是?

  

dnu restore

     

dnu build

https://github.com/aspnet/Home/wiki/DNX-utility

答案 1 :(得分:0)

对于那些来这里遇到同样问题的人: 只需在nuget设置中添加其他来源即可 https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json 然后像往常一样通过nuget安装Microsoft.AspNetCore.Testing