【发布时间】:2015-08-19 17:36:48
【问题描述】:
我有一个自定义 T4 模板。当我右键单击并选择“运行自定义工具”时,它运行没有错误。如果我右键单击并选择“调试 T4 模板”,我会收到上面的错误,并添加了
=== 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.
我正在使用具有从 c:... 到 dll 的完全限定有效路径的“Assembly”指令。
<#@ Assembly Name="C:\...\MY.Interfaces.dll" #>
再次在不调试时不会出错。
我的问题是如何让调试器正确导入程序集而不将其复制到“IDE”目录?
【问题讨论】:
标签: visual-studio-2015 t4