Skip to content

WPF Application run failed with large resources #8284

@XamlTest

Description

@XamlTest

Description

The initial issue reported in https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1880935.

WPF application failed to run with large resources(>1.9G).

Reproduction Steps

Repro Steps:

  1. Create a WPF Core project or directly download the project WpfApp1.zip
  2. Add a new folder: images
  3. Add a large image to the images folder, such as 50M.(You can download bmp file from https://filesamples.com/formats/bmp)
  4. Copy and paste the images 37 times, make the images folder size about 1.9 GB
  5. Press F5 to run

Expected behavior

Application runs successfully.

Actual behavior

  1. If the images folder size is about 1.9GB, application will exit automatically without error.
  2. If the images folder size is larger than 2GB, error CS1566: "Error reading resource "WpfApp2.g.resources" -- Specified argument was out of the range of valid values." will display in Error List after rebuilding.
    image
  3. If the images folder size is smaller than 1.85GB, application works fine.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions