Revert "[xbuild] Fix building with 2.0 toolset"
authorZoltan Varga <vargaz@gmail.com>
Fri, 4 Apr 2014 18:58:34 +0000 (14:58 -0400)
committerZoltan Varga <vargaz@gmail.com>
Fri, 4 Apr 2014 18:58:34 +0000 (14:58 -0400)
This reverts commit 2086958399f30a8b7a997203c87d92dab2b507ce.

Revert this as it breaks the build:

MCS [net_2_0] Microsoft.Build.Engine.dll
Microsoft.Build.BuildEngine/Engine.cs(114,81): error CS0117: Microsoft.Build.Utilities.TargetDotNetFrameworkVersion' does not contain a definition forVersion30'
/root/my-mono-fork/mcs/class/Microsoft.Build.Engine/./../../class/lib/net_2_0/Microsoft.Build.Utilities.dll (Location of the symbol related to previous error)
Microsoft.Build.BuildEngine/Engine.cs(116,81): error CS0117: Microsoft.Build.Utilities.TargetDotNetFrameworkVersion' does not contain a definition forVersion35'
/root/my-mono-fork/mcs/class/Microsoft.Build.Engine/./../../class/lib/net_2_0/Microsoft.Build.Utilities.dll (Location of the symbol related to previous error)
Compilation failed: 2 error(s), 0 warnings

mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetFrameworkPath.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TargetDotNetFrameworkVersion.cs
mcs/tools/xbuild/data/2.0/Microsoft.Common.targets

index 3ab6979ef9a0af4ed6a55cf04f6c7b3eb97f8ee2..452d8c0600868d78ffa4ab7075776192c9b7f60d 100644 (file)
@@ -55,7 +55,6 @@ namespace Microsoft.Build.Tasks {
                        }
                }
 
-#if NET_3_5
                [Output]
                public string FrameworkVersion11Path {
                        get {
@@ -87,7 +86,6 @@ namespace Microsoft.Build.Tasks {
                                                TargetDotNetFrameworkVersion.Version35);
                        }
                }
-#endif
 
 #if NET_4_0
                [Output]
index 8b667ced1ba6ecee695aa67cfd269be4a91bbcc6..04940d5e8badbdce51fbf6219c40685962021d7d 100644 (file)
@@ -40,10 +40,8 @@ namespace Microsoft.Build.Utilities
        {
                Version11,
                Version20,
-#if NET_3_5
                Version30,
                Version35,
-#endif
 #if NET_4_0
                Version40,
 #endif
@@ -60,10 +58,8 @@ namespace Microsoft.Build.Utilities
                VersionLatest = Version45
 #elif NET_4_0
                VersionLatest = Version40
-#elif NET_3_5
-               VersionLatest = Version35
 #else
-               VersionLatest = Version20
+               VersionLatest = Version35
 #endif
        }
 }
index 31fd0bc580a611201908f7868b38314c7f51f0eb..fef699031c685585f7b345cf04e17e22d85935bc 100644 (file)
        </PropertyGroup>
        <Target Name="GetFrameworkPaths" DependsOnTargets="$(GetFrameworkPathsDependsOn)">
                <GetFrameworkPath>
-                       <Output
-                               TaskParameter="Path"
+                       <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
+                               TaskParameter="FrameworkVersion35Path"
+                               ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+                       <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+                               TaskParameter="FrameworkVersion30Path"
+                               ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
+                       <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+                               TaskParameter="FrameworkVersion20Path"
                                ItemName="_CombinedTargetFrameworkDirectoriesItem"/>
                </GetFrameworkPath>
                <CreateProperty Value="@(_CombinedTargetFrameworkDirectoriesItem)">
                </CreateProperty>
 
                <Warning Text="TargetFrameworkVersion '$(TargetFrameworkVersion)' not supported by this toolset (ToolsVersion: $(MSBuildToolsVersion))."
-                       Condition="'$(TargetFrameworkVersion)' != 'v2.0'"/>
+                       Condition="'$(TargetFrameworkVersion)' != 'v3.5' and '$(TargetFrameworkVersion)' != 'v3.0' and '$(TargetFrameworkVersion)' != 'v2.0'"/>
        </Target>
 
        <PropertyGroup>