Posted 8 December 2022, 7:03 am EST - Updated 13 August 2025, 11:03 am EST
Hi C1,
I assume this is actually a problem of “System.Resources.Extensions”, but I start asking here, as it happens for me with your component.
I updated my installation to 6.0.20223.584. But our projects still use the C1 components with version .576 (using Nuget packages). All C1 stuff did not resolve and caused compilation errors. I tracked the reason to this warning:
Warning MSB3106 Assembly strong name “:\Program Files %28x86%29\ComponentOne\WinForms Edition\bin\v6\c1.win.printing\6.0.20222.576\lib\net6.0\C1.Win.PrintPreview.6.dll” is either a path which could not be found or it is a full assembly name which is badly formed. If it is a full assembly name it may contain characters that need to be escaped with backslash(). Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash().
I tracked it down to a file “obj\Debug\net6.0-windows\projectname.assets.cache”: the path to the dll points to “program files” instead of the nuget package cache (“C:\Users\USERNAME.nuget\packages\c1.win.printing\6.0.20222.576\lib\net6.0\C1.Win.PrintPreview.6.dll”).
This file seems to be created by the “System.Resources.Extensions”, which is required e.g. if you use strong types resource files.
Attached sample reproduces the problem - but you will probably see only the issue that the assets file contains a path in “program files” instead of the path in the nuget package, but there will be no compilation error.
To reproduce it, you have to change the package version to 576 and compile the solution on a machine where the .576 components are installed. Then copy the solution (including bin and obj folders) to another machine where .584 is installed. Here the warning should happen.
The workaround is quite simple: delete all “obj” folders after updating C1.
I think the problem is that the “System.Resources.Extension” does not pick the paths from the Nuget package but from the local installation.
But if I create an issue at https://github.com/dotnet/runtime, they will probably tell me that they cannot reproduce it as they would need a C1 installation.
What do you think? How to continue this?
Best regards
Wolfgang