MVC 3.0 T4MVC 在 VS 2010 中停止工作

发布于 2024-11-03 17:54:28 字数 1049 浏览 2 评论 0原文

昨天我正在完全编译 ASP.NET MVC 3.0 项目。今天,当我再次打开我的项目时,由于 T4MVC,它无法编译,我感到非常惊讶。

我再次通过 NuGet 彻底阅读了 T4MVC 模板,但这没有帮助。然后我删除了所有相关的 T4 VS 2010 扩展:T4 Editor、T4Utilites 和 Visual T4,再次打开项目,但没有帮助,然后我再次重新启动并安装了 T4 扩展,但也没有帮助。我创建了新的干净的 ASP.NET MVC 3.0 项目并向其中添加 T4MVC,但我遇到了相同的错误(请参阅 peintscreen)。

如果我从解决方案中删除 T4MVC.tt ,我就可以编译该项目,但是当我将其放回去时,我再次收到错误。

错误屏幕 1

打开错误屏幕 1

错误屏幕 2

打开错误屏幕2

我认为是Visual Studio的问题,现在我有一个很糟糕的想法——尝试重新安装Visual Studio,但可能会有些问题有人可以建议更好的东西吗?

ps 1

另外,我这几天没有安装任何与 Visual Studio 相关的东西,可能只是通过 windows 更新了几个小Upstates,但它们与 Visual Studio 无关。

我还安装了 MVC 3.0 更新工具,但在今天之前一切都运行良好。

它看起来很奇怪,我可以使用此模板成功生成 *.cs 文件,在此过程中我没有遇到任何错误,但 Visual Studio 出于某种原因指责 T4MVC.tt。

ps 2

实际上 NuGet 包也已更新。也许是这样呢?嗯...但是删除 NuGet 后仍然相同:(

Yesterday I was having fully compiled ASP.NET MVC 3.0 project. Today when i opened my project again it is wont compiled because of T4MVC, I was very surprised.

I readd the T4MVC template thorough NuGet again, but it is didn't help. Then i removed all related T4 VS 2010 extensions: T4 Editor, T4Utilites, and Visual T4, opened project again but it is didn't help, than i rebooted and installed T4 extensions again but it is didn't help either. Than i created new clean ASP.NET MVC 3.0 project and add T4MVC to this, and I've got the same errors (see peintscreen).

If i remove T4MVC.tt from solution than I can compile the project, but when i am put it back, I am getting errors again.

Error screen 1

Open Error screen 1

Error screen 2

Open Error screen 2

I think that the problem with Visual Studio, and now I have a very bad idea - try to reinstall Visual Studio, but may be some one may suggest something better?

p.s 1

Also I didn't install anything related to Visual Studio this days, may be only a couple of small Upstates through windows update, but they wasn't related to visual studio.

Also i have MVC 3.0 Updates tools' installed, but before today everything was working well.

It is looking very strange, i can generate *.cs files successfully using this template, there is no errors i am getting during this process, but visual studio blaming T4MVC.tt fore some reason.

p.s 2

Actually also NuGet package where updated. May be it is the case? mmm... But after removing NuGet all the same :(

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

东风软 2024-11-10 17:54:28

好的,这里是如何修复它的 4 个步骤(无需卸载 Visual Studio :) )

1) 从项目中删除 T4MVC(删除 T4MVC 包引用)

2) 使用扩展管理器删除 NuGet

3) 使用扩展管理器重新安装 NuGet

4) 添加T4MVC回来了。

经过这个神奇的步骤后,我就开始工作了。

Ok, here is the 4 steps how to fix it (no Visual Studio uninstall required :) )

1) Remove T4MVC from project(remove T4MVC package reference)

2) Remove NuGet using Extension manager

3) Install NuGet back using Extension manager

4) Add T4MVC back.

after this magic steps i get it work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文