You install Crystal Reports 2010 to use with Visual Studio 2010. You create a “Crystal Reports Application” project from the “New Project” dialog in Visual Studio. Without adding any code, you compile and receive the below errors.
The problem as far as I can tell occurs when you also have Crystal Reports 2008 installed on the same machine (which is the one that is packaged with Visual Studio 2008). Whenever the Crystal Reports 2010 application is created with VS2010, it (as far as I can tell) incorrectly references some of the old assemblies. SAP’s suggestion is to uninstall Crystal Reports 2008 which isn’t always a feasible option (which is to say, can be a huge headache when you also need that). Anyway, here’s a quick fix for you that should work.
I was lazy in testing, so I added references to every version 13 CR assembly, I assume just replacing the 4 needed would do the trick.
One final note/rant. The “.Net Framework 4.0” assemblies for CR actually target the 2.0 framework and the template project also uses a “FlashControlV71” assembly that targets the 1.1 framework. This means, even if I’m writing a 4.0 application, I have to have the 2.0 framework and the 1.1 framework on the workstation/server executing this program. Mainstream support ended on 1.1 in 2008 and extended support ends in October of 2013. I have to wonder why these controls haven’t been updated and why they’re still being shipped. If you’re going to target 4.0 with your product, target 4.0 so there’s only one framework involved. In this case, these are 3 totally different versions of the CLR required (1.1, 2.0 and 4.0).