Robert McLaws: FunWithCoding.NET

Public Shared Function BrainDump(ByVal dotNet As String) As [Value]

News

<script type="text/javascript"><!-- google_ad_client = "pub-4330602465258980"; google_hints = "ASP.NET, VB.NET, C#, C#.NET, WindowsForms, .NET Framework, VS2005, Visual Studio, XAML, WinFX, Windows Workflow, WPF, WCF, Atlas, NetFX3, Visual Studio Orcas"; google_ad_width = 120; google_ad_height = 240; google_ad_format = "120x240_as"; google_ad_type = "text_image"; google_ad_channel ="4997399242"; google_color_border = "B6C9E7"; google_color_bg = "EFEFEF"; google_color_link = "0000FF"; google_color_text = "000000"; google_color_url = "002C99"; //--></script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<!--
-->

You should feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever. That said, I will most likely only delete abusive, profane, rude, or annonymous comments, so keep it polite, please.

Blogroll

Cool .NET Articles

My .NET Tools

My Builder.com Articles

My MSKB Articles

Fed Up With Project Versions

It's kind of a pain in the butt to have to compile stuff to two different versions of the Framework. I haven't dived into Whidbey too much, but I sure hope MSBuild lets you define which version of the Framework you want to target (I'm pretty sure it does, but I could be wrong). At any rate, I have to maintain two versions of my projects and solutions. It's kind of a pain to go through and edit my project and solution files after I'm finished with the 2003 version so I can compile in 2002, so I spent most of the night coming up with this solution: The VS.NET Version Commander.

Basically, what it does is, take a *.sln, *.vbproj, or *.csproj file, recognizes what version it is, and copies it to a new set of files, based on the settings in the “Options” dialog. Since Configuration.AppSettings is read only, I'm debating what the best way to store the program settings. I found a couple samples online that might help, but they're pretty complicated (go figure).

So, if you select a solution file, it will give you the option to convert each project in the solution (as shown). It will also go through and change any “3300” in the files to “5000”, and any reference to “1.0.3705” to “1.1.4322”. Finally, it will have the option of adding my “NET11” compilation directive to the VS.NET 2003 file, so that when it compiles, it picks up any places where I broke apart the functionality. Finally, it will let me save the per-project settings to a separate file  for use later.

I'm leaving the door open to the possibilty of having it just convert single project files between versions, but this is really more of an internal tool, designed for the versioning processes that I have discussed many times in the past. Anyone that follows our guidelines for that stuff will probably find this useful.

I forgot how much fun it was to create WinForms apps. I think I'm getting the hang of threading. At any rate, expect this one to be online later in the week.

Comments

SBC said:

Love that .NET ambulance logo!
# November 16, 2003 7:28 AM

Robert McLaws said:

Thanks, it's my fav too. Paul at Xheo.com does a great job with all of my product logos.
# November 16, 2003 7:45 AM

Robert McLaws said:

I have yet to really talk about what Codeside Assistance is, but you can go find out now at http://www.codesideassistance.com
# November 16, 2003 7:54 AM

Damian said:

Have you considered nAnt ? It is what MSBuild is based on, and will run multiple compiles now.
# November 16, 2003 7:56 AM

Yosi Taguri said:

just w8ing to add it to my toolbox ;)
# November 16, 2003 7:59 AM

Robert McLaws said:

Damian,

While nAnt is similar to MSBuild in concept, it is quite different in terms of how it operates. But yes I am looking into it. I'm pretty sure that you'd still have to have 2 sets of project/solution files, but again I could be mistaken. If you find more information on that, can you send me a URL? Thanks.
-Robert
# November 16, 2003 8:06 AM

Damian said:

Just figuring it out myself. But basically, everything is configurable. You could have two tasks within the one build file. One for each compiler.

From this :
http://www.mail-archive.com/nant-users@lists.sourceforge.net/msg00773.html

I figure you can do :

<property name="nant.settings.currentframework" value = "net-1.1"/>

and compile

then set
<property name="nant.settings.currentframework" value = "net-1.0"/>

and compile again.

It looks like it's working here but I only have 1.1 installed right now.


# November 16, 2003 8:37 AM