Search code examples
msbuildmsbuild-taskmsbuild-4.0msbuild-buildengine

MSBuild Compile target to generate a dll for a class?


I have a VB Class and when I run :

msbuild /t:Compile

It generates the Exe for the application that contains the compiled code for the class as well.

I want to have a separate dll for my VB class in myfolder Folder.

What extra arguments do I have to pass, in order to get my dll in myfolder ?

Any help is appreciated !!


Solution

  • This can be done by invoking the Compile Task of MSbuild.

    So, Writing a task to use the VBC compiler task to compile the class to a dll will do the trick.

    Rest, the default compile task will generate the exe for the main module.

    That is how !