5

Description for an image

I get this error only at design-time.

At runtime everything works just fine. There is absolutely nothing wrong with I-Synergy.Resources class library.

I've searched for this error intensively but no solution.

(already tried:

  • reset settings VS
  • clear and rebuild solution
  • delete obj and bin folders
  • checked all references and dependencies
  • converted pcl to regular class library

)

StepUp
  • 36,391
  • 15
  • 88
  • 148
Ismail Hassani
  • 442
  • 5
  • 14

1 Answers1

7

As you probably know, there a lot of questions regarding the notorious "Could not load file or assembly" error many times creeping up our XAML designer. After reading all the provided solutions, and sadly non of them working for me, I started to investigate this annoying issue. I spend 4 days trying to figure this out. Luckily today I found the answer to my problem.

In my solution design I created several projects under the WPF application called I-Synergy. Among others I added assemblies named I-Synergy.Controls and I-Synergy.Resources (where I put all my Resource strings, static classes and images). This last assembly seems to caused this error. Even I don't have any Resouces file (or any other local reference inside the WPF application) it somehow got confused with my I-Synergy.Resources project.

Solution: I changed the I-Synergy.Resources project to I-Synergy.Library (assembly name and namespaces) and the error has gone. Probably the "Resources" name is a no-go and can be considered as a reserved word.

Ismail Hassani
  • 442
  • 5
  • 14