CodeSmith Community
Your Code. Your Way. Faster!

CodeSmith files needed for SDK in release 5.1.2.8409

rated by 0 users
Answered (Verified) This post has 1 verified answer | 6 Replies | 2 Followers

Top 500 Contributor
20 Posts
Points 630
shackett posted on 06-16-2009 11:27 AM

Our DSL Tool uses CodeSmith with an SDK license to generate code.  Previously, the following DLLs were required to run CodeSmith using the SDK:

  • CodeSmith.Engine.DLL
  • SchemaExplorer.DLL
  • System.Data.SQLite.DLL

I have noticed that version 5.1.2.8409 requires CodeSmith.Feedback.Client.DLL (version 1.0.0.8621); however, I am still getting an error when trying to compile my CodeSmith templates using the CodeSmith API:

TypeInitializationException while generating code: The type initializer for 'CodeSmith.Engine.CodeTemplateCache' threw an exception.
   at CodeSmith.Engine.CodeTemplateCache.get_Instance()
   at CodeSmith.Engine.CodeTemplateInfo.EnsureTemplateInfo()
   at CodeSmith.Engine.CodeTemplateInfo.get_ContentHashCode()
   at CodeSmith.Engine.CodeTemplateInfo.GetHashCode()
   at CodeSmith.Engine.CodeTemplateCompiler.Compile(String outputPath, Boolean forceRecompile)
   at CodeSmith.Engine.CodeTemplateCompiler.Compile()
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.RunCodeGenerator(String domainFile, IProjectStructure projectStructure)
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.LoadProjectAndGenerateCode()
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.GenerateCode(IVsSolution vsSolution, DTE2 dte, IVsUIShell uiShell)
   at Cambridge.Framework.Domain.Metadata.VSPackage.VSPackagePackage.GenerateCodeMenuItemCallback(Object sender, EventArgs e)

 

Are there other DLLs that we are missing when using the CodeSmith SDK?

  • Filed under:
  • | Post Points: 35

Answered (Verified) Verified Answer

Top 500 Contributor
20 Posts
Points 630
Verified by shackett

Our final hurdle involved upgrading SQLite from v1.0.60.0 to v1.0.61.0.

So, in order to use the CodeSmith SDK v5.1.2, we are installing our DSL application as follows:

- CodeSmith.Engine.DLL v5.1.2 (install to Application Folder)
- SchemaExplorer.DLL v5.1.2 (install to Application Folder)
- Ionic.Utils.Zip.DLL v1.7.1.10 (install to GAC)
- CodeSmith.Feedback.Client.DLL v1.0.0 (install to GAC)
- System.Data.SQLite.DLL v1.0.61.0 (install to GAC)

All Replies

Top 10 Contributor
2,503 Posts
Points 88,217

Hello,

That should be all that you need to reference. Will I be able to reproduce this with what you sent me before?

Thanks
-Blake Niemyjski

Blake Niemyjski
CodeSmith Tools, LLC. Software Development Engineer
Blog: http://windowscoding.com/blogs/blake/
.NetTiers team | Visit http://www.nettiers.com

  • | Post Points: 35
Top 500 Contributor
20 Posts
Points 630

I think that Ionic.Utils.Zip.dll might be required also:

  • | Post Points: 35
Top 10 Contributor
2,503 Posts
Points 88,217

Hello,

Yes you are correct, (forgot about that one). It is used to extract the samples if the samples are found. I will talk to my pm about giving the SDK documentation an overhaul.

Thanks
-Blake Niemyjski

Blake Niemyjski
CodeSmith Tools, LLC. Software Development Engineer
Blog: http://windowscoding.com/blogs/blake/
.NetTiers team | Visit http://www.nettiers.com

  • | Post Points: 35
Top 500 Contributor
20 Posts
Points 630

Our assembly that calls the CodeSmith code references CodeSmith.Engine.DLL and SchemaExplorer.DLL.  The System.Data.SQLite.DLL assembly gets installed into the GAC.  I manually installed the following two DLLs in the GAC using gacutil.exe:

  1. CodeSmith.Feedback.Engine.DLL (v1.0.0.0)
  2. Ionic.Utils.Zip.DLL (v1.7.1.10)

However, we are still getting the Type Initialization error as follows:

TypeInitializationException while generating code: The type initializer for 'CodeSmith.Engine.CodeTemplateCache' threw an exception.
   at CodeSmith.Engine.CodeTemplateCache.get_Instance()
   at CodeSmith.Engine.CodeTemplateInfo.EnsureTemplateInfo()
   at CodeSmith.Engine.CodeTemplateInfo.get_ContentHashCode()
   at CodeSmith.Engine.CodeTemplateInfo.GetHashCode()
   at CodeSmith.Engine.CodeTemplateCompiler.Compile(String outputPath, Boolean forceRecompile)
   at CodeSmith.Engine.CodeTemplateCompiler.Compile()
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.RunCodeGenerator(String domainFile, IProjectStructure projectStructure)
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.LoadProjectAndGenerateCode()
   at Cambridge.Framework.Domain.Metadata.CodeEngine.CodeSmith.CodeGenerator.GenerateCode(IVsSolution vsSolution, DTE2 dte, IVsUIShell uiShell)
   at Cambridge.Framework.Domain.Metadata.VSPackage.VSPackagePackage.GenerateCodeMenuItemCallback(Object sender, EventArgs e)

Is there something else that we are missing?

 

  • | Post Points: 5
Top 500 Contributor
20 Posts
Points 630
Verified by shackett

Our final hurdle involved upgrading SQLite from v1.0.60.0 to v1.0.61.0.

So, in order to use the CodeSmith SDK v5.1.2, we are installing our DSL application as follows:

- CodeSmith.Engine.DLL v5.1.2 (install to Application Folder)
- SchemaExplorer.DLL v5.1.2 (install to Application Folder)
- Ionic.Utils.Zip.DLL v1.7.1.10 (install to GAC)
- CodeSmith.Feedback.Client.DLL v1.0.0 (install to GAC)
- System.Data.SQLite.DLL v1.0.61.0 (install to GAC)

Top 10 Contributor
2,503 Posts
Points 88,217

Hello,

I'll keep this post updated with all that needs to installed in order to use the SDK.

Thanks
-Blake Niemyjski

Blake Niemyjski
CodeSmith Tools, LLC. Software Development Engineer
Blog: http://windowscoding.com/blogs/blake/
.NetTiers team | Visit http://www.nettiers.com

  • | Post Points: 5
Page 1 of 1 (7 items) | RSS
Copyright © 2010 CodeSmith Tools, LLC