cancel
Showing results for 
Search instead for 
Did you mean: 

RAS SDK dlls for projects that target .NET 4.0 framework

0 Kudos

Hello,

recently, because of needs of our project, we have started using RAS SDK in our application. We are developing in Visual Studio 2010, and have downloaded CR for VS 2010.

However it seems that we can not get expected behavior of, I believe dll in question is  CrystalDecisions.ReportAppServer.ClientDoc, when we target the 4.0 framework in project.

If we change the target platform to 2.0 - 3.5 everything works as expected ( we can search sections, add new...) but in 4.0 exceptions are thrown since

CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument has different information in it.

Can you tell me what is the issue? And how to proceed with developing RAS SDK in 4.0 environment?

Any help highly appreciated!

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

You need to make sure that when you target the .NET 4.0 framework that you do NOT target the 4.0 Client framework.  Also, in the properties for the BO references you'll need to set the "Embed Interop Types" property to false.  (This property did not exist with earlier versions of the .NET framework.)

-Dell

0 Kudos

Yes. It was set to target .NET 4.0 framework, but property "Embed Interop Types" was true. After changing it to false, all is working as expected.

Thank you!

If it is not too much trouble, could you explain what that actually means? And, are there any other settings like that, that we need to look into when developing in .NET 4.0?

DellSC
Active Contributor
0 Kudos

The SDK is basically wrappers around COM objects.  My understanding is that "Embed Interop Types" does something to embed the COM objects in the program which makes the SDK not work properly.  So, setting the property to False, prevents that and everything works.

Other than making sure you're not targeting one of the "Client" .NET frameworks, there aren't any other settings that I can think of (and I do a LOT of coding for my clients, so I probably would have run into any issues that might be out there.)

-Dell

0 Kudos

Ok, thanks again!

Answers (0)