Suppress obsolete warnings
This commit is contained in:
parent
52d5164db8
commit
e094d2579e
|
|
@ -6,8 +6,8 @@
|
|||
<InternalAspNetCoreSdkPackageVersion>2.2.0-preview1-17102</InternalAspNetCoreSdkPackageVersion>
|
||||
<MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreAuthenticationCookiesPackageVersion>
|
||||
<MicrosoftAspNetCoreHostingPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreHostingPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreMvcPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcPackageVersion>2.2.0-a-preview1-obs-18917</MicrosoftAspNetCoreMvcPackageVersion>
|
||||
<MicrosoftAspNetCoreMvcRazorPagesPackageVersion>2.2.0-a-preview1-obs-18917</MicrosoftAspNetCoreMvcRazorPagesPackageVersion>
|
||||
<MicrosoftAspNetCoreRazorDesignPackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorDesignPackageVersion>
|
||||
<MicrosoftAspNetCoreRazorRuntimePackageVersion>2.2.0-preview1-34823</MicrosoftAspNetCoreRazorRuntimePackageVersion>
|
||||
<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.
|
||||
compilation = ExpressionRewriter.Rewrite(compilation);
|
||||
var compilationContext = new RoslynCompilationContext(compilation);
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
MvcServiceProvider.ViewEngineOptions.CompilationCallback(compilationContext);
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
compilation = AssemblyMetadataGenerator.AddAssemblyMetadata(
|
||||
compiler,
|
||||
compilationContext.Compilation,
|
||||
|
|
|
|||
|
|
@ -29,8 +29,10 @@ namespace ApplicationWithConfigureStartup
|
|||
{
|
||||
builder.AddRazorOptions(options =>
|
||||
{
|
||||
#pragma warning disable CS0618 // Type or member is obsolete
|
||||
var callback = options.CompilationCallback;
|
||||
options.CompilationCallback = context =>
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
{
|
||||
callback(context);
|
||||
foreach (var tree in context.Compilation.SyntaxTrees)
|
||||
|
|
|
|||
Loading…
Reference in New Issue