Getting a FileNotFoundException for RibbonControls

2019-06-01 10:38发布

I recently started getting this error when trying to run a project that uses the WPF Ribbon. It had been working on this machine prior, but for some reason it's not now. The library from here is installed on this machine properly.

The exact exception message:

"Could not load file or assembly 'RibbonControlsLibrary.Aero2, Version=4.0.0.11019, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.":"RibbonControlsLibrary.Aero2, Version=4.0.0.11019, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

Current system/project environment: .NET 4, VS 2010 Pro, Win8 Pro

Modifying the project for VS 2012 Express for Desktop and the .NET 4.5 ribbon controls there works fine, though we can't switch to VS 2012 just yet so need to get this fixed for VS 2010.

The project still works fine on the Win7 systems.

1条回答
太酷不给撩
2楼-- · 2019-06-01 11:12

I ran into the same issue using the WPF Extended Toolkit (so my error shows up complaining about Xceed.Wpf.Toolkit.Aero2), seems like a bit of a designer related bug in Visual Studio, because designer issues are what triggers the problem for me (I'm using VS2012, by the way, so it is still an issue there).

It seems like the .suo file for the solution is getting corrupted, because the "fix" that has worked for me is closing VS, deleting the .suo file, then restarting. Works every time until I have another designer error where the designer fails to load. Then I have to do it again.

Hope that helps!

查看更多
登录 后发表回答