我使用干净安装的VS 2015 Enterprise RC1创建了一个新项目,我正在尝试为
Mandrill添加一个针对.NET 4构建的Nuget包.
当我构建项目时,我从DNX Core 5.0收到错误,找不到命名空间:
- All packages are already installed and there is nothing to restore.
- NuGet package restore finished.
- 1>------ Build started: Project: WebApplication3,Configuration: Debug Any cpu ------
- 1>C:\Projects\WebApplication3\src\WebApplication3\MessageServices.cs(5,7,5,15): DNX Core 5.0 error CS0246: The type or namespace name 'Mandrill' could not be found (are you missing a using directive or an assembly reference?)
- 1>
- 1> Build Failed.
- 1> 0 Warning(s).
- 1> 1 Error(s).
- 1>
- 1> Time elapsed 00:00:00.1404086
- 1>
- ========== Build: 0 succeeded or up-to-date,1 Failed,0 skipped ==========
我试图将它添加到project.json中的dnx451框架,而不是添加为全局依赖项,结果相同.
- "frameworks": {
- "dnx451": {
- "dependencies": {
- "Mandrill": "1.3.1"
- }
- },"dnxcore50": { }
- },
甚至可以在ASP.NET 5中使用.NET 4包吗?如果是这样,需要什么?