[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

codesmith referencing problem

I have run codesmith for the first time and I am trying to add a reference to the files which it made to my visual studio 2008 project.

I right clicked in solution explorer and then selected add reference.

I selected the reference tab and was presented with loads of DLL files, most of which microsfot or system name spaced.

I was wondering how do I reference my codesmith files.
0
Mr_Shaw
Asked:
Mr_Shaw
  • 7
  • 6
1 Solution
 
burningmaceCommented:
Choose Browse instead of .NET from the tabs at the top of the add reference window, then navigate to where codesmith is installed and find the .NET DLLs.
0
 
Mr_ShawAuthor Commented:
I have chosen Browse but the none of the dll files include my chosen namespace.

Here is a screen shot of my issue.
codesmith-add-reference-question.bmp
0
 
burningmaceCommented:
The browse box is like a file open dialog. Look for your CodeSmith application directory and use the DLLs in there.

What exactly are you trying to do? I was under the impression that CodeSmith was a set of custom tools for generating code, not a set of class libraries..
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
Mr_ShawAuthor Commented:
yes it is used for  generating code.

I would like to add the generated files to my project and add a reference to the new name space for the code.

0
 
burningmaceCommented:
I think you're getting confused as to what you need to do to load CodeSmith. If CodeSmith isn't one of the very top options in the Tools menu, go to Tools -> Add In Manager and start it from there. If it is at the top, click it and that will load CodeSmith's explorer window for you.

If you're still struggling, you need to load up their tutorials.
0
 
burningmaceCommented:
When you load the generated files into your project (which is done automatically by CS if I remember correctly) the namespaces are already in the project and don't need referencing. Simply use an Imports statement in your project code to gain access to them.
0
 
Mr_ShawAuthor Commented:
hi burningmace,

toolsmith is a tool for generating code not an object.

0
 
burningmaceCommented:
Do you have the CodeSmith Explorer open, or is that what you're trying to do?
0
 
Mr_ShawAuthor Commented:

I have generated the files using CS.

I am now trying to add the files to my visual studio web project.
0
 
burningmaceCommented:
Then go to Project -> Add Existing Item (Ctrl-D) and find the files from there. They'll load right in.
0
 
Mr_ShawAuthor Commented:
Silly question, but which files should I load in.
0
 
burningmaceCommented:
The generated ones. You just told me you had generated the code, so whatever file you saved that code to is the file you want to load.
0
 
Mr_ShawAuthor Commented:
thanks
0
 
nilesh88Commented:
I did the same to add references to my project. That get added also. But in my windows application i cant find the generated keywords by code smith.
e.g TList<tablename>. I cant get the table name in TList section.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now