Browse Source

Fix .NET 3.5 Build Worker: use x86 target platform as the .NET 3.5 runtime does not support AnyCPU (32-bit preferred)

Use .NET 4.0 Build Worker for Tools.build.
pull/38/head
Daniel Grunwald 12 years ago
parent
commit
c22d50bf3f
  1. 25
      src/Main/Base/Project/Src/Project/MSBuildFileProject.cs
  2. 3
      src/Main/ICSharpCode.SharpDevelop.BuildWorker35/ICSharpCode.SharpDevelop.BuildWorker35.csproj
  3. 2
      src/Tools/Tools.build

25
src/Main/Base/Project/Src/Project/MSBuildFileProject.cs

@ -2,9 +2,9 @@ @@ -2,9 +2,9 @@
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
using System;
using System.IO;
using System.Threading.Tasks;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
using System.Xml;
namespace ICSharpCode.SharpDevelop.Project
{
@ -13,8 +13,29 @@ namespace ICSharpCode.SharpDevelop.Project @@ -13,8 +13,29 @@ namespace ICSharpCode.SharpDevelop.Project
/// </summary>
public class MSBuildFileProject : AbstractProject
{
SolutionFormatVersion minimumSolutionVersion = SolutionFormatVersion.VS2005;
public MSBuildFileProject(ProjectLoadInformation information) : base(information)
{
try {
using (XmlReader r = XmlReader.Create(information.FileName, new XmlReaderSettings { IgnoreComments = true, XmlResolver = null })) {
if (r.Read() && r.MoveToContent() == XmlNodeType.Element) {
string toolsVersion = r.GetAttribute("ToolsVersion");
Version v;
if (Version.TryParse(toolsVersion, out v)) {
if (v >= new Version(4, 0)) {
minimumSolutionVersion = SolutionFormatVersion.VS2010; // use 4.0 Build Worker
}
}
}
}
} catch (XmlException) {
} catch (IOException) {
}
}
public override SolutionFormatVersion MinimumSolutionVersion {
get { return minimumSolutionVersion; }
}
public override Task<bool> BuildAsync(ProjectBuildOptions options, IBuildFeedbackSink feedbackSink, IProgressMonitor progressMonitor)

3
src/Main/ICSharpCode.SharpDevelop.BuildWorker35/ICSharpCode.SharpDevelop.BuildWorker35.csproj

@ -18,12 +18,11 @@ @@ -18,12 +18,11 @@
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<FileAlignment>4096</FileAlignment>
<Prefer32Bit>True</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>

2
src/Tools/Tools.build

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0" DefaultTargets="Build">
<PropertyGroup>
<LanguageResourcePath>..\..\data\resources\</LanguageResourcePath>
</PropertyGroup>

Loading…
Cancel
Save