Crystal Reports in .net 4 windows application

December 25th, 2011 by Kristy Leave a reply »

Ran into issues with my application not compiling due to the following error:

“Could not load file or assembly ‘file:///C:Program FilesSAP BusinessObjectsCrystal Reports for .NET Framework 4.0CommonSAP BusinessObjects Enterprise XI 4.0win32_x86dotnet1crdb_adoplus.dll’ or one of its dependencies. The system cannot find the file specified.”

Thanks to a post on msdn’s forum I found the following fix:

1. Make sure your project framework is set to 4.0 framework, not the client

2. Add this to the config file:

<startup useLegacyV2RuntimeActivationPolicy=”true”>
<supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/>

3.  When distributing the app be sure to include the  appname.config.exe file



Comments are closed.