Solved

codesmith referencing problem

Posted on 2009-05-14
14
262 Views
Last Modified: 2013-12-17
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
Comment
Question by:Mr_Shaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 5

Expert Comment

by:burningmace
ID: 24390375
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
 

Author Comment

by:Mr_Shaw
ID: 24393251
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
 
LVL 5

Expert Comment

by:burningmace
ID: 24393645
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Mr_Shaw
ID: 24393663
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
 
LVL 5

Expert Comment

by:burningmace
ID: 24393669
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
 
LVL 5

Accepted Solution

by:
burningmace earned 500 total points
ID: 24393685
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
 

Author Comment

by:Mr_Shaw
ID: 24393696
hi burningmace,

toolsmith is a tool for generating code not an object.

0
 
LVL 5

Expert Comment

by:burningmace
ID: 24393718
Do you have the CodeSmith Explorer open, or is that what you're trying to do?
0
 

Author Comment

by:Mr_Shaw
ID: 24393738

I have generated the files using CS.

I am now trying to add the files to my visual studio web project.
0
 
LVL 5

Expert Comment

by:burningmace
ID: 24393755
Then go to Project -> Add Existing Item (Ctrl-D) and find the files from there. They'll load right in.
0
 

Author Comment

by:Mr_Shaw
ID: 24393769
Silly question, but which files should I load in.
0
 
LVL 5

Expert Comment

by:burningmace
ID: 24393779
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
 

Author Closing Comment

by:Mr_Shaw
ID: 31581571
thanks
0
 

Expert Comment

by:nilesh88
ID: 38675298
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question