Arpit Khandelwal
Arpit Khandelwal

Reputation: 1803

Compiling VS 2012 project programmatically?

I have this class library project sitting in a solution.

My need is to be able to embed resources (all files from 'Resources' folder) into DatabaseResources.resx and compile it all into an assembly, on the fly.

enter image description here

I tried CSC and was able to compile it

csc /target:library /out:MyClassLibrary.dll  /res:ContentChangeLog.gz /res:CountryBillingRules.gz /res:Finance.gz /res:Instructions.xml /res:Language.gz /res:Masters.gz /res:wbs.gz /res:wbsList.gz 

But, MyClassLibrary.dll should be exposing these resources thru DatabaseResources.resx so that others can find it- MyClassLibrary.DatabaseResources.(resource name)

enter image description here

I couldn't find a way to do the same with CSC.

Any help appreciated.

Upvotes: 0

Views: 83

Answers (1)

Rex
Rex

Reputation: 2140

I guess what you are looking for is MsBuild.

a good explanation here - Some confusions about Command Line Compiler and MSBuild

Upvotes: 1

Related Questions