配置转换工具找不到 AppHarbor.TransformTester 程序集
Config Transformation Tool can't find AppHarbor.TransformTester assembly
我正在试用 Config Transformation Tester 工具。提供的下载是一个名为 ctt.exe
的文件。当我运行它如下:
ctt s:Web.config t:Web.Debug.config d:Web.Out.config
...我得到以下输出:
Exception Microsoft.Web.XmlTransform.XmlNodeException: Could not load
file or as sembly 'AppHarbor.TransformTester' or one of its
dependencies. The system cannot find the file specified. --->
System.IO.FileNotFoundException: Could not load f ile or assembly
'AppHarbor.TransformTester' or one of its dependencies. The syst em
cannot find the file specified. at
System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String
cod eBase, Evidence assemblySecurity, RuntimeAssembly locationHint,
StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean
throwOnFileNotFound, Boolean forIntro spection, Boolean
suppressSecurityChecks) at
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
as semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly,
StackCrawlMar k& stackMark, IntPtr pPrivHostBinder, Boolean
throwOnFileNotFound, Boolean forIn trospection, Boolean
suppressSecurityChecks) at
System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
Evid ence assemblySecurity, StackCrawlMark& stackMark, IntPtr
pPrivHostBinder, Boolea n forIntrospection)
...
显然,它希望找到一些 AppHarbor.TransformTester.dll
但找不到。但我也不能。我从哪里得到这个程序集?
或者,是否有更好的命令行工具可用于应用 Web/app.config 转换并用作自动构建过程的一部分?
更新:即使从源代码编译时我也得到了这个。
好吧,这是我在做傻事。
我从 config transformation tester 中获取了示例配置。示例 Web.Debug.config 包含对 AppHarbor.TransformTester:
的引用
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<xdt:Import assembly="AppHarbor.TransformTester" namespace="AppHarbor.TransformTester.Transforms"/>
<configSections xdt:Transform="MergeBefore(/configuration/*)" />
<configSections>
<section name="mySection" xdt:Transform="Insert" />
</configSections>
<connectionStrings xdt:Transform="Merge" />
<connectionStrings>
<add name="bar" connectionString="value" xdt:Transform="Insert"/>
</connectionStrings>
<system.web>
<customErrors mode="On" xdt:Transform="Replace">
</customErrors>
</system.web>
</configuration>
只需使用适当的配置即可。
我正在试用 Config Transformation Tester 工具。提供的下载是一个名为 ctt.exe
的文件。当我运行它如下:
ctt s:Web.config t:Web.Debug.config d:Web.Out.config
...我得到以下输出:
Exception Microsoft.Web.XmlTransform.XmlNodeException: Could not load file or as sembly 'AppHarbor.TransformTester' or one of its dependencies. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load f ile or assembly 'AppHarbor.TransformTester' or one of its dependencies. The syst em cannot find the file specified. at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String cod eBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntro spection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName as semblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMar k& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIn trospection, Boolean suppressSecurityChecks) at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evid ence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolea n forIntrospection) ...
显然,它希望找到一些 AppHarbor.TransformTester.dll
但找不到。但我也不能。我从哪里得到这个程序集?
或者,是否有更好的命令行工具可用于应用 Web/app.config 转换并用作自动构建过程的一部分?
更新:即使从源代码编译时我也得到了这个。
好吧,这是我在做傻事。
我从 config transformation tester 中获取了示例配置。示例 Web.Debug.config 包含对 AppHarbor.TransformTester:
的引用<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<xdt:Import assembly="AppHarbor.TransformTester" namespace="AppHarbor.TransformTester.Transforms"/>
<configSections xdt:Transform="MergeBefore(/configuration/*)" />
<configSections>
<section name="mySection" xdt:Transform="Insert" />
</configSections>
<connectionStrings xdt:Transform="Merge" />
<connectionStrings>
<add name="bar" connectionString="value" xdt:Transform="Insert"/>
</connectionStrings>
<system.web>
<customErrors mode="On" xdt:Transform="Replace">
</customErrors>
</system.web>
</configuration>
只需使用适当的配置即可。