Skip to content

[Bug]: Build task crashes on (TypeLoadException from System.Web.UI.WebResourceAttribute) #7338

Description

@valadas

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Local build on windows crashes on net10 during web.config redirect generation (TypeLoadException from System.Web.UI.WebResourceAttribute)

During packaging, PreparePackaging.CreateWebConfig fails while parsing assemblies from Website/bin.

Where it happens

  • Build/Tasks/PreparePackaging.cs
  • Call path: files.ParseAssemblies() (from Dnn.CakeUtils)
  • Triggered while processing ClientDependency.Core.dll

Root cause

Dnn.CakeUtils.ParsedAssembly uses reflection GetCustomAttribute<TargetFrameworkAttribute>() which forces custom attribute type resolution.
In a net10 build host, legacy System.Web.UI.WebResourceAttribute cannot be loaded, causing TypeLoadException.

Expected behavior

Packaging should generate binding redirects without loading runtime-only framework types from legacy assemblies.

Steps to reproduce?

Get the latest develop branch and try to run the cake build on a windows machine with the latest .net updates

Current Behavior

Build fails

Expected Behavior

Build should succeed

Relevant log output

TypeLoadException from System.Web.UI.WebResourceAttribute

Anything else?

No response

Affected Versions

develop build (unreleased)

What browsers are you seeing the problem on?

Chrome

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions