Updated to newer version of roslyn
This commit is contained in:
parent
710b9ad4ed
commit
05e0d5cabb
|
|
@ -48,7 +48,9 @@ namespace Microsoft.AspNet.Mvc.Razor.Compilation
|
||||||
|
|
||||||
if (!result.Success)
|
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));
|
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));
|
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));
|
return new CompilationMessage(formatter.Format(diagnostic));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,10 @@
|
||||||
"Microsoft.AspNet.Mvc.ModelBinding" : "",
|
"Microsoft.AspNet.Mvc.ModelBinding" : "",
|
||||||
"Microsoft.AspNet.Mvc.Rendering" : "",
|
"Microsoft.AspNet.Mvc.Rendering" : "",
|
||||||
"Microsoft.AspNet.Mvc.Razor.Host" : "",
|
"Microsoft.AspNet.Mvc.Razor.Host" : "",
|
||||||
"Microsoft.CodeAnalysis" : "0.6.31123.2",
|
"Microsoft.CodeAnalysis.Common" : "0.6.4021001-beta",
|
||||||
"Microsoft.CodeAnalysis.CSharp" : "0.6.31123.2",
|
"Microsoft.CodeAnalysis.CSharp" : "0.6.4021001-beta",
|
||||||
"System.Reflection.Metadata.Ecma335": "0.6.31123.2",
|
"System.Reflection.Metadata.Ecma335": "0.6.4021001-beta",
|
||||||
"System.Collections.Immutable" : "1.1.15.0"
|
"Microsoft.Bcl.Immutable" : "1.1.17-beta"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"net45" : {
|
"net45" : {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue