Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Extensibility / September 2007

Tip: Looking for answers? Try searching our database.

Project.CodeModel.AddClass method question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 04 Aug 2007 21:58 GMT
I'm able to add a class to the project with my addin, but I'm having trouble
figuring out how to manipulate where it lands in the project structure. I
would like to be able to right click on a folder in the project and have the
class file created in that folder.

Also, I understand that the location parameter for AddClass needs to be
different for VB (I'm coding in C# but will need to create a class for a VB
project to).

Tim
Stevanich - 01 Sep 2007 05:22 GMT
Tim,

Check out these MSDN articles.  I think you want to specify the optional
Access parameter for the default property.
http://msdn2.microsoft.com/en-us/library/envdte80.codeclass2.addproperty(VS.80).aspx

It also appears that the CodeClass2 has no way of controlling where the file
lands in the physical structure, but this is a guess based on the
documentation.  In fact, in the sample, the class is being added at the
selection of the current document.  Maybe you need to create the document
first, where you want it, and then design the class?
http://msdn2.microsoft.com/en-us/library/envdte80.codeclass2.addclass(VS.80).aspx

Hope this helps,

Steve - dotneticated.com

> I'm able to add a class to the project with my addin, but I'm having
> trouble figuring out how to manipulate where it lands in the project
[quoted text clipped - 6 lines]
>
> Tim

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.