SSIS C# script won't run with reference to Newtonsoft.json - c#

We have an SSIS package that executes a Script Component in the Data Flow Task. This script is in C# and it is referencing Newtonsoft.Json to connect to a website and get data from the website. This package was originally created in SSDT 2010, was deployed to a SQL Server 2012 instance, and ran successfully. We are in the process of migrating our SSIS packages to a new SQL Server 2017 instance and the package was upgraded to SSDT 2015. Now the package throws an error when trying to execute the Script Component. The error is:
Error: 0x1 at Get product meta, Error Getting Data From Webservice!: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'
at ScriptMain.GetWebServiceResult(String wUrl)
at ScriptMain.parsejson(String uri, Boolean& hasmore)
We've been Googling the error with very little success or understanding of the issue. Has anyone had this issue before and, if so, does anyone have any suggestions on how to resolve it?

Related

FileNotFound Error while creating SSIS package programmatically using C#

I am trying to write an SSIS package programmatically using C#.
I have installed SQL Server Integration Services Projects v16 and added all the references like Microsoft.SqlServer.ManagedDTS and using Microsoft.Dts.Runtime.
However, at runtime, I am getting an error:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.'
I tried to manually add the DLL "Microsoft.SqlServer.DTSRuntimeWrap" from "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\SSIS\160\Binn" but it throws the same error.
My Microsoft SQL Server Integration Services Projects is version 16.0.5035.3 and hence, I added the reference from the \160\Binn.
However, it seems that the code is asking for another version (Version=13.0.0.0).
Can someone please tell me what's going wrong?
Much appreciated!

Remote language server can't activate when I open ASP.Net MVC solution

Recently, my ASP.Net project have been giving me issues, as soon as I open the project it displays the error:
There was an error activating the remote language server, C#/Visual Basic Server Client. For more details, please examine the ActivityLog.xml file.
I examined the ActivityLog.xml file as it suggested, and from the Activity Monitor Log I found the following errors:
#182: Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.Windows.Simulator.Client, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
c:\program files (x86)\microsoft visual studio\2019\community\common7\ide\commonextensions\platform\diagnosticshub\Microsoft.DiagnosticsHub.VisualStudio.Package.dll
#183: Still unable to load MEF component DLL: Could not load file or assembly 'Microsoft.UniversalApps.Deployment, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\COMMUNITY\COMMON7\IDE\EXTENSIONS\MICROSOFT\GRAPHICS\DEBUGGER\VsGraphicsDebuggerPkg.dll
I tried to repair VS2019 with hopes it will fix this error, but it didn't work. And I'm using the latest version of VS2019 (version 16.8.3).

Winforms application - could not load file or assembly "Entity Framework"

I created for a client a small Winforms application using SQL Server 2012 for the database and Entity Framework to run the stored procedures inside my application.
When I run the application on the development machine, everything runs smoothly (as usual), then I created an installation package to transfer it to the client machine, and successfully installed it. I also installed SQL Server 2012 for the client and the application starts up and it can connect to the database (I know because the forms are reading data from the database). Now the problem is when I try to insert new data into the database through my application - I get this error:
System.IO.FileNotFoundException: Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The system cannot find the file specified.
File name: 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
I checked the config file and it stats the same version and key.
The results I got when I searched the issue is to update the Entity Framework from Nuget packages, but I am working on the client PC, should I try and deploy it again, or what should be my next step to solve this problem

Add Reporting.WinForms Reference to VS2015

I'm looking at adding the reference;
Microsoft.Reporting.WinForms
to my VisualStudio (2015) project but when I go to Add the Reference in the Solution Explorer I couldn't find it.
Eventually I added it through NuGet but now I am getting the error message;
Could not load file or assembly 'Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
which leads me to believe I just haven't added the package properly. I've installed Microsoft SQL Server Data Tools through program features but still no luck.
What am I missing?
You can try by executing this into Package Manager Console
Install-Package Microsoft.Reporting.WinForms.v11

Could not load type 'Microsoft.TeamFoundation.Client.BasicAuthCredential' from assembly 'Microsoft.TeamFoundation.Client

I have an MVC app that pulls data from hosted TFS, and when I deploy it I get this error
Could not load type 'Microsoft.TeamFoundation.Client.BasicAuthCredential' from assembly 'Microsoft.TeamFoundation.Client, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
However, I have Microsoft.TeamFoundation.Client referenced in the project and the dll is on the server.
Why would it not be able to load Client.BasicAuthCredential from the dll and how would I go about fixing it?
We've had similar issues and after we installed TFS object model this issue was resolved.
http://visualstudiogallery.msdn.microsoft.com/a37e19fb-3052-4fc9-bef7-4a4682069a75

Categories