Sometime you find some nice code on the internet like VB.Net or C#.
But it is of no use if it is not compiled
As explained in this post you can compile you own .NET COM objects on the fly.
But if you want to do it using a GUI interface without installing the full blown Visual Studio. You can use this GUI Wrapper – Visual Studio Light
The first option is for compiling GUI Applications EXE’s.
The second one is to create DLL’s (Libraries) which you can use later on in a .Net application.
The third one is for compiling Console Applications EXE’s.
You can download it here
PS : This wrapper is for VB.Net but can easily be changed to use C# replace the vbc.exe by csc.exe
If you run it you get an EXE or DLL
This is the code :
imports System.Windows.Forms ' The name of the module must match the name of the code item ' created in the hosting application via CreateItem. module Script sub Main() MessageBox.Show("hi From DotNET !!") end sub end module
How to run .Net Assemblies in Powershell see here
How to run .Net Assemblies form Memory in Powershell see here