ASP.NET Boilerplate-为MVC和EF组合构建新项目时出错 [英] ASP.NET Boilerplate - Error building new project for MVC and EF combo

查看:71
本文介绍了ASP.NET Boilerplate-为MVC和EF组合构建新项目时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天,我刚刚下载了MVC5和EF的免费启动模板. 在打开,还原所有软件包然后进行构建时,我在"Core"窗口中收到以下构建错误.项目:

I have just downloaded, today, the free startup template for MVC5 and EF. On opening, restoring all packages then building, I get the following build error in the "Core" project:

错误CS0508'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)':返回类型必须为'IEnumerable',以匹配覆盖的成员'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

Error CS0508 'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)': return type must be 'IEnumerable' to match overridden member 'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

错误CS0012在未引用的程序集中定义了对象"类型.您必须添加对程序集"netstandard,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = cc7b13ffcd2ddd51"的引用.

Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

按照错误消息的建议,我将引用添加到了程序集,但是,这产生了很多其他错误.

As the error message suggested, I added the reference to the assembly, however, that produced a whole lot of other errors.

查看示例项目,他们正在使用APB程序集的v2.1.3,并且可以很好地编译.

Looking at the sample projects, they are using v2.1.3 of the APB assemblies and they compile fine.

最新下载的示例使用APB程序集的v3.0.0.

The latest downloaded sample uses v3.0.0 of the APB assemblies.

感谢您对此设置和运行的任何帮助.预先感谢.

Any help to get this up and running is appreciated. Thanks in advance.

推荐答案

错误CS0508'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)':返回类型必须为'IEnumerable',以匹配覆盖的成员'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

Error CS0508 'AppSettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)': return type must be 'IEnumerable' to match overridden member 'SettingProvider.GetSettingDefinitions(SettingDefinitionProviderContext)'

不会这样做的AppSettingProvidera.确保您没有修改该文件中的返回类型.

AppSettingProvider already does that. Make sure you didn't modify the return type in that file.

错误CS0012在未引用的程序集中定义了对象"类型.您必须添加对程序集"netstandard,Version = 2.0.0.0,Culture = neutral,PublicKeyToken = cc7b13ffcd2ddd51"的引用.

Error CS0012 The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

更新到VS2017 15.3.3+.对于VS2015,请安装 NETStandard.Library.NETFramework 包装.

Update to VS2017 15.3.3+. For VS2015, install NETStandard.Library.NETFramework package.

这篇关于ASP.NET Boilerplate-为MVC和EF组合构建新项目时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆