1

using code smith, i'm trying to reference an assembly that i'm generating as output.

the idea is to create the assembly in a build step, then in a later build step reference this assembly for further generation and output from the methods in the assembly.

seems their help is a bit lacking in this area. it says something to the effect of being able to GAC the assembly you wish to reference and then use it in an Assembly directive.

however during the execute, i keep getting error CODESMITH0001: Unable to resolve assembly

any ideas as to where or how i may be thinking about this wrong?

thanks

Beta033
  • 1,975
  • 9
  • 35
  • 48

1 Answers1

2

Whose help is a bit lacking in this area? I'd like to get this taken care of and resolved. What does your assembly directive look like? Are you using a Path="....\Common" attribute to the assembly you a compiling in the previous step?

Also please see this documentation for more information: http://docs.codesmithtools.com/display/Generator/Referencing+Assemblies

Thanks -Blake Niemyjski

Blake Niemyjski
  • 3,432
  • 3
  • 25
  • 41
  • <%@ Assembly Name="Testproj20" Path="Testproj20.dll" %> the dll is located in the same folder as as the template and it's a 2.0 project. ultimately it will be a 4.0 project and i've seen the "unofficial" guide to getting this to work with 4.0 assemblies. thanks for the help. – Beta033 Oct 06 '10 at 19:28
  • your comment clued me in to the fact that my path may be incorrect and it seems it is. i get another error about a missing get or set accessor, but seeing as the class is just an empty shell, this doesn't surprise me. Now to get it to work with 4.0 dlls and the GAC. – Beta033 Oct 06 '10 at 19:48
  • ok, so turns out i'm simply an idiot. the whole problem with the GAC was that it didn't work out of the box with .net 4.0 and then the rest of my problem was that the path was wrong. – Beta033 Oct 06 '10 at 20:13
  • 1
    I did, as soon as i got the 4.0 stuff set up correctly, everything magically fell into place. – Beta033 Oct 08 '10 at 20:34
  • Awesome! We are working on the next major version which will support .NET 4.0 as well as some very cool things! – Blake Niemyjski Oct 19 '10 at 12:05
  • 1
    @BlakeNiemyjski, does the Assembly have to be in the GAC? – smartcaveman Apr 07 '12 at 23:58
  • 1
    @smartcaveman, no an assembly does not have to be in the gac. You can specify it by the path attribute or place the assembly in the CodeSmith Generator Program Files (bin \ schemaproviders \ addins ) folders. Please see this for more information: http://docs.codesmithtools.com/display/Generator/Referencing+Assemblies – Blake Niemyjski Apr 11 '12 at 17:54
  • @BlakeNiemyjski, thanks, I eventually figured that out but I appreciate that. I'm on day 7 of my trial, and chances are looking really good for a full purchase (largely in part to seeing how available you make yourself for customer support). Thanks for a great product. – smartcaveman Apr 11 '12 at 17:56
  • @BlakeNiemyjski Support forums link appears to redirect to the homepage now. No longer exists? – Shiv Jan 29 '18 at 03:47
  • 1
    @Shiv we got rid of the forums a few years ago for several reasons one being we moved everything to the cloud and the forum software was super old and didn't work good in azure or modern browsers. Please redirect any questions to stack overflow or via email (preferred). – Blake Niemyjski Feb 21 '18 at 22:58