cancel
Showing results for 
Search instead for 
Did you mean: 

FileNotFoundException: Could not load file or assembly 'log4net, Version=1.2.10.0,

SuperCoder
Participant
0 Kudos

I have reviewed other posts on this subject and they don't seem to apply to me. I my case log4net.dll is no longer on my computer when I installed CR for VS 2022.

How can I get this file back?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

R&D confirmed the issue is due to ANY CR Assembly set to Copy Local = True, ALL must be set to False.

Answers (5)

Answers (5)

Do a repair install, CR has it's own version, repairing the EXE should add it back in.

If it doesn't possibly your AV software is blocking it

SuperCoder
Participant
0 Kudos

Don,

I really, really need to have this fixed even if I must pay for support. Who should I contact?

0 Kudos

Hi Jeff,

Ah, that explains a lot of things.

The problem with DLL's is they only report back the top level error, that specific error was likely caused by what ever references you had in your old project. And so the errors being reported by Visual Studio can be misleading most of the time. Or likely what happened is when you did upgrade no CR assemblies were migrated and that log4net was the only assembly in your project, other than the Windows Defaults.

Also, next time you post a question it would have been more informative if rather than reporting the error only to include what steps you were doing to get that message. For example - "I'm upgrading my VS 2008 Project to the current CR for VS SP 32 and Visual Studio 2022, when I try to open the build I get the following error... I did not update the CR References as explained in this Blog: https://blogs.sap.com/2020/10/30/upgrading-a-visual-studio-2008-2019-.net-project-with-the-latest-cr...

Found on the WIKI that has all the info you need:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Also, I don't recommend manually adding the CR Assemblies by browsing to them, use the Extensions, and also set them to not Copy Local = false.

Have a read in the Blog I wrote for upgrading, it helps a lot, I often run into the same errors you get when I open an old project in a new version of Visual Studio, MS doesn't seem to propagate all of the old assembly states when importing into a new version....

And you did ask how to purchase a single Incident, go here: https://www.sap.com/products/crystal-reports/technical-information.html

On the right side there is a Contact Us button to chat with a Customer Service Rep, they can direct you to the eStore to buy the case.

Anyways, I understand your frustrations, I've been supporting CR for 25 years and seen it all. Next time be a little more patient and report all of the info then we don't have to go back and forth just getting the basics... Work flow does explain a lot and can usually point to the root of the issue right away...

And to summarise with VS 2022:

Be sure to use the CR for VS SP 32 64 bit installer, so it integrates into Visual Studio, templates, Embedded Report Designer etc.

At the end of the installer it does prompt if you want the 32 bit MSI.

Do not manually install the 64/32 bit MSI packages, those are for distribution only and not required to manually install them on your Development PC.

VS doesn't like, most of the time, replace the old assemblies with the new assemblies, so you do need to fix them up.

All noted in the Blog I wrote.

Thanks again for reporting what fixed your issue and have a great day

Don

0 Kudos

Hi Jeff,

What was the issue and how did you fix it so others who run into this has info to resolve the problem?

The Community is not monitored by SAP Support team, it's public.

For more info on what's supported, Platforms etc. go to my WIKI page:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

Also has a link to supported platforms etc.

As you know releasing a new version of CR for VS using a Beta build of Visual Studio or any Beta is risky, due to the nature of Beta's, anything could change, so until it goes GA we can't spend time integrating.

Sorry for your bad experience but not much to go to suggest anything else. You can always enable MSIExec Logging to see what the install log is showing as the cause or here depending on how far you get:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\logging

If it's not there then the log is under your Users \temp folder.

Good to know you have it working now

Don

SuperCoder
Participant
0 Kudos

FileNotFoundExceptions suggests that the Log4Net file was not on my system. Windows search could not find it. Working with Microsoft I was able to find the file. So the file was there...false message.

Tried to add new CR files to my project via References | Add a Reference. No CR files appeared to select. After doing some research I found an old article which showed how to manually add CR files to my project. Once I did that everything worked as it should have. Found the CR files in:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\dotnet

Hope this helps others and hope that SAP will send me a cookie for posting this. 🙂

0 Kudos

Don't include it in your project, not required.

It should be in the SAP folder, likely cause if it's not is your AV software removed it.

Try my sample app and see if you get the same error:

how-to-parameters-in-crystal-reports-for-visual-studio-net

SuperCoder
Participant
0 Kudos

After many hours I was able to figure this out and everything now works correctly. I lost many hours of development time because of this install failure and I have have become frustrated with SAP's poor support and slow release of a new CR when a new VS edition is released. In the long run we will migrate over to DevExpress report function. Very unhappy.

SuperCoder
Participant
0 Kudos

Disabled Microsoft Defender and the reinstalled CR for VS 2022. Do not fix the issue.