4

How can I add C# class to my project programmatically in design mode? (like code generator)

4
  • Please specify your development environment. Is it Visual Studio 2010 Professional? Express? ...etc. The tool you're using to compile the project dictates the easiest approach. Commented May 7, 2011 at 17:00
  • 1
    You mean add reference to some external class? Commented May 7, 2011 at 17:14
  • i'm using vs 2008 Professional Commented May 7, 2011 at 17:27
  • Any news for 2019 or 2022? Commented Dec 13, 2021 at 11:48

2 Answers 2

1

You could use macro. It can do anything to VS IDE.

Sign up to request clarification or add additional context in comments.

2 Comments

but i have no idea about macros
Don't think macros will help in this case, take a look at the comment to Steve's answer.
1

You can create a Add-In for Visual Studio. Look at this sample code from Microsoft which programmatically creates a project item (class).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.