Updated to newer version of roslyn

This commit is contained in:
David Fowler 2014-03-04 22:59:48 -08:00
parent 710b9ad4ed
commit 05e0d5cabb
2 changed files with 8 additions and 11 deletions

View File

@ -48,7 +48,9 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
if (!result.Success)
{
var messages = result.Diagnostics.Where(IsError).Select(d => GetCompilationMessage(d));
var formatter = new DiagnosticFormatter();
var messages = result.Diagnostics.Where(IsError).Select(d => GetCompilationMessage(formatter, d));
return Task.FromResult(CompilationResult.Failed(content, messages));
}
@ -61,13 +63,8 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
return Task.FromResult(CompilationResult.Successful(String.Empty, type));
}
private CompilationMessage GetCompilationMessage(Diagnostic diagnostic)
private CompilationMessage GetCompilationMessage(DiagnosticFormatter formatter, Diagnostic diagnostic)
{
#if NET45
var formatter = DiagnosticFormatter.Instance;
#else
var formatter = new DiagnosticFormatter();
#endif
return new CompilationMessage(formatter.Format(diagnostic));
}

View File

@ -9,10 +9,10 @@
"Microsoft.AspNet.Mvc.ModelBinding" : "",
"Microsoft.AspNet.Mvc.Rendering" : "",
"Microsoft.AspNet.Mvc.Razor.Host" : "",
"Microsoft.CodeAnalysis" : "0.6.31123.2",
"Microsoft.CodeAnalysis.CSharp" : "0.6.31123.2",
"System.Reflection.Metadata.Ecma335": "0.6.31123.2",
"System.Collections.Immutable" : "1.1.15.0"
"Microsoft.CodeAnalysis.Common" : "0.6.4021001-beta",
"Microsoft.CodeAnalysis.CSharp" : "0.6.4021001-beta",
"System.Reflection.Metadata.Ecma335": "0.6.4021001-beta",
"Microsoft.Bcl.Immutable" : "1.1.17-beta"
},
"configurations": {
"net45" : {