Skip to content

Commit

Permalink
Removed ifdef DNX451 from MSBuild.
Browse files Browse the repository at this point in the history
  • Loading branch information
hal-ler committed Apr 14, 2016
1 parent 5e5aa83 commit 6c38dc1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
4 changes: 1 addition & 3 deletions src/OmniSharp.MSBuild/MSBuildLogForwarder.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if DNX451
using System;
using System.Collections.Generic;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -72,5 +71,4 @@ private void OnWarning(object sender, Microsoft.Build.Framework.BuildWarningEven
});
}
}
}
#endif
}
4 changes: 0 additions & 4 deletions src/OmniSharp.MSBuild/MSBuildProjectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ public void Initalize(IConfiguration configuration)
}

var compilationOptions = new CSharpCompilationOptions(projectFileInfo.OutputKind);
#if DNX451
compilationOptions = compilationOptions.WithAssemblyIdentityComparer(DesktopAssemblyIdentityComparer.Default);
#endif

if (projectFileInfo.AllowUnsafe)
{
Expand Down Expand Up @@ -317,10 +315,8 @@ private void UpdateProject(ProjectFileInfo projectFileInfo)
{
continue;
}
#if DNX451
var analyzerReference = new AnalyzerFileReference(analyzerPath, new SimpleAnalyzerAssemblyLoader());
project.AddAnalyzerReference(analyzerReference);
#endif
}
}

Expand Down
8 changes: 0 additions & 8 deletions src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
using System.IO;
using System.Linq;
using System.Runtime.Versioning;
#if DNX451
using Microsoft.Build.BuildEngine;
using Microsoft.Build.Evaluation;
#endif
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -54,7 +52,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
var projectFileInfo = new ProjectFileInfo();
projectFileInfo.ProjectFilePath = projectFilePath;

#if DNX451
if (!PlatformHelper.IsMono)
{
var properties = new Dictionary<string, string>
Expand Down Expand Up @@ -215,9 +212,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
projectFileInfo.DefineConstants = defineConstants.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries).Distinct().ToList();
}
}
#else
// TODO: Shell out to msbuild/xbuild here?
#endif
return projectFileInfo;
}

Expand All @@ -240,7 +234,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str
}
}

#if DNX451
static class DictionaryExt
{
public static string GetPropertyValue(this Dictionary<string, BuildProperty> dict, string key)
Expand All @@ -250,5 +243,4 @@ public static string GetPropertyValue(this Dictionary<string, BuildProperty> dic
: null;
}
}
#endif
}

0 comments on commit 6c38dc1

Please sign in to comment.