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