ErikM
ErikM

Reputation: 1

Create a VS 2017 extension to add new code file

I hope someone can point me in the right direction. I have two separate piece of code that functions outside of Visual Studio.

The last step performed by the second piece of code currently creates a new c# source file. I would like to combine both pieces of code into a single VSIX extension.

Unfortunately I have never worked with VS Extensions and I am a bit lost. I have worked through various VSIX examples, but none of these create files.

Can anyone perhaps point me to a working example of how to add new source files to a project via an extension?

I have seen some examples, but they all refer to old Add-In style plugins and not VSIX.

Upvotes: 0

Views: 841

Answers (1)

Leo Liu
Leo Liu

Reputation: 76700

Create a VS 2017 extension to add new code file

As we know the Visual Studio Extensions is:

Extensions are add-ons that allow you to customize and enhance your experience in Visual Studio by adding new features or integrating existing tools. An extension can range in all levels of complexity, but its main purpose is to increase your productivity and cater to your workflow.

So, the Visual Studio extension is service for Visual Studio IDE to customize and enhance your experience in Visual Studio, rather than serving a specific project.

What I suspect the Project and item templates should be helps.

Hope this helps.

Upvotes: 1

Related Questions