I have installed "Crystal Report (Service Pack 20)" for visual studio 2015. Whenever i drag "CrystalReportsViewer" from toolbox to WPF window and run the program i get an exception error saying " Additional information: The invocation of the constructor on type 'SAPBusinessObjects.WPF.Viewer.ViewerCore' that matches the specified binding constraints threw an exception. "
The inner exception of the above exception is
The type initializer for 'CrystalDecisions.Shared.SharedUtils' threw
an exception.
again the inner exception of the above exception is
Could not load file or assembly 'log4net, Version=1.2.10.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its
dependencies. The system cannot find the file specified.":"log4net,
Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
i have installed 32 bit and then 64 bit for checking compatibility issues but this did not solve the problem.
1st. the runtime have to be the same of the project, no the SO's version.
2nd. when you generate the project, exclude the .dll's (CrystalReports and CrystalDecisions)
3rd. You have to copy 'log4net.dll' to the next directory: C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet.
**You have to search 'log4net.dll' in the web. I had a old link and it's not working anymore.
Related
Since today I get the following new Error message:
System.IO.FileLoadException: Could not load file or assembly 'WebDriver, Version=2.53.1.0, Culture=neutral, PublicKeyToken=1c2bd1631853048f' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044) ---> System.IO.FileLoadException: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
Everything worked fine until yesterday and now I lost 6 out of my 7 test VMs to this error.
I read every documentation I could find and tried to compare the non working VMs with the the non working version and could not find a difference.
Suspicious is the Version=2.53.1.0 as the current WebDriver DLL is 4.4.0. Where could the reference to this potential old DLL come from?
Is there a debug or logging option I could activate? A way to see which DLLs are loaded?
Needless to say that with only 1 out of 7 Testmachines we will not be able to meet the deadline.
Got it. It's the other way around. I must not use a new version. I must use an old 2.53 version.
The update must have slipped in because I can't remember updating them consciously.
For those who have similar problems: Extract the content of selenium-dotnet-strongnamed-2.53.1.zip into C:\Program Files (x86)\Common Files\microsoft shared\VSTT\Cross Browser Selenium Components\
Adjust destination directory if you have an unusual Windows installation.
I am writing a C# program in Visual Studio 2019 (Windows 10, .Net 4.72). My program uses System.Data.Sqlite. I just copied all the source files from an earlier Windows 7 machine, got it to compile and run, but then I ended up with this message as soon as I reached a line of code that established an SQLConnection:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in ABC.exe
Could not load file or assembly 'netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
The program '[4108] ABC.exe' has exited with code -1 (0xffffffff).
I did not use any of the dll's from the previous installation - rather, I used NuGet to download the up-to-date ones. I also downloaded NETStandard.Library.Ref (which contains NetStandard.dll Version 2.1), but it did not work when I tried to install it.
I would use .net 5 or 6, but my program needs a media player, which doesn't seem to be in .Net Core.
Any thoughts would be greatly appreciated.
This exception occurs when i try to load my app on my device (lumia 950).
An exception of type 'System.IO.FileLoadException' occurred in Template10Library.DLL but was not handled in user code
Additional information: Could not load file or assembly 'System.Threading, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
The environment: I'm using Template10 as a git submodule in my project instead of as a nuget package. I also have 2 other 'Class Library' projects and 1 'Windows Runtime Component' projects in my solution that my app depends on.
I'm a bit out of my depth here, I'm pretty new to app development and I have no clear understanding on the particulars of the windows build/deploy/runtime environment so I don't really know where to start.
I know you probably require more information in order to help me, so just ask and I'll try to get back to you.
Edit:
I added the following code in my app so that it ran before I got the exception above.
try
{
var assm = Assembly.Load(new AssemblyName("System.Threading"));
}
catch(Exception e)
{
System.Diagnostics.Debugger.Break();
}
By pausing the debugger at var assm ... I got the following information from the loaded assembly:
Fullname: "System.Threading, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
ImageRuntimeVersion: "v4.0.30319"
Location: "C:\windows\system32\SYSTEM.THREADING.NI.DLL"
So what does this mean? That my phone have older versions of system dll's? But why does my app require 4.0.10 when 4.0.0 should suffice?
EDIT 2:
I created a new blank app and a similar problem occured but this time with no library dependencies and this time I tried to use 'System.Net.Http.HttpClient' and I got the following exception:
An exception of type 'System.IO.FileLoadException' occurred in App1.exe but was not handled in user code
Additional information: Could not load file or assembly 'System.Net.Primitives, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I'm running OS build 10.0.10586.0 but I'm starting to consider that there is something wrong with my device.
Apparently my visual studio installation was messed up... so I did a complete reinstallation of the entire OS, and now it (and my apps) works properly.
Thank you Alan Yao for your input!
I put together a POC console app. to generate a PDF from a Crystal Report (using CrystalDecisions libraries)
It all works fine on my dev. box, but encounters an exception when executed elsewhere:
Could not load file or assembly
'CrystalDecisions.ReportAppServer.CommLay er, Version=13.0.2000.0,
Culture=neutral, PublicKeyToken=692fbea5521e1304' or on e of its
dependencies. The system cannot find the file specified.
Unhandled Exception: System.TypeInitializationException: The type
initializer for
'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an
exception. --
-> System.IO.FileNotFoundException: Could not load file or assembly 'CrystalDeci
sions.ReportAppServer.CommLayer, Version=13.0.2000.0, Culture=neutral, PublicKey
Token=692fbea5521e1304' or one of its dependencies. The system cannot find the f
ile specified.
at CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor()
I believe this is caused by the absence of the Crystal Reports runtime (which is not explicitly installed).
1) Can anyone please confirm this?
2) Is there any way to get this working without installing Crystal Reports runtime on the target machine(s)?
I've read about building an installer with merge modules etc. but this is a console app and I don't want to go down that route.
Thanks in advance.
EDIT:
I checked out the DLL dependencies and this actually appears to be missing libraries API-MS-WIN-CORE-*
You will need to distribute the runtime for Crystal Reports to work.
Another option is to write second app to generate the pdf files which you could install on a server, then each of your console apps send a request to the new server app which sends back the pdf. This would mean the crystal runtime would only be installed on one machine, and the original console app wouldn't need to worry about it.
Just for information, the crystal runtime can be downloaded from here: http://scn.sap.com/docs/DOC-7824
I got the following error when analyzing a c# project with SonarQube 4.5.4. I have the sonar-csharp-plugin-4.0 installed.
Sensor org.sonar.plugins.csharp.CSharpSensor#18cf794...
10:48:17.000 DEBUG - Updating semaphore batch-com.test.sample
10:48:24.571 ERROR -
10:48:24.879 ERROR - Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
10:48:24.879 ERROR - at SonarQube.CSharp.CodeAnalysis.Runner.Program.Main(String[] args)
10:48:27.146 DEBUG - Updating semaphore batch-com.test.sample
10:48:37.211 DEBUG - Updating semaphore batch-com.test.sample
10:48:37.714 DEBUG - Release semaphore on project : org.sonar.api.resources.Project#494546[id=1442,key=com.test.sample,qualifier=TRK], with key batch-com.test.sample
The C# plugin is implemented in C# itself (based on Roslyn) since version 4.0.
It requires the .NET framework 4.5 to be installed on the machine from which the analysis is being executed.