RC1140
RC1140

Reputation: 8673

Programmatically Reloading a C# Project

Is it possible to programmatically reload a C# project? In one of my previous questions I needed to add all the CS files in a specific folder, now while this works I find that I have to reload the project every time to so that it can register the new files were added.

So now I need a way to automatically reload after the project had been generated.

Upvotes: 1

Views: 1028

Answers (1)

kalyang
kalyang

Reputation: 209

I assume, for the first time when you output all the DAL files, you are also creating a file with extension .csproj listing in it, all the files you just added in the folder.

If my assumption above is right: When you want to add more files, you can programatically edit the same .csproj file from your c# code. Then, Visual studio will force the project reload saying it has changed outside the environment.

If my assumption above is wrong: You can create the .csproj file, It should be easy and straight forward.

I am not sure If I got your question right.

Upvotes: 2

Related Questions