2

I am fairly new using codesmith. I've done couple of editings here and there but right now I have to make fairly big changes to our template

My question is, I am trying to add an assembly to our new template, specifically Oracle.DataAccess.Client. Below is how I added it in my CST file but I am still receiving unable to resolve assembly error.

<%@ Assembly Name="Oracle.DataAccess.Client" %>
<%@ Import Namespace="Oracle.DataAccess.Client" %>
maridob
  • 651
  • 6
  • 22

2 Answers2

2

To resolve an assembly please see this documentation. It details where the assembly must be located and/or how to specify where to load the assembly from.

Blake Niemyjski
  • 3,432
  • 3
  • 25
  • 41
2

The line should look like this

<%@ Assembly Name="HtmlAgilityPack" path="G:\myproject\bin\Debug" %>

I find that sometimes you have to restart Generator for the reference to take. Sometimes just REBUILDING the template works. I dont have a good answer as to why.

you can also paste the DLLs here

C:\Program Files (x86)\CodeSmith\v7.1\bin

but this is problematic if you are using a DLL that is under development as you have to keep copying the file out.

Note , this is on v7 and the question references v6. I have been using CS for years, I dont think this question is version specific, so I am posting on this question rather than creating another one. Rather than downvote me, please make a comment and I will create a new question. Its sixes, doesnt really matter in my opinion.

greg
  • 1,673
  • 1
  • 17
  • 30