“运行所选代码生成器时出错"在 VS 2013 脚手架中 [英] "There was an error running the selected code generator" in VS 2013 scaffolding

查看:29
本文介绍了“运行所选代码生成器时出错"在 VS 2013 脚手架中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个模型的新视图.
我收到的错误消息是

I'm creating a new view off of a model.
The error message I am getting is

错误
运行所选代码生成器时出错:
'访问路径
'C:UsersXXXXXXXAppDataLocalTempSOMEGUIDEntityFramework.dll' 被拒绝'.

Error
There was an error running the selected code generator:
'Access to the path
'C:UsersXXXXXXXAppDataLocalTempSOMEGUIDEntityFramework.dll' is denied'.

我以管理员身份运行 VS 2013.

I am running VS 2013 as administrator.

我查看了 MvcScaffolding 是否与 VS 2013 兼容通过命令行 RC? 但这似乎并没有解决问题.

I looked at Is MvcScaffolding compatible with VS 2013 RC by command line? but this didn't seem to resolve the issue.

VS2013C#5MVC5VS 2013 开始的全新项目.

VS2013 C#5 MVC5 Brand new project started in VS 2013.

推荐答案

问题在于 web.config 和包目录损坏.

Problem was with a corrupted web.config and package directory.

我创建了新项目,并将我的代码文件复制到新的工作项目中,后来我返回并运行了配置文件的差异和项目本身的文件夹差异.

I created the new project, and copied my code files over to the new working project, I later went back and ran diffs on the config files and a folder diff on the project itself.

问题是更新严重破坏了我的配置文件,其中包含许多我最终清除的更新工件.

The problem was that the updates had highly junked up my config file with lots of update artifacts that I ended up clearing out.

第二个问题是旧项目也一直挂在旧的 DLL 上,这些 DLL 应该被 Nuget 包的应用程序擦除.所以我擦除了 objbin 文件夹,然后是包文件夹.完成后,我能够修复旧项目并清理干净.

The second problem was that the old project also kept hanging onto older DLLs that were supposed to be wiped with the application of the Nuget package. So I wiped the obj and bin folders, then the package folder. After that was done, I was able to get the older project repaired and building cleanly.

我还没有研究为什么配置文件或包文件夹如此无聊,但我认为这是两件事之一.

I have not looked into why the config file or the package folder was so borked, but I'm assuming it is one of two things.

  1. 可能是 nuget 包有缺陷
  2. TFS 源代码控制阻止了 nuget 正确更新各种依赖项.

从那以后,在应用任何更新之前,我会检查所有内容.但是,由于我有一段时间没有更新 EF,我没有证据表明这已经解决了我的 EF 或脚手架问题.

Since then, before applying any updates, I check out everything. However, since I have not updated EF in a while, I no evidence that this has resolved my EF or scaffolding issue.

这篇关于“运行所选代码生成器时出错"在 VS 2013 脚手架中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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