Skip to content

System.Resources.Extensions 9.0.1 NuGet addresses wrong version in targets file #111892

Closed
@Dany-HBK

Description

@Dany-HBK

Description

The NuGet package system.resources.extensions.9.0.1.nupkg references version 9.0.0.0 in its targets file, producing a runtime error that this assembly cannot be found.

Used in a project targeting .NET Framework 4.8.

Reproduction Steps

  1. Create a .NET Framework 4.8 WinForms project ( TestProject ) -> See PropertyGroup below.
  2. Add a reference to the NuGet package ("Latest stable 9.0.1").
  3. Add an image resource to the project ( MyImage ).
  4. Add a Button control on the Form ( button1 ).
  5. Assign the image resource to the Button control. ( this.button1.Image = global::TestProject.Properties.Resources.MyImage; in Designer file ).
  6. Run the application
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFrameworks>net48</TargetFrameworks>
    <Platforms>AnyCPU</Platforms>
    <RuntimeIdentifiers>win-AnyCPU</RuntimeIdentifiers>
    <UseWindowsForms>true</UseWindowsForms>
    <AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
    <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
  </PropertyGroup>

Expected behavior

The Form opens and displays the Button with the image.

Actual behavior

Exception at the Designer code line above (German OS):

An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll
Die Datei oder Assembly "System.Resources.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)

Regression?

With version 9.0.0 of this NuGet package it works of course.

Known Workarounds

Use version 9.0.0 of the package.

Configuration

  • .NET Framework 4.8
  • Windows 10 22H2 (German)
  • x64
  • Configuration independent (but .NET Runtime dependent)

Other information

Just a forgotten change since the Assembly version has been bumped up (which is probably the fault) but not the targets file.

Metadata

Metadata

Assignees

Labels

area-System.Resourcesbugin-prThere is an active PR which will close this issue when it is merged

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions