Bugs item #1985576, was opened at 2008-06-05 16:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1985576&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Framework support
Group: 0.86
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: tomthorne (tomthorne)
Assigned to: Nobody/Anonymous (nobody)
Summary: solution task (via MSBuildProject) cannot build 2008 csproj

Initial Comment:
0.86-beta 1

(1) Msbuild engine 3.5 not backwards compatible with msbuild 2.0 due to 
$(MSBuildToolsPath) used instead of $(MSBuildBinPath)
(2) VS2008 uses MSBuildToolsPath in its projects, so want to support msbuild 3.5
(3) NAnt shipped with MSBuildProject built against msbuild 2.0
(4) cannot just use a binding redirect since msbuild 3.5 has changed the name 
of 1 of the assemblies (Microsoft.Build.Utilities.v3.5.dll)

My workaround:
1. edit NAnt.MSBuild.build task to build a 3.5 specific version referencing 
Microsoft.Build 3.5
2. fix Nant.Console App.config
- correct ref assemblies from Microsoft.Build.Utilities.dll to 
Microsoft.Build.Utilities.v3.5.dll
- correct scan paths from 2.0 to 3.5
- add suppoted runtime
- added binding redirect so that don't get GetWinFXPath error 

Patches are here:
App.config
384c384
<                         <include name="Microsoft.Build.Utilities.dll" />
---
>                         <!-- include name="Microsoft.Build.Utilities.dll" /-->
417a418
>                         <include name="Microsoft.Build.Utilities.v3.5.dll" />
449,450c450
<                         <!-- include MS.NET 2.0 specific assemblies -->
<                         <include name="extensions/net/2.0/**/*.dll" />
---
>                         <include name="extensions/net/3.5/**/*.dll" />
455,456c455
<                         <!-- include .NET 2.0 specific assemblies -->
<                         <include name="extensions/common/2.0/**/*.dll" />
---
>                         <include name="extensions/common/3.5/**/*.dll" />
1907a1907,1914
> 
>             <dependentAssembly>
>                 <assemblyIdentity name="Microsoft.Build.Framework"
>                                   publicKeyToken="b03f5f7f11d50a3a"
>                                   culture="neutral" />
>                 <bindingRedirect oldVersion="2.0.0.0"
>                                  newVersion="3.5.0.0"/>
>              </dependentAssembly>
1908a1916
>          
1911c1919
<         <!-- .NET Framework 2.0 -->
---
>         <supportedRuntime version="v3.5.21022" />

NAnt.MSBuild.build

1c1
< <?xml version="1.0"?>
---
> <?xml version="1.0"?>
10c10
<     <target name="build" if="${framework::exists('net-2.0') or 
framework::exists('mono-2.0') or framework::exists('net-3.5') }">
---
>     <target name="build" if="${framework::exists('net-2.0') or 
> framework::exists('mono-2.0')}">
14,46d13
< 
<         <if test="${framework::exists('net-3.5')}">
<             <!-- modify target framework to .NET 2.0 -->
<             <property name="nant.settings.currentframework" value="net-3.5" />
< 
<         <mkdir dir="${build.dir}/bin/extensions/common/3.5" />
< 
<         <!-- build main assembly -->
<         <csc verbose="true" target="library" 
define="${current.build.defines}" warnaserror="${build.warnaserror}" 
debug="${build.debug}" 
output="${build.dir}/bin/extensions/common/3.5/${project::get-name()}.dll" 
doc="${build.dir}/bin/extensions/common/3.5/${project::get-name()}.xml">
<             <sources>
<                 <include name="**/*.cs" />
<                 <!-- common assembly-level attributes -->
<                 <include name="../CommonAssemblyInfo.cs" />
<             </sources>
<             <references>
<                 <include name="Microsoft.Build.Engine.dll" />
<                 <include name="Microsoft.Build.Framework.dll" />
<                 <include name="Microsoft.Build.Utilities.v3.5.dll" />
<                 <include name="${build.dir}/bin/NAnt.Core.dll" />
<                 <include name="${build.dir}/bin/NAnt.DotNetTasks.dll" />
<                 <include name="${build.dir}/bin/NAnt.VSNetTasks.dll" />
<             </references>
<             <resources prefix="NAnt.MSBuild" dynamicprefix="true">
<                 <include name="Resources/**/*" />
<             </resources>
<         </csc>
< 
<         </if>
< 
<        
< 
<         <if test="${framework::exists('net-3.5') == false }">
< 
57,58d23
< 
< 
81d45
<         </if>




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1985576&group_id=31650

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to