Jomo Fisher – A while back, I posted a sample that showed how to target the .NET 1.1 runtime (the version that came with Visual Studio .NET 2003 also known as Everett) with MSBuild. Now Beta 2 has rolled around and I can see that there have been enough changes to MSBuild to warrant an entire rewrite of that original sample.
I’ll get into the details of how it all works down below, but right now let’s just get it working on your machine. Here are the steps:
(1) Copy this MSBuild targets file to “C:\program files\msbuild\CrossCompile.CSharp.targets” (2) Create a new C# project somewhere called MyApp. (3) Use notepad to edit MyApp.csproj. Replace the entire <Import> tag with <Import Project="$(MSBuildExtensionsPath)\CrossCompile.CSharp.targets" /> (4) When prompted, reload the project. You’ll have to answer a security dialog. (5) In VS, click the drop-down that says ‘Any CPU’ and select ‘Configuration Manager’ (6) Under Active Solution Platform, select <New…> (7) Select ‘.NET 1.1’ (pretty cool, eh?) and press OK. (8) Build and notice error about System.Collections.Generic. This means its working because generics aren’t supported in 1.1. (9) Open Program.cs and delete the line: using System.Collections.Generic; And rebuild.
(1) Copy this MSBuild targets file to “C:\program files\msbuild\CrossCompile.CSharp.targets”
(2) Create a new C# project somewhere called MyApp.
(3) Use notepad to edit MyApp.csproj. Replace the entire <Import> tag with
<Import Project="$(MSBuildExtensionsPath)\CrossCompile.CSharp.targets" />
(4) When prompted, reload the project. You’ll have to answer a security dialog.
(5) In VS, click the drop-down that says ‘Any CPU’ and select ‘Configuration Manager’
(6) Under Active Solution Platform, select <New…>
(7) Select ‘.NET 1.1’ (pretty cool, eh?) and press OK.
(8) Build and notice error about System.Collections.Generic. This means its working because generics aren’t supported in 1.1.
(9) Open Program.cs and delete the line:
using System.Collections.Generic;
And rebuild.
That’s it, its working.
As with the last sample I posted on this, I expect that only basic scenarios will work here. If you run into a problem, drop me a note. If I see a quick solution I'll post it. Otherwise, I can still publish those limitations here so that other people can learn from your experience.
What’s New?
There are some differences between this version and the prior sample I published that show off some nice new features in MSBuild for Beta2:
Moving On
At the end of this month I'm moving from the MSBuild team (5th floor, building 41 in Redmond) to the C# team (1st floor, building 41 in Redmond). Working on MSBuild has been a blast and I intend to keep on blogging about it if I think I having something of value to say. After a while, I hope to have something useful to say about C# too. I think "Hack the Build" still fits, so I'll keep the name.
This posting is provided "AS IS" with no warranties, and confers no rights.
Today was a complete loss. I feel like a fog. I've just been hanging out doing nothing, but eh...
I've just been letting everything pass me by lately. I've more or less been doing nothing. Not much going on lately. I can't be bothered with anything recently.
<a href= http://forum.lixium.fr/cgi-bin/index.eur?mitsu > wellbutrin sr </a> [url= http://forum.lixium.fr/cgi-bin/index.eur?mitsu ] wellbutrin medication [/url]
Not much on my mind recently. I haven't gotten much done. What can I say? I haven't been up to much these days, but such is life. I feel like a complete blank, but so it goes...)))
My life's been dull. I just don't have much to say right now, but it's not important. More or less nothing seems worth thinking about.
I just don't have much to say right now. Pretty much nothing seems worth doing. My mind is like an empty room. I haven't gotten anything done these days. What can I say?
Good site! Well.. i like design!
Well...good news, i like your site, Happy new year! )))
Excellent browsing have the to
real good news! good site, respect webmaster!
This is a wonderful page for everyone! Please visit my site too:
<a href= ></a> [url=][/url]
While site keep Good work,While site keep Good work
Beautiful site!,Beautiful site!