T4MVC“运行自定义工具”生成 EnvDTO 7.0 与 8.0 csc 警告
当我右键单击 T4MVC.tt 并选择“运行自定义工具”(即通过 T4MVC.cs 文件重建)时,我收到以下警告。
警告1 编译转换:假设程序集引用 'EnvDTE, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 匹配“EnvDTE,版本=8.0.0.0,文化=中性,PublicKeyToken=b03f5f7f11d50a3a”, 您可能需要提供运行时策略 C:\Development\EHealth-Trunk\src\EHealth.Web\T4MVC.tt 1 1
这真的没什么大不了的,我只是不喜欢在我的代码库中出现(不必要的)警告......
I'm getting the following warning when I right click on T4MVC.tt and select "run custom tool" (i.e. rebuild by T4MVC.cs file).
Warning 1
Compiling transformation: Assuming assembly reference 'EnvDTE, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
matches 'EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a',
you may need to supply runtime policy
C:\Development\EHealth-Trunk\src\EHealth.Web\T4MVC.tt 1 1
It's no big deal really, I just don't like to have (unnecessary) warnings in my code-base...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我还没有完全弄清楚问题是什么,但我确实将其隔离到发生这种情况的一个小重现中:
在处理过程中收到以下警告:
我的 GAC 中唯一的 EnvDTE 是 8.0.0.0。看来问题与 VSLangProj 7.0.3300.0(我唯一的)引用了 EnvDTE 7.0.3300.0 这一事实有关,而该引用并不存在。
显然,这还不是一个“答案”,但这是调查的开始:)
I haven't quite figured out what the problem is, but I did isolate it to a small repro where this happens:
Which gets the following warning during processing:
The only EnvDTE in my GAC is 8.0.0.0. It seems that the problem relates to the fact that VSLangProj 7.0.3300.0 (the only one I have) has a reference to EnvDTE 7.0.3300.0, which doesn’t exist.
Clearly, this is not an 'answer' quite yet, but it's the beginning of the investigation :)
改变:
到:
在 T4MVC.tt 中,它将删除编译器警告:)
David - 我将很快提交一个包含 MvcContrib 修复程序的拉取请求 - 在我这样做之前让我知道您对该解决方案感到满意:)
Change:
To:
in T4MVC.tt and it will remove the compiler warning :)
David - I'm going to submit a pull request with the fix to MvcContrib soon - just let me know that you are happy with that solution before I do it :)
添加 app.config 并粘贴以下代码:
Add app.config and paste this code below: