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...
I haven't quite figured out what the problem is, but I did isolate it to a small repro where this happens:
<#@ template language="C#" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="VSLangProj" #>
<#+
void Test(EnvDTE.Project Project) {
var vsProject = (VSLangProj.VSProject)Project.Object;
var refs = vsProject.References;
}
#>
Which gets the following warning during processing:
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
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With