Using RestSharp Library In SSIS Script Component Raises Exception - ssis

I'm building an SSIS package in VS2019 that has a Data Flow task containing a Script Component. I'm setting up that component to use the RestSharp library to call a 3rd party API. However it fails when trying to create an instance of the RestClient() class. Error message is:
Error: Exception has been thrown by the target of an invocation.
Error: Method not found: 'Void System.Text.Json.JsonSerializerOptions..ctor(System.Text.Json.JsonSerializerDefaults)'.
I don't know why it's complaining about the System.Text.JsonSerializerDefaults class. The Target Framework of the Script Component project is ".NET Framework 4.7". Not sure if that's part of the problem. This is the first time I've tried using the RestSharp library in SSIS.
Can someone help me resolve this?
string uri = "https://npiregistry.cms.hhs.gov/api/?"
+ $"number={Row.NPI}"
+ "&enumeration_type="
+ "&taxonomy_description="
+ "&first_name="
+ "&use_first_name_alias="
+ "&last_name="
+ "&organization_name="
+ "&address_purpose="
+ "&city=&state="
+ "&postal_code="
+ "&country_code="
+ "&limit="
+ "&skip="
+ "&pretty=on"
+ "&version=2.1";
var client = new RestClient(uri); // << fails!
UPDATE: This appears to be a GAC issue. If I issue this command, it says that the installation succeeds:
gacutil -i RestSharp.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
However, if I try to find it in the GAC, it isn't found:
gacutil -l RestSharp.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
Number of items = 0
What am I doing wrong?

Related

Custom SSIS component created for SQL Server 2014 not working in SQL Server 2016

We got a couple of custom SSIS components which were created targeting SSIS for SQL Server 2014.
We are now migrating our dtsx packages to SSIS for SQL Server 2016.
I have modified the custom SSIS components such that assembly references to DTS assemblies have been given the property SpecificVersion=False.
I'm using the DTS.Runtime.Application.Upgrade method to upgrade my packages in a console app. However the packages which have these custom components are throwing the below error.
What else should I be doing?
Error in DFT (SSIS.Pipeline) The "" failed to cache the component metadata object and returned error code 0x80131600.
Error in DFT (SSIS.Pipeline) Component , clsid {4F885D04-B578-47B7-94A0-DE9C7DA25EE2} failed to initialize due to error 0xC0047067 "The "%1" failed to cache the component metadata object and returned error code 0x%2!8.8X!.".
Error in DFT ( [2]) The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "".
Error in DFT (SSIS.Pipeline) The component metadata for "" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
Error in Package.dtsx The loading of the package has failed.
You get to rebuild the component against the 2016 SSIS binaries, redeploy it to the GAC and probably change the references in your packages to use the new components (unless the 2014->2016 migration process is entirely different than 2005->2008 and 2008->2012 which is when I stopped building custom components).
The reason for this is that the DLLs for SSIS are strongly signed/versioned and that signature changes between editions of the project so the 2014 component you built is against the 130 version of TxPipeline dll and it now needs to reference 140 to be successful.

Cocos2d-x 2.1.5 win32 setup failed

I trying to install cocos2d-x on window , as saw a lot of tutorial are said just run build_win32.bat is ok , unless got some problem like “tests.exe doesn’t work anymore” or “Get data from file(C:\Windows\system32\fps_images.png) failed!” , however , both of common are not appear to me but other unknown error. could anyone help me ? below is the console output of my error :
/*
* Check VC++ environment...
*/
/*
* Building cocos2d-x library binary, please wait a while...
*/
Setting environment for using Microsoft Visual Studio 2010 x86 tools.
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1008]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 12/9/2013 10:30:38.
C:\cocos2d-x-2.1.5\cocos2d-win32.vc2010.sln : Solution file error MSB5009: Erro
r parsing the nested project section in solution file.
Build FAILED.
C:\cocos2d-x-2.1.5\cocos2d-win32.vc2010.sln : Solution file error MSB5009: Er
ror parsing the nested project section in solution file.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1008]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 12/9/2013 10:30:38.
C:\cocos2d-x-2.1.5\cocos2d-win32.vc2010.sln : Solution file error MSB5009: Erro
r parsing the nested project section in solution file.
Build FAILED.
C:\cocos2d-x-2.1.5\cocos2d-win32.vc2010.sln : Solution file error MSB5009: Er
ror parsing the nested project section in solution file.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.01
/*
* Check the cocos2d-win32 application "TestCpp.exe" ...
*/
The system cannot find the path specified.
/*
* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual
Studio User Guide.
*/
File not found - Resources
0 File(s) copied
File not found - Resources
0 File(s) copied
File not found - Resources
0 File(s) copied
File not found - Resources
0 File(s) copied
File not found - Resources
0 File(s) copied
File not found - js
0 File(s) copied
File not found - tests
0 File(s) copied
File not found - MoonWarriors
0 File(s) copied
File not found - WatermelonWithMe
0 File(s) copied
File not found - Published files iOS
0 File(s) copied
Can't find the binary "TestCpp.exe", is there build error?
Press any key to continue . . .
Because the limited uploading size of google code, Emscripten lib and resources of WatermelonWithMe and CocosDragonJS were removed from releasing installing package.
In order to run Emscripten sample, you should
download Emscripten lib (http://api.viglink.com/api/click?format=go&key=9b4efad421c8b103b2c94b796db973b0&loc=http%3A%2F%2Fwww.cocos2d-x.org%2Fnews%2F134&subId=d654e26afef9085d79aba37dfe97be28&v=1&libId=ecb08019-ccd8-442e-ba80-3415ca773619&out=https%3A%2F%2Fgithub.com%2Fkripken%2Femscripten&ref=https%3A%2F%2Fwww.google.co.in%2F&title=Cocos2d-x%20%7C%20cocos2d-x-2.1.5%20released&txt=here&jsonp=vglnk_jsonp_138019210527110)
put downloaded lib into COCOS2DX_ROOT/external/emscripten
And you should do following steps to run WatermelonWithMe and CocosDragonJS
download resources of WatermelonWithMe and CocosDragonJS
http://api.viglink.com/api/click?format=go&key=9b4efad421c8b103b2c94b796db973b0&loc=http%3A%2F%2Fwww.cocos2d-x.org%2Fnews%2F134&subId=d654e26afef9085d79aba37dfe97be28&v=1&libId=ecb08019-ccd8-442e-ba80-3415ca773619&out=https%3A%2F%2Fgithub.com%2Fminggo%2Fcocos2d-js-tests%2Ftree%2Ffor-cocos2dx%2Fgames&ref=https%3A%2F%2Fwww.google.co.in%2F&title=Cocos2d-x%20%7C%20cocos2d-x-2.1.5%20released&txt=here&jsonp=vglnk_jsonp_138019214388811
put downloaded resources into samples/Javascript/Shared/games
There is one solution works for me.
Open cocos2d-win32.vc2010.sln or cocos2d-win32.vc2012.sln , delete the code below:
GlobalSection(NestedProjects) = preSolution to the end of this GlobalSection.

SQL Server Agent Error on running an SSIS package

When trying to execute an SSIS package I get the following error:
Date 14/08/2013 15:02:42 Log Job History (test)
Step ID 1 Server YGAL1-MOBL1 Job Name test Step Name ssis
Duration 00:00:00 Sql Severity 0 Sql Message ID 0 Operator
Emailed Operator Net sent Operator Paged Retries Attempted 0
Message Executed as user: GER\YGAL1-MOBL1$. Microsoft (R) SQL Server
Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright
(C) Microsoft Corporation 2010. All rights reserved. Started:
15:02:42 Error: 2013-08-14 15:02:42.84 Code: 0xC0011007
Source: {0AF31012-7A56-4B28-92EF-BE439E68E6F0} Description:
Unable to load the package as XML because of package does not have a
valid XML format. A specific XML parser error will be posted. End
Error Error: 2013-08-14 15:02:42.84 Code: 0xC0011002 Source:
{0AF31012-7A56-4B28-92EF-BE439E68E6F0} Description: Failed to
open package file "C:\Users\ygal1\Documents\Visual Studio
2008\Projects\Integration Services Project2\Integration Services
Project2\Package.dtsx" due to error 0x80070005 "Access is denied.".
This happens when loading a package and the file cannot be opened or
loaded correctly into the XML document. This can be the result of
either providing an incorrect file name was specified when calling
LoadPackage or the XML file was specified and has an incorrect format.
End Error Could not load package "C:\Users\ygal1\Documents\Visual
Studio 2008\Projects\Integration Services Project2\Integration
Services Project2\Package.dtsx" because of error 0xC0011002.
Description: Failed to open package file
"C:\Users\ygal1\Documents\Visual Studio 2008\Projects\Integration
Services Project2\Integration Services Project2\Package.dtsx" due to
error 0x80070005 "Access is denied.". This happens when loading a
package and the file cannot be opened or loaded correctly into the XML
document. This can be the result of either providing an incorrect file
name was specified when calling LoadPackage or the XML file was
specified and has an incorrect format. Source:
{0AF31012-7A56-4B28-92EF-BE439E68E6F0} Started: 15:02:42 Finished:
15:02:42 Elapsed: 0.046 seconds. The package could not be found.
The step failed.
Any ideas on how can I solve it?
i had a similar problem and what i did to get my package to run was:
a. Open Job properties in SQL Server
b. On the Steps page in the Package field: I used the entire folder name instead of the mapped name, for example: \share\allusers\myuserid\mypackage.dtsx instead of A:\mypackage.dtsx
Best.
It looks to me like the Service account for the SQL Agent doesn't have permissions to read package.dtsx.
Maybe check which account is running the SQL Agent & give it NTFS read permissions to C:\Users\ygal1\Documents\Visual Studio 2008\Projects\Integration Services Project2\Integration Services Project2
Or store the DTSX file in a location the SQL Agent account can access?

Google drive Dredit sample app for dotnet

I was following exact the same steps as described in this article to test the dotnet app.
https://developers.google.com/drive/examples/dotnet
My env is visual studio 2010 and IIS 7
Everything was fine. The app deployment was successful and I could see the login screen and the "allow access" dialog. However once I granted access, I saw the following error.
Can anyone help?
Thanks,
Qiang
Server Error in '/' Application.
Failed to find or load the registered .Net Framework Data Provider.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
Source Error:
Line 82: {
Line 83: StoredCredentialsDBContext db = new StoredCredentialsDBContext();
Line 84: StoredCredentials sc = db.StoredCredentialSet.FirstOrDefault(x => x.UserId == userId);
Line 85: if (sc != null)
Line 86: {
Source File: C:\Qiang\DrEdit\Models\Utils.cs Line: 84
You have to install Microsoft SQL Server Compact 4.0, which is used by the Entity Framework to map model classes into database entities.

Error build open rasta castle windsor

I try to build OpenRasta Castle Windsor.
Firstly, I clone Openrasta Castle Github Repository. And I execute make.bat from command prompt. But I got these error:
D:\Software\dotNET\OpenRasta\openrasta-castle-windsor>C:\Windows\Microsoft.NET\F
ramework\v4.0.30319\msbuild.exe build\build.proj
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.488]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 18/04/2012 10:46:48.
Project "D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj
" on node 1 (default targets).
D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj(11,75):
error MSB4064: The "CurrentProjectFile" parameter is not supported by the "Init
ializeOpenWrap" task. Verify the parameter exists on the task, and it is a sett
able public instance property.
D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj(11,5): e
rror MSB4063: The "InitializeOpenWrap" task could not be initialized with its i
nput parameters.
Done Building Project "D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\bu
ild\build.proj" (default targets) -- FAILED.
Build FAILED.
"D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj" (defau
lt target) (1) ->
(_Initialize target) ->
D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj(11,75)
: error MSB4064: The "CurrentProjectFile" parameter is not supported by the "In
itializeOpenWrap" task. Verify the parameter exists on the task, and it is a se
ttable public instance property.
D:\Software\dotNET\OpenRasta\openrasta-castle-windsor\build\build.proj(11,5):
error MSB4063: The "InitializeOpenWrap" task could not be initialized with its
input parameters.
0 Warning(s)
2 Error(s)
Time Elapsed 00:00:00.06
Thanks in advance.