FileLoadException when trying to load a signed Assembly with VersionInformation (C#, WPF, AssemblyVersion, Asterisk)

30 views Asked by At

I have a problem when trying to load a signed assembly into my WPF application. Specifically when the WPF Views are created, e.g.

var circularProgressControl = new CircularProgressControl();

I get this error

System.IO.FileLoadException: "Could not load file or assembly 'Projectname, Version=1.5.8615.20370, Culture=neutral, PublicKeyToken=f619059777d70c90' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"

I could enclose the problem to the point that the signed assembly has this version information:

[assembly: AssemblyVersion("1.5.*")]

It works fine when I don't use the asterisk:

[assembly: AssemblyVersion("1.5")]

Can anyone help with this issue? Is the asterisk incompatible with signed assembly loading or ist this a bug in the environment?

Problem:

[assembly: AssemblyVersion("1.5.*")]

var circularProgressControl = new CircularProgressControl(); --> FileLoadException

No Problem:

[assembly: AssemblyVersion("1.5")] 

var circularProgressControl = new CircularProgressControl(); --> No FileLoadException
0

There are 0 answers