vb.net ClassNotRegistered error only in Release - vb.net

This is a legacy project in vb.net. When I run it in debug there are no errors but when I create a release version and run it in VS, I get a class not registered error when the code tries to instantiate a form. I am pretty sure the error has to do with a Crystal Reports dll, perhaps AxCrystal, but of course there is no useful information, like, which class.
Any suggestions, hints, anything are very welcome.

Try to register the class as it is described here:
A solution for this problem is to register the PrintContoll.dll
First the Crystal Reports 2010 SP1 Redistributable needs to be installed.
Then download the following file containing the PrintControll.dll:
ActiveXControls Crystal Reports 2011 SP1
Extract the folder ‘ActiveXControls’ to:
C:\Program Files\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\Crystal Reports 2011\crystalreportviewers

Related

VS 2019 VB.net Winform trying to modify an existing .rdlc but it wants to upgrade the format and then i get a definition of report invalid

I have a vb.net winform application. It has been around for years. I'm using VS 2019 community edition. When i try to open the rdlc file it tells me that I need to upgrade the format. I do that and then when i run the application i get an error that the definition of the report is invalid. I've read where i need to install the extension Microsoft.RdlcDesigner. I have done that and i can go in see my report in the designer but it still won't run.
The exact error is
An Error occurred during local processing. The definition of hte report " is invalid. The definition of this report is not valid or supported by this version of Reporting Services. The report definition may have been created wih a later version of Reporting Services, or contain contet that is not well-formed or not valid based on Reporting Services schemas. Details: the report definition has invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2015/01/reportdefinition' which cannot be upgraded.
i'm using an rdlc file so the vb app is using reportviewer to hit a local database.. no reporting service server is involved.
anyone have any ideas
thanks
I figured out a poor workaround. If i open the rdlc file in visual studio 2013 and let it upgrade the format.. then i can modify the report in the designer. Save the rdlc and close vs2013. then open the VS 2019 project and it will compile and run the report. Not great.. but at least its working

Deploy vb Application Crystal Reports

I have a vb application that relies heavily on Crystal Report. The reports run fine while in development mode but once the executable is generated it doesnt open the reports anymore and raises an exception saying Load Report Failed ( with a bunch of CrystalDecision references that it can't find).
Development Environment:
Visual Studio 2017
Win10 64bit
Crystal Report (forVS and Runtime) 13.0.21
Target:
win7 on 32bit
.NET 4.5
Crystal Report Runtime 13.0.5
We tried including the Crystal references that might be causing the problem when publishing the project but that didnt resolve the problem.
Also, the project was initially developped in Microsoft Visual Studio 2012 with CR 13.0.5 and apparently at some point they did some additional dev in VS2017 and so had to migrate the reports to a supported version of CR.
Any suggestions would be highly appreciated.
Thanks!
You can't simply include the missing references for Crystal Reports. You need to install the Crystal Reports Redistributable (Runtime) for your version on the target system.

Adding ColinsALMCorner.CustomBuildTasks.dll to Toolbox causes 'could not load file or assembly' error

I am adding this custom build task to my TFS 2010 build workflow, however when attempting to add it (ColinsALMCorner.CustomBuildTasks.dll) to the toolbox, I get error:
'Could not load file or assembly file 'ColinsALMCorner.CustomBuildTasks.dll' or one of its dependencies. Operation is not supported'.
I have added all of its dependencies to (I admit, this is probably redundant):
1) the same location where the ColinsALMCorner.CustomBuildTasks.dll resides, which is ..\BuildProcessTemplates\CustomActivities
2) in the Public Assemblies folder: Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies
And I have the build definition xaml file correctly importing the ColinsALMCorner.CustomBuildTasks namespace
Although the activity is set to target .Net 4.5, the documentation says that TFS 2010 / .Net 4.0 is supported, so I assume this should all be possible.
My Questions:
Is this possible with TFS 2010 / .Net 4.0 development environment? My concern is that the error message isn't telling the real story, for example maybe it is able to find it, however just not the right version of the assembly.
Is it likely that since the DLL targets .Net 4.5 I need to have all of its referenced dll's also be the 4.5 version? For example, it references Microsoft.TeamFoundation.VersionControl.Client however I only have the version 10.0.0.0 (which I assume the .Net 4.5 version of this might be 11.0.0.0)
Here was the solution, in short story format: I installed Visual Studio 2012. Result: I was able to add ColinsALMCorner.CustomBuildTasks to my workflow in Visual Studio 2010 without error. I assume this means there was a 2012 (v11.0.0.0) DLL or two required to use the activity in 2010, despite the fact that the requirements state:
Team Foundation Build 2010, 2012 or 2013

WARNING: Unable to find dependency

I have built an application with VB.net 2010 and framework 4 and I have installed crystal report too. whenever I try to create a setup, this warning appears :
WARNING: Unable to find dependency
'BUSINESSOBJECTS.LICENSING.KEYCODEDECODER'
(Signature='692FBEA5521E1304' Version='13.0.2000.0') of assembly
'CrystalDecisions.CrystalReports.Engine.dll'
this error shows when I install on other PCs .
Do you have any idea about this ?
thanks in advance
I think you must to install Crystal Report 2010 on the client where you are running your application.
From msdn blog:
Starting on Friday, April 16th, the beta version of Crystal Reports
for Visual Studio 2010 will be available as a separate download from
this site. Just like when Crystal Reports was integrated into the
Visual Studio installation, this download will continue to be free.
From: http://blogs.msdn.com/b/vbteam/archive/2010/04/08/crystal-reports-for-visual-studio-2010.aspx?PageIndex=4
Take a look here: http://social.msdn.microsoft.com/Forums/en-US/vscrystalreports/thread/91f71ce2-e591-45a1-8bc2-0d61cd090117/

Report Viewer in 2010 with .Net 3.5 causing Error when compiled

I'm using Vs 2010 with .Net 3.5. I have windows project and using Report Viewer for reporting purpose. I designed reports using Report Viewer. It works fine on my machine but on deployment server, compiler gives the following error:
The report definition is not valid. Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition'
which cannot be upgr
aded.
Please note that I have all of my report files as Content.
Thanks a million.
Is VS2010 and .net 3.5 installed on your build server? And reportviewer?