secretwep
secretwep

Reputation: 716

How can I automatically add files to a Visual Studio solution that were made by another application

I created a simple standalone SQL-table-to-class generator as a WPF application.

When I save files (e.g. a .cs class file) from that application into the directory structure of a separate web application I'm working on, it is of course not added to the solution. I have to manually add it in.

Is there a way I can automatically tag it/flag it or whatever, to be included in the web application solution?

Upvotes: 0

Views: 25

Answers (1)

Bradley Uffner
Bradley Uffner

Reputation: 16991

The only solution I know of is to manually modify the .proj file and add a content include directive for the directories you want with a wildcard.

<Content Include="SomeDirectory\*" />

You will need to do this for each directory and it isn't recursive. The major down-side though, is that you must reload the project for it to pick up new files.

Personally, I consider this to be a bit of hack and would never use it in a serious project.

Upvotes: 1

Related Questions