CSharp and Powershell: Take Two

I have been using an updated version of New-CAssembly for some time now. To be exact I have been using a Cmdlet version of New-CAssembly for time time now. The cmdlet version improves performance and adds features. I would release the cmdlet version, but I haven’t wanted to polish it off yet, partly due to not wanting to document all features, and partly due to there already being an equivalent cmdlet in Powershell V2.0.
I might not release the cmdlet, but I will release the updated script. The update includes 1 bug fix, cleaner code, and the ability to specify the compiler version. To maintain compatibility with scripts already written for New-CAssembly it defaults to using the classic compiler, but just set CompilerVersion parameter to v3.5 and suddenly you can use LINQ! Compiler v3.5 should be compatible with v2.0, but I didn’t want to risk breaking any mission critical scripts because of some subtle redbit that I didn’t know about. You should be able to change the default value yourself from v2.0 to v3.5 on your own without too much fear.
I was going to give a few examples of the advantages of being able to use extension methods in post compiled code, show how much easier it is now to use LINQ, and how much fun it is to play with LINQed lists(really they are like magic), but that was going to turn into a very long winded post. A person could go on forever about LINQ and extension methods, but we already know how great that stuff is because we use Powershell and we love the pipe!

Link To New-CAssenbly.ps1

Advertisements

~ by lunaticexperimentalist on August 31, 2008.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: