fix build break due to dnx resource change

This commit is contained in:
Kirthi Krishnamraju 2015-09-01 23:31:09 -07:00
parent 229724c4ea
commit 7a3f34089f
1 changed files with 13 additions and 6 deletions

View File

@ -15,6 +15,7 @@ using Microsoft.AspNet.Mvc.Razor.Internal;
using Microsoft.AspNet.Razor.Runtime.TagHelpers; using Microsoft.AspNet.Razor.Runtime.TagHelpers;
using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.CSharp;
using Microsoft.Dnx.Compilation;
using Microsoft.Dnx.Compilation.CSharp; using Microsoft.Dnx.Compilation.CSharp;
using Microsoft.Dnx.Runtime; using Microsoft.Dnx.Runtime;
using Microsoft.Framework.Caching.Memory; using Microsoft.Framework.Caching.Memory;
@ -169,18 +170,24 @@ namespace Microsoft.AspNet.Mvc.Razor.Precompilation
} }
else else
{ {
var assemblyResource = new ResourceDescription(assemblyResourceName, var assemblyResource = new ResourceDescriptor()
() => GetNonDisposableStream(assemblyStream), {
isPublic: true); FileName = Path.GetFileName(assemblyResourceName),
Name = assemblyResourceName,
StreamFactory = () => GetNonDisposableStream(assemblyStream)
};
CompileContext.Resources.Add(assemblyResource); CompileContext.Resources.Add(assemblyResource);
string symbolsResourceName = null; string symbolsResourceName = null;
if (pdbStream != null) if (pdbStream != null)
{ {
symbolsResourceName = resourcePrefix + ".pdb"; symbolsResourceName = resourcePrefix + ".pdb";
var pdbResource = new ResourceDescription(symbolsResourceName, var pdbResource = new ResourceDescriptor()
() => GetNonDisposableStream(pdbStream), {
isPublic: true); FileName = Path.GetFileName(symbolsResourceName),
Name = symbolsResourceName,
StreamFactory = () => GetNonDisposableStream(pdbStream)
};
CompileContext.Resources.Add(pdbResource); CompileContext.Resources.Add(pdbResource);
} }