Suppress obsolete warnings
This commit is contained in:
parent
52d5164db8
commit
e094d2579e
|
|
@ -6,8 +6,8 @@
|
||||||
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-17102</InternalAspNetCoreSdkPackageVersion>
|
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-17102</InternalAspNetCoreSdkPackageVersion>
|
||||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||||
<MicrosoftAspNetCoreHostingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHostingPackageVersion>
|
<MicrosoftAspNetCoreHostingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHostingPackageVersion>
|
||||||
<MicrosoftAspNetCoreMvcPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreMvcPackageVersion>
|
<MicrosoftAspNetCoreMvcPackageVersion>2.2.0-a-preview1-obs-18917</MicrosoftAspNetCoreMvcPackageVersion>
|
||||||
<MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
|
<MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.2.0-a-preview1-obs-18917</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
|
||||||
<MicrosoftAspNetCoreRazorDesignPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorDesignPackageVersion>
|
<MicrosoftAspNetCoreRazorDesignPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorDesignPackageVersion>
|
||||||
<MicrosoftAspNetCoreRazorRuntimePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorRuntimePackageVersion>
|
<MicrosoftAspNetCoreRazorRuntimePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorRuntimePackageVersion>
|
||||||
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-preview1-34823</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
<MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>0.6.0-preview1-34823</MicrosoftAspNetCoreServerIntegrationTestingPackageVersion>
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,9 @@ namespace Microsoft.AspNetCore.Mvc.Razor.ViewCompilation.Internal
|
||||||
// Post process the compilation - run ExpressionRewritter and any user specified callbacks.
|
// Post process the compilation - run ExpressionRewritter and any user specified callbacks.
|
||||||
compilation = ExpressionRewriter.Rewrite(compilation);
|
compilation = ExpressionRewriter.Rewrite(compilation);
|
||||||
var compilationContext = new RoslynCompilationContext(compilation);
|
var compilationContext = new RoslynCompilationContext(compilation);
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
MvcServiceProvider.ViewEngineOptions.CompilationCallback(compilationContext);
|
MvcServiceProvider.ViewEngineOptions.CompilationCallback(compilationContext);
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
compilation = AssemblyMetadataGenerator.AddAssemblyMetadata(
|
compilation = AssemblyMetadataGenerator.AddAssemblyMetadata(
|
||||||
compiler,
|
compiler,
|
||||||
compilationContext.Compilation,
|
compilationContext.Compilation,
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,10 @@ namespace ApplicationWithConfigureStartup
|
||||||
{
|
{
|
||||||
builder.AddRazorOptions(options =>
|
builder.AddRazorOptions(options =>
|
||||||
{
|
{
|
||||||
|
#pragma warning disable CS0618 // Type or member is obsolete
|
||||||
var callback = options.CompilationCallback;
|
var callback = options.CompilationCallback;
|
||||||
options.CompilationCallback = context =>
|
options.CompilationCallback = context =>
|
||||||
|
#pragma warning restore CS0618 // Type or member is obsolete
|
||||||
{
|
{
|
||||||
callback(context);
|
callback(context);
|
||||||
foreach (var tree in context.Compilation.SyntaxTrees)
|
foreach (var tree in context.Compilation.SyntaxTrees)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue