Skip to content

RazorRuntimeCompilation fails when a non-managed dll is part of the project. #18699

Open
@Buildstarted

Description

@Buildstarted

Describe the bug

Whenever a non-managed dll is included in the bin folder during debug RazorRuntimeCompilation fails with the following error: Metadata file '...gsdll64.dll' could not be opened -- PE image doesn't contain managed metadata.

To Reproduce

New project with nuget packages

Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
Ghostscript

Create a simple controller with a razor page. Load the page in debug mode, modify the razor page, and refresh.

Startup:

        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllersWithViews().AddRazorRuntimeCompilation();
        }

        public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
        {
            app.UseRouting();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });
        }

Further technical details

  • ASP.NET Core version: 3.1.101
.NET Core SDK (reflecting any global.json):
 Version:   3.1.101
 Commit:    b377529961

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.1.101\

Host (useful for support):
  Version: 3.1.1
  Commit:  a1388f194c
  • The IDE (VS / VS Code/ VS4Mac) you're running on, and it's version: Visual Studio 2019: 16.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-very-fewThis issue impacts very few customersarea-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.feature-runtime-compilationinvestigateseverity-blockingThis label is used by an internal tool

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions