是否T4MVC与Visual Studio 2010 Beta 2和.NET 4中工作? [英] Does T4MVC work with Visual Studio 2010 Beta 2 and .Net 4?

查看:168
本文介绍了是否T4MVC与Visual Studio 2010 Beta 2和.NET 4中工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能让T4MVC的当前版本(02年2月6日)与ASP.NET MVC 2项目在VS2010 Beta 2的编译在.NET 4的工作。

I cannot get the current build of T4MVC (2.6.02) to work with an ASP.NET MVC 2 project compiled against .NET 4 in VS2010 Beta 2.

有一个错误:


  • 都不再支持C#2.0和C#3.5编译器。模板将始终与第4版编译器而不是作为指定的V3.5进行编译。

  • The C# 2.0 and C# 3.5 compilers are no longer supported. Templates will always be compiled with the version 4 compiler instead of 'v3.5' as specified.

这是很容易通过改变固定

Which is easily fixed by changing

<#@ template language="C#v3.5" debug="true" hostspecific="true" #>

<#@ template language="C#" debug="true" hostspecific="true" #>

然后在创建 .generated.cs 文件,但是我得到了 T4MVC.cs 编译错误它说

And then the .generated.cs files are created, however I get a compile error in T4MVC.cs which says

错误CS0116:命名空间不能直接包含成员如字段或方法

有没有其他人经历过这样?

Has anyone else experienced this?

推荐答案

显然,你必须首先做一个版本:)编译消息似乎事后离开。

Apparently you have to do a build first :) The compile message seems to go away afterwards.

这篇关于是否T4MVC与Visual Studio 2010 Beta 2和.NET 4中工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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