From 6c38dc10301878e09b9ab9c814da3ab15c01d203 Mon Sep 17 00:00:00 2001 From: hal-ler Date: Thu, 14 Apr 2016 17:39:42 +0200 Subject: [PATCH] Removed ifdef DNX451 from MSBuild. --- src/OmniSharp.MSBuild/MSBuildLogForwarder.cs | 4 +--- src/OmniSharp.MSBuild/MSBuildProjectSystem.cs | 4 ---- src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs | 8 -------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/OmniSharp.MSBuild/MSBuildLogForwarder.cs b/src/OmniSharp.MSBuild/MSBuildLogForwarder.cs index 79966351c1..e34ba84943 100644 --- a/src/OmniSharp.MSBuild/MSBuildLogForwarder.cs +++ b/src/OmniSharp.MSBuild/MSBuildLogForwarder.cs @@ -1,4 +1,3 @@ -#if DNX451 using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; @@ -72,5 +71,4 @@ private void OnWarning(object sender, Microsoft.Build.Framework.BuildWarningEven }); } } -} -#endif +} \ No newline at end of file diff --git a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs index bdd9304ff5..3ebdeb90be 100644 --- a/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs +++ b/src/OmniSharp.MSBuild/MSBuildProjectSystem.cs @@ -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) { @@ -317,10 +315,8 @@ private void UpdateProject(ProjectFileInfo projectFileInfo) { continue; } -#if DNX451 var analyzerReference = new AnalyzerFileReference(analyzerPath, new SimpleAnalyzerAssemblyLoader()); project.AddAnalyzerReference(analyzerReference); -#endif } } diff --git a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs index dca3053878..1d1f3a62b7 100644 --- a/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs +++ b/src/OmniSharp.MSBuild/ProjectFile/ProjectFileInfo.cs @@ -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; @@ -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 @@ -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; } @@ -240,7 +234,6 @@ public static ProjectFileInfo Create(MSBuildOptions options, ILogger logger, str } } - #if DNX451 static class DictionaryExt { public static string GetPropertyValue(this Dictionary dict, string key) @@ -250,5 +243,4 @@ public static string GetPropertyValue(this Dictionary dic : null; } } - #endif }