http://maliger.webpark.cz/binaries.zip 
http://maliger.webpark.cz/sources.zip 
http://maliger.webpark.cz/nant.vsnet.diff.zip 

Hello,
 
finally I get first working version of MSBuild support to NAnt. I hope, you
would like it.
 
 
[for you lazy guys: copy attached binaries to latest NAnt bin folder and
change <solution> to <msbuild-solution>. maybe it'll just work :-) ]
[rename .archive to .zip]
 
 
As we discuss I implement <msbuild> task as simple wrapper around
MSBuild.exe. It works and this task could be even compiled under 1.0/1.1
profile, and it will work as long as target framework is set to net-2.0.
 
Than I implement same task in different fassion. Named it <msbuild2>
temporarily. This time its written against MSBuild classes exposed via
Microsoft.Build.Engine assembly. It is faster and could potentially support
more features but have one drawback: it has to be compiled under net-2.0
framework. But I don't think it is big problem. I place it into separete
assembly (NAnt.MSBuild) and this should be loaded only when running under
net-2.0. But cross-compiling is impossible (not big issue in mine eyes).
 
Which way you like more?
 
 
Last, and propably most important: <msbuild-solution> !
 
I tried it several times, and several times rewrote it from scratch. Becouse
I found that MSBuild do not have good inter-process-dependency handling and
moreover there is some special NAnt features in current <solution> which I
need, I implement <msbuild-solution> as direct descendant of <solution>. In
future it could be simply merged here (if net-2.0 dependency is not an
issue).
 
It have several pros:
- .net 2003/2005 project mix should work
- VC++/c#/vb project mix should work (not sure about vc++ from 2005)
- MSBuild is called for new .*proj files, current techniques for old ones.
- .sln support (I don't test this yet)
- all reference resolution in NAnt (support for <assemblyFolders>, outdir
and all other NAnt specials)
 
To allow this, I make (quite simple) patch to current solution. Mostly it
consist of remove static modifier from ProjectFactory. No broken test atleas
in mine box.
<msbuild-solution> itself is in NAnt.MSBuild assembly but uses classes from
NAnt.VSNet. Just override few methods to allow new project format parsing.
(Ok, I dont parse it, I just sent it to msbuild).
 
One word to the end: It'll propably not work to 100% msbuild projects, but
it should work very simmilary to how VS works - so normal, even customized,
projects should work.
 
 
Regards,
Martin
 
btw: I hope, you'll like this late xmas gift from me to community!
btw2: does anyone had time to try run MSBuild under mono? Maybe it works? (I
fould some Ant/mono/msbuild blogs but dont try myself).



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to