使用模板配置代码史密斯错误

时间:2019-05-15 13:24:28

标签: c# codesmith

我继承了一个项目, 它使用Code Smith Generator, 每次我尝试使用现有模板配置新项目时。

使用VS 2017

我收到此错误,请注意NHibernateHelper在项目中

System.IO.FileNotFoundException: Could not load file or assembly 'CodeSmith.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fd61cdb91609a7a' or one of its dependencies. The system cannot find the file specified.
File name: 'CodeSmith.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fd61cdb91609a7a'
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at CodeSmith.Engine.CompileTemplateResult.#ZLb.#YLb()
   at CodeSmith.Core.Extensions.RetryUtil.Retry(Action action, Int32 attempts, Int32 retryTimeout)
   at CodeSmith.Engine.CompileTemplateResult.CreateTemplateInstance()
   at CodeSmith.Engine.CodeTemplateCompiler.CreateInstance()
   at CodeSmith.Gui.AddOutput.#pm(String #Ucb)

=== Pre-bind state information ===
LOG: DisplayName = CodeSmith.Engine, Version=5.0.0.0, Culture=neutral, PublicKeyToken=9fd61cdb91609a7a
 (Fully-specified)
LOG: Appbase = file:///C:/USERS/CHINASYNDROME/APPDATA/LOCAL/MICROSOFT/VISUALSTUDIO/15.0_77DAA9EC/EXTENSIONS/53C3PV3D.LCB
LOG: Initial PrivatePath = bin;AddIns;SchemaProviders
Calling assembly : NHibernateHelper, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.

=== 日志:此绑定从LoadFrom加载上下文开始。 WRN:不会在LoadFrom上下文中探测本机映像。仅在默认的加载上下文中探测本机映像,例如Assembly.Load()。 日志:使用应用程序配置文件: C:\ Users \ CHINASYNDROME \ AppData \ Local \ Microsoft \ VisualStudio \ 15.0_77daa9ec \ devenv.exe.config 日志:使用主机配置文件: 日志:使用C:\ Windows \ Microsoft.NET \ Framework \ v4.0.30319 \ config \ machine.config中的计算机配置文件。 日志:之前曾见过相同的绑定,但失败,原因是hr = 0x80070002。

0 个答案:

没有答案