Skip to content

ExtensionDependencyChecker/Loader incorrectly recognizes different version of assemblies as same #5064

@rynowak

Description

@rynowak

We see errors like the following in the Razor build server when upgrading packages

Extension assembly 'Microsoft.AspNetCore.Blazor.Razor.Extensions' at 'C:\Users\username\.nuget\packages\microsoft.aspnetcore.blazor.build\0.2.0-preview1-10195\tools\Microsoft.AspNetCore.Blazor.Razor.Extensions.dll' has a different ModuleVersionId than loaded assembly 'Microsoft.AspNetCore.Blazor.Razor.Extensions, Version=0.2.0.0, Culture=neutral, PublicKeyToken=null'
  Extensions could not be loaded. See output for details.
C:\Users\username\.nuget\packages\microsoft.aspnetcore.blazor.build\0.2.0-preview1-10195\targets\RazorCompilation.targets(179,5): error : rzc generate exited with code 1 

There are a few issues with this.

It would firstly be great to know which other assembly is loaded and where it was loaded from - my guess is that this happened when updating the packages used by our templates, or by mixing our templates with a repo-local build.

Secondly, I think this is just a bug. The assembly loading logic we use for Razor is supposed to be based on paths for 'top level' extensions, meaning that we should be able to load two copies of Microsoft.AspNetCore.Blazor.Razor.Extensions. We should investigate this and see if it's possible.

Lastly, this must not fail the build. We expect users to mix and match dependencies and this is intended to 'just work'.

Metadata

Metadata

Assignees

Labels

area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesbugThis issue describes a behavior which is not expected - a bug.feature-razor-pages

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions