Reputation: 14285
I have an existing project, but I want to generate a dll for only a subset of the total classes in this project using MSBuild.
I know I accomplish this by creating a .csprj
file and inserting all the class filenames(that I want) and MSBuild can generate a dll for that .csprj
. But I am not allowed to introduce any new changes in that project (i.e. I can't create a .csprj
file in that project).
How can I create a dll using MSBuild that is composed of some of the files in the existing .csprj
?
Note: i am using jenkins for continuous integration, the solution is expected to do something with jenkins to create a seperate dll of few files.
Upvotes: 1
Views: 244
Reputation: 11832
You can use csc.exe (c# compiler) directly Command-line Building With csc.exe. If you need to build this dll each time you build main dll - you can add this as a post-build user task in your main project. If you need to build it once - just use it from command line. Syntax is trivial.
Upvotes: 1