on 04-05-2011 3:41 PM
I did have a working CR add-in (Crystal Reports 2008), based on .net framework 3.5
Did reference the following CrystalDecisions dlls:
- CrystalDecisions.CrystalReports.Engine
- CrystalDecisions.ReportAppServer.ClientDoc
- CrystalDecisions.ReportAppServer.Controllers
- CrystalDecisions.ReportAppServer.DataDefModel
- CrystalDecisions.ReportAppServer.DataSetConversion
- CrystalDecisions.Shared
- DotNetExternalCommandAdapter
Now I did set the VS2010 project to .net framework 4.0., and got 8 errors:
Error 1 Warning as Error: A reference was created to embedded interop assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportAppServer.ClientDoc.dll' because of an indirect reference to that assembly created by assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.ReportAppServer.DataSetConversion.dll'. Consider changing the 'Embed Interop Types' property on either assembly. CscMyAddIn
So i did set the 'Embed Interop Types' of the particular references dlls' to False.
Then I got 2 errors:
Error 1 Cannot embed interop types from assembly 'c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.CrystalReports.Engine.dll' because it is missing the 'GuidAttribute' attribute c:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet\CrystalDecisions.CrystalReports.Engine.dll CscMyAddIn
Also set this 'Enbed Interop Types' to false.
But after build, and copy the addin dll to the right AddIn directory, the addin is not working in CR. The 'Add-ins' menu is not even shown in CR 2008.
So my question, is it possible to make a .net 4.0 based add-in? Or should I stick to .net 3.5?
After convert
Hi Dennis,
CR 2008 is only supported in VS 2008 and 3.5 framework. If you are going to use CR for VS 2010 then be sure to set your framework to full 4.0 and not the client. Also set your CPU to x86, don't use AnyCPU setting.
Thank you
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don,
Thanks for the quick answer... but...
Did just that. Set to full .net framework 4.0, platform target is x86.
I turned 'treat warnings as errors' off, so i do not get the errors about 'Embed Interop Types'
Also turned off 'Code Analysis' and turned off 'Signing'.
Did build the addin, started CR2008, but the add-in menu is still not there.
Use CR 2008 version 12.2.0.290
So still not able to make an addin in VS2010 based on .net framework 4.0.
Maybe something to do with the DotNetExternalCommandAdapter.dll? Because its runtime version is v1.1.4322?
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.