From 55e9adf84d6afdf2c79517d306b1732284030b02 Mon Sep 17 00:00:00 2001 From: Pranav Krishnamoorthy Date: Thu, 9 Jun 2016 17:10:04 -0700 Subject: [PATCH] Generate portable pdbs in coreclr --- .../Internal/DefaultRoslynCompilationService.cs | 9 +++++++-- .../Internal/SymbolsUtility.cs | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs index ec074069d2..8fbb8945f4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/DefaultRoslynCompilationService.cs @@ -27,9 +27,14 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal /// public class DefaultRoslynCompilationService : ICompilationService { - private readonly DebugInformationFormat _pdbFormat = SymbolsUtility.SupportsFullPdbGeneration() ? - DebugInformationFormat.Pdb : + private readonly DebugInformationFormat _pdbFormat = +#if NET451 + SymbolsUtility.SupportsFullPdbGeneration() ? + DebugInformationFormat.Pdb : + DebugInformationFormat.PortablePdb; +#else DebugInformationFormat.PortablePdb; +#endif private readonly ApplicationPartManager _partManager; private readonly IFileProvider _fileProvider; private readonly Action _compilationCallback; diff --git a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/SymbolsUtility.cs b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/SymbolsUtility.cs index f7889a2b3b..15048f3ae6 100644 --- a/src/Microsoft.AspNetCore.Mvc.Razor/Internal/SymbolsUtility.cs +++ b/src/Microsoft.AspNetCore.Mvc.Razor/Internal/SymbolsUtility.cs @@ -1,6 +1,7 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. +#if NET451 using System; using System.Runtime.InteropServices; @@ -42,4 +43,5 @@ namespace Microsoft.AspNetCore.Mvc.Razor.Internal return false; } } -} \ No newline at end of file +} +#endif \ No newline at end of file