Using Google Apis Auth Client Library with SSIS - ssis

I have an integration services project in which I use a script component as a source. In the script I read data from a Google sheet and in order to do that I have to authenticate using oauth protocol. I tried to make the necessary references using NuGet but receive errors and have been told that NuGet does not work with SSIS. I have tried to manually make the references and the script builds but when I run the package I get this runtime error:
Could not load file or assembly 'Google.Apis.Auth.PlatformServices,
Version=1.9.3.19383, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab'
or one of its dependencies. The system cannot find the file specified.
Any ideas on how I can get this to work?

I was able to clear this error by adding all dll's in the NuGet package into the GAC and then referencing from there. I then faced a version dependency error which I overcame by adding a binding redirect in my machine.config. Not the most elegant solution but I just needed to make it work and other methods I tried weren't meeting with success.

Related

error when uploading app to windows store

I get this error when uploading the msix to the store:
Package acceptance validation error: The package Documents002.msix doesn't contain any Application elements in the app manifest file.
and another error, that dont uderstand:
Package acceptance validation error: The PublisherDisplayName element in the app manifest of Documents002.msix is Javier Gastón, which doesn't match your publisher display name: Javier Gastón.
I'm using a .py that I've passed to exe, after that I made it installable with Advance Installer Express, and after that I used microsft MSIX Packaging Tool, (so I've not used vs for the proy).
How can I solve this problem?
I expect to solve this and manage to upload without errors the app to the Windows Store

Azure storage connection to Datalake G2 in SSIS using Access Key

Test connection Connection manger in SSIS to the azure storage using access key succeeded.
While copying data using Flexible file task in SSIS throwing an error "[Flexible File Task] Error: Could not load file or assembly 'Microsoft.Azure.Storage.Common, Version=11.1.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified."
The Folder paths and filenames everything seems correct.
What would be reason?
Azure.Storage.Common nuget package getting removed as soon as I close script task to run the package and throws same error
This is a spurious error message. It is a security error
Go to your storage account, under Settings, Configuration, change Minimum TLS version from 1.2 to 1.0.
Or if you want to keep the 1.2 channel, you will need to modify the registry on the computers that may run the SSIS package
To use TLS 1.2, add a REG_DWORD value named SchUseStrongCrypto with data 1 under the following two registry keys. HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319
https://billfellows.blogspot.com/2022/01/ssis-azure-feature-pack-and-flexible.html
Furthermore, based on your comment referencing nuget. Nuget and SSIS Script Tasks and Components do not mix. The Developer experience of crafting a script knows how to use the nuget package manager to acquire the assemblies. However, when you close the script/component editor, those bits are not serialized with the project. When the package executes, there is no part of the run-time engine that identifies this assembly is from a nuget source and therefore, we need to download those bits. Instead, it fails when it cannot find the reference.
It still seems weird that a script task/component is throwing an exception about the azure bits as the Flexible File Task is not a script. https://learn.microsoft.com/en-us/sql/integration-services/control-flow/flexible-file-task?view=sql-server-ver15
Installing the correct Azure Feature Pack for Integration Services (SSIS) targeting the SQL server resolved my issue.

TKCustomMap Version Conflict

This issue has been reported on GitHub here -
https://github.com/TorbenK/TK.CustomMap/issues/325
Has anyone else has struggled with this? I was stoked to find this nuget package because it does exactly what I'm looking for but it needs Places and some other GooglePlayServices installed and I can't install them because of this conflict.
I'm also not sure if uninstalling TK.CustomMap and then installing the Play Services would even help because the person who reported the issue on GitHub said-
I converted my app to .net 2.0 and had to use the newest Google play services
60.1142.1 for AdMob to work. It wouldn't install until I uninstalled TK.CustomMap, and now TK.CustomMap won't reinstall because it only want to use GooglePlayServices 42.1021.1
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Xamarin.GooglePlayServices.Tasks. Reference the package directly from the project to resolve this issue.
HunterTracker.Android -> Xamarin.GooglePlayServices.Base 60.1142.1 -> Xamarin.GooglePlayServices.Tasks (= 60.1142.1)
HunterTracker.Android -> HunterTracker -> TK.CustomMap 2.0.1 -> Xamarin.GooglePlayServices.Location 42.1021.1 -> Xamarin.GooglePlayServices.Tasks (= 42.1021.1).
That's pretty much the exact error I'm getting trying to install the other packages. There's no resolution on github.
Anybody found a work around? Or does anyone know how to "Reference the package directly from the project"?
Thanks to SushiHangover's comments above pointing me in the right direction I was able to discover what I needed to do here. I had an error updating the nuget packages of TK.CustomMap at first because v26 Xamarin.Android.Support.Vector.Drawable was targeting MonoAndroid8.0 and the update to v27 must target MonoAndroid8.1 So it took quite a bit just to be able to update the nuget packages in order to get the assemblies with later versions so I could use TK.CustomMap in my solution. But I was eventually able to get there. Here were the steps I followed (as best I can remember). I am unable to compile ios right now because I don't have a MAC so that fix will have to come later. This fix is for the shared project and Android project only
Download the TK.CustomMap-master from github
Extract it and delete the Sample project completely (I also deleted the UWP project as I'm not really interested in that at this time)
Opened and built then closed. Deleted packages folder, vs folder, bin and obj from Android and Shared Project (this step is probably not necessary but I did it so...)
In the packages.config in Android changed all targets from monoandroid80 to monoandroid81 save file
In the TK.CustomMap.Android.csproj for every v26.0.1 of any Xamarin.Android.Support or other Xamarin.Android util package changed 26.0.1\lib\MonoAndroid80 to 27.0.2.1\lib\MonoAndroid81 - save file
In the nuget folder in TK.CustomMap.nuspec changed the target framework in this section
<group targetFramework="lib\MonoAndroid7.0">
<dependency id="Xamarin.GooglePlayServices.Location" version="42.1021.1" />
<dependency id="Xamarin.GooglePlayServices.Places" version="42.1021.1" />
<dependency id="Xamarin.Android.Maps.Utils" version="0.5.0" />
<dependency id="Xamarin.Forms" version="2.5.0.91635" />
<dependency id="Newtonsoft.Json" version="10.0.3" />
</group>
to
<group targetFramework="lib\MonoAndroid">
so it could target any version
Opened and updated all nuget packages using package manager (not console). Built debug and release builds
At this point opened solution I had tried to implement TK.CustomMap in previously to attempt the fix. Remember the original issues was that the latest frameworks could not be used and 42.1021.1 frameworks were unable to locate com.google.gms.location and com.google.gms.places.ui files so they had to be updated or no TK.CustomMap
In the problem solution uninstalled TK.CustomMap from all projects
In the problem solution Android project added reference to all the dlls in the release folder of the Android bin file from TK.CustomMap project.
Installed updates for all Xamarin.Android frameworks in problem solution through Package Manager (not console)
Installed updates of all other nuget packages for all projects using Package Manager (not console)
Installed TK.CustomMap to Shared project using Package Manager (not console)
Added the References to the android project a second time. May or may not have helped.
Installed TK.CustomMap Nuget Package using Package Manager (not console)
Built and ran on Live Player successfully!!
Thanks to Sushi Hangover for the advice. I haven't seen any comprehensive tutorials anywhere on how to accomplish this so I figured I would post my own answer in case anyone else was looking. Definitely if you are new to VS all this stuff is no walk in the park in the beginning.
Thanks to #Travis Fleenor. This is my solution. I change a bit your sequence in order to work on mine.
1. Make sure the original proyect from github (https://github.com/TorbenK/TK.CustomMap) works and you can run it.
2. Update the nugets where you get the conflict. In my case I got conflicted in googleplay library version. I updated it in the original proyect and then assure it could run it.
3. Compile entire solution in release mode. Then, copied the generated dll from bin/release and pasted them in a folder in my desktop.
4. I referenced those dll to shared proyect and android proyect. I only used nuget package manager to install some missing packages needed for the tk.custom. Notice that you only will reference some dll that the proyect accept. For the mayority Visual will prompt ' dll already referenced' something.
5. first reference your shared proyect, later your android one. That's all. make sure the you ca recompile solution.
Hope this helps

Azure function wants two versions of the same DLL

I have an azure function that calls a static method from a DLL I created separately and uploaded to the function folder, along with all of its dependencies (all dll's from the release folder were uploaded to the azure function).
When i try to call the function i receive an error
Could not load file or assembly 'Microsoft.SharePoint.Client.Runtime, Version=16.1.3912.1204
If i upload this version of Microsoft.SharePoint.Client.Runtime, i receive an error that it wants the other version again:
Could not load file or assembly 'Microsoft.SharePoint.Client.Runtime, Version=16.0.0.0
How can this be? It runs successfully outside Azure. Why does it want two versions of the same DLL? The project references 16.1.3912.1204, and this is the version of the dll in the \bin\release folder.
Side note: my .NET GAC folder contains version 16.0.0.0. If it is the case that for some reason inside the Microsoft.SharePoint.Client dll's it needs to reference both versions, how can i include two versions of the same file in an azure function?
Do not try to upload global nuget packages manually. Instead refer this thread, How can I use NuGet packages in my Azure Functions? to import nuget libraries to your Azure function ecosystem.
After that, you can directly use those c# libraries as, for example
using Microsoft.SharePoint;
Ensuring all project references pointed to packages folder (nuget) dll's to eliminate version conflicts and then uploading all DLL's from the bin folder resolved the issue in this case.

Google Adsense DotNet API 1.4 Cannot resolve reference assemblies

It is a windows phone project and it was working fine until I taught to implement the Payment Reports in it and upgraded to the 1.4 now I added the reference using the nuget package found here http://www.nuget.org/packages/Google.Apis.AdSense.v1_4/ chnaged the v1_3 to v1_4 and now I keep getting this error.
Error 1 Cannot resolve reference assemblies. Please check the reference assemblies. Cannot resolve dependency to assembly 'Google.Apis, Version=1.7.0.24060, Culture=neutral, PublicKeyToken=null' because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.
I tried uninstalling the Nuget Package from the Nuget Manager completely and then Installed v1_3 again but now even this has stopped working...please can you tell me where did I go wrong?? and how to fix this issue now...