脚手架控制器不使用Visual Studio 2013的更新工作2 [英] Scaffolding controller doesn't work with visual studio 2013 update 2

查看:183
本文介绍了脚手架控制器不使用Visual Studio 2013的更新工作2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经更新到Visual Studio 2013更新2,现在我不能支架控制器。

I have updated to Visual Studio 2013 update 2 and now I cannot scaffold controllers.

问题不在于具体项目:当我尝试脚手架控制器,我得到的一切及任何项目出现以下错误:

The problem is not project specific: when I try to scaffold a controller, I get the following error in ALL and ANY project:

There was an error running the selected code generator:
'Exception has been thrown by the target of an invocation.'

据更新到Visual Studio工作之前2013更新2。

It was working before updating to Visual Studio 2013 update 2.

用Google搜索这个问题到死亡,但没有提出的各种建议的工作。

Have googled the issue to death, but none of the various suggestions work

例如:


  1. 注释掉OnModelCreating在我的上下文;

  1. Commenting out OnModelCreating in my context;

删除软件包,如MvcScaffolding等(我没有安装,它不与任何项目工作);

Removing packages such as MvcScaffolding, etc (I have none installed and it doesn't work with ANY project);

我已经修改/定制一些模板,但它是在更改后的工作。

I have modified/customised some of the templates, but it was working after the changes.

我卸载的Visual Studio 2013 Update 2和恢复,从而为Visual Studio版本12.0.21005.1 REL。

I uninstalled Visual Studio 2013 Update 2 and thereby reverted to Visual Studio version 12.0.21005.1 REL.

问题已经消失。因此,这个问题是相当肯定与更新2

The problem has disappeared. Therefore, the problem is quite definitely with Update 2.

有没有人(包括微软)知道的修复程序?

Does anyone (including Microsoft) know of a fix?

Farruk Subhani的回答没有解决的问题是:明确的问题指出,去除引用MVCScaffolding不能解决问题。

Farruk Subhani's answer does not address the question: The question clearly states that removing references to MVCScaffolding does not solve the issue.

我加了200点赏金,请地址作为明确规定的问题。

I have added a 200 point bounty, please address the question as clearly stated.

推荐答案

事物的组合已经为我工作:

A combination of things have worked for me:


  1. 升级到Visual Studio 2013更新3。

  1. Upgrade to Visual Studio 2013 Update 3.

升级实体框架6.1.1

Upgrade Entity Framework to 6.1.1

修改上下文配置使用IDbSet< ...>而不是DbSet< ...>(我听说,这可能会影响使用异步操作,但对我来说不是很明显,因为我用这我的登陆行动等,由ASP.NET身份2样的NuGet包)提供。

Modify the context configuration to use IDbSet<...> instead of DbSet<...> (I have heard that this can affect using async actions, but not apparently in my case, as I use this in my login actions, etc, as supplied by ASP.NET Identity 2 sample Nuget package).

相当为什么这个组合的作品,我也没办法。但是,再给予从MS雷鸣般的寂静,我可能并不孤单。我想更新2只是没有工作......

Quite why this combination works, I have no idea. But then given the thundering silence from MS, I am probably not alone. I guess update 2 just didn't work...

这篇关于脚手架控制器不使用Visual Studio 2013的更新工作2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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