Visual studio 2015 t4调试:ReflectionTypeLoadException“;无法加载一个或多个请求的类型“;

Visual studio 2015 t4调试:ReflectionTypeLoadException“;无法加载一个或多个请求的类型“;,visual-studio-2015,t4,Visual Studio 2015,T4,我有一个自定义T4模板。当我右键单击并选择“运行自定义工具”时,它运行时不会出错。如果右键单击并选择“Debug T4 Template”,则会出现上面的错误,并添加 === Pre-bind state information === LOG: DisplayName = My.Interfaces, Version=1.0.5708.24057, Culture=neutral, PublicKeyToken=null (Fully-specified) LOG: Appbase = fi

我有一个自定义T4模板。当我右键单击并选择“运行自定义工具”时,它运行时不会出错。如果右键单击并选择“Debug T4 Template”,则会出现上面的错误,并添加

=== Pre-bind state information ===
LOG: DisplayName = My.Interfaces, Version=1.0.5708.24057, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/My.Interfaces.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/My.Interfaces/My.Interfaces.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/My.Interfaces.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/My.Interfaces/My.Interfaces.EXE.
我正在使用“Assembly”指令,该指令具有来自c的完全限定有效路径:。。。到dll

<#@ Assembly Name="C:\...\MY.Interfaces.dll" #>

同样,不调试时不会出错


我的问题是如何让调试器在不将程序集复制到“IDE”目录的情况下正确导入程序集?

我引用的dll似乎是错误的版本。它位于同一解决方案中项目的bin目录中。我更新了dll并重建了该项目。然后它就工作了,不需要把dll放在其他地方


:\

我引用的dll似乎是错误的版本。它位于同一解决方案中项目的bin目录中。我更新了dll并重建了该项目。然后它就工作了,不需要把dll放在其他地方

:\