Probably, this problem should not be tied with Visual Studio. I mean, of course you can generate a project file and .NET even gives you a comprehensive API for using it. But, most likely, you should rather base your architecture on CodeDOM:
http://msdn.microsoft.com/en-us/library/650ax5cx.aspx[
^].
Some background: everything you need for the development is actually bundled with .NET Framework, a freely redistributed thing. At least, you always have C#, VB.NET compiler, MSBuild and all the components to use them. That said, the user who installed .NET can always use assemblies compiled and loaded during run time by your application. Visual Studio is absolutely not needed for this purpose. This way, your possibilities are probably even better then you expected. The FCL (
Framework Class Library) always provides you with the
CodeDOM providers for these languages which you can use to generate assemblies, either temporary, of stored re-used permanently.
You also need to be able to understand and use Reflection:
http://msdn.microsoft.com/en-us/library/hh156524.aspx[
^],
http://msdn.microsoft.com/en-us/library/f7ykdhsy.aspx[
^].
Don't think that Reflection is too slow for this purpose. Yes, it is slow, but if you design things properly, its runtime use is reduced to minimum. Optimally, you can develop some statically bound interface(s). When you generate an assembly dynamically, Reflection is only needed to locate some type implementing the interface, instantiate it (get in in instance of a type/structure accessible through the interface reference), and you are done with Reflection part. When you got an interface reference representing the implementation type, you just use this interface, and through the interface members, you might access all other types in the dynamically generated assembly.
Please see my past answers on related topics, but keep in mind, that in some of those answers I discuss much more advanced matter than you might need, mostly related to Application Domains and a need of using IPC to work across the domains. You might not need it, so first focus on CodeDOM usage:
Create WPF Application that uses Reloadable Plugins...[
^],
AppDomain refuses to load an assembly[
^],
code generating using CodeDom[
^],
C# Reflection InvokeMember on existing instance[
^],
Gathering types from assemblies by it's string representation[
^].
Your follow-up questions are welcome.
Good luck,
—SA