“运行所选代码生成器时出错"在 VS 2013 脚手架中

编程入门 行业动态 更新时间:2024-10-22 19:36:49
本文介绍了“运行所选代码生成器时出错"在 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 包的应用程序擦除.所以我擦除了 obj 和 bin 文件夹,然后是包文件夹.完成后,我能够修复旧项目并清理干净.

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.

  • 可能是 nuget 包有缺陷
  • 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 脚手架中

    本文发布于:2023-11-17 00:03:13,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1608061.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:脚手架   所选   代码生成器   quot

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!