I am trying to use CsvHelper in my SSIS project specifically as a source component in my data flow. Unfortunately, SSIS doesn’t integrate with NuGet, so I would think that the CsvHelper DLL needs to be registered to the GAC. I haven’t worked directly with the GAC in years. Is it just the CsvHelper DLL that I need to register? If so, how do I find it?
The crux of whether you can put something into the GAC is whether the DLL is strongly signed. Looking at the project, I see an entry for an SNK (strongly named key) so that's checked off the list.
How to find it
Assuming it's on your system from a command/dos prompt
cd /d C:\
dir /s /b csvhelper.dll
If you can find the specified DLL, then you need to GAC it
How to GAC it
Open a visual studio command prompt as a local administrator (or find your GAC installation and open a command prompt as an administrator)
gacutil.exe -if Path\to\my\dll\cvshelper.dll
Note that you may need to specify the path to the gacutil.exe
Gac find
This will be the same mechanism as finding the dll above. Open a command prompt and search for it. Your results may vary but here's what my box looks like
C:\>dir /s /b gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe
Lather, rinse, repeat
You'll need to ensure the DLL has been GAC'ed on any box that will be running your SSIS solution so keep track of any hiccups you have doing this on your local machine as it'll need repeating on the actual servers.
Related
According to this article one can create SSIS jobs to query Kusto with a KQL query.
How can this be done? How would one connect to and query ADX from an SSIS package?
The problem you'll have is that SSIS .NET Tasks don't really understand nuget. The design experience will allow you to build a script/component that uses a nuget package but the moment you close the designer, the packages folder is trashed/not serialized into the package. When the package Executes, the task/component will fail because the expected libraries are not there and the SSIS engine does not have the insight to call a package manager to fix it.
Blessedly, these DLLs ought to be strongly signed so making this work should be a matter of installing them into the Global Assembly Cache (GAC) on your development machine(s) and corresponding servers. Something like the following command, which might need to be run an admin context
gacutil -if \path\to\the\assembly\Microsoft.Azure.Kusto.Data.dll
You likely have a gacutil installed but not in your command path dir /s /b gacutil.exe will ferret out locations.
C:\Program Files (x86)>dir /s /b gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\gacutil.exe
C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe
From your comment, what is csb for example I presume based on this link that it's a connection string builder object. Which makes sense, the code is requesting that it opens a SqlConnection object and the constructor needs to know where to go, what credentials to use, etc.
I am newbie at analysis services. When I try to execute ssis package on command prompt with dtexec command, I get the error :
Could not load file or assembly Microsoft.AnalysisServices.AdomdClientUI.dll Version 13.0.0.0
I tried few solutions which I found internet but they didn't work.
Thanks for advice.
Edit 20180604: Cumulative Update 1 for SQL Server 2016 SP2 fixes the issue.
Pre-20180604 answer: There's now a workaround for this bug, published here:
There is a bug, it will probably be corrected in SP2 CU1 which I've
been told will be released at the end of the month. We got a
workaround suggestion from MS, but that was not enough.
In short: The provided workaround does not work as is, but I found out
what more to do so now it works on the server with SP2
Longer: The provided workaround does not work as is because it does
register the correct assembly and the correct version (v14), but when
the package is run it will still search for the previous version v13. I
have tested and this is the case even if I have SP2 on my laptop,
rebuild all in the SSIS project and deploy – it will still be v13 that
is search for. It does not help to register v13 of the assembly, since
that version does not have a method that is called, so that will just
lead to other error messages.
The resolution I made on the server is to put in a binding redirect in
the .NET machine.config so that v14 is used even though v13 is searched
for.
Step-by-step I did, run from an elevated CMD:
1: Register the assembly: "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe" /i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.AnalysisServices.AdomdClientUI.dll"
You should get message one assembly successfully registered in GAC.
2: (Optional) Verify registration:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe" /l Microsoft.AnalysisServices.AdomdClientUI
You should see message it is version 14.0.0.0 registered
3: Configure version redirect in machine.config (be careful when
editing!!)
File to edit:
"C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config"
The element to add content to is
configuration/runtime
On the server I fixed it on, this element was completely empty, i.e.
<runtime/>
If it is not empty, of course keep what’s in the element and add the
assemblyBinding element seen below.
Change/add so that the whole element contains this instead:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Microsoft.AnalysisServices.AdomdClientUI"
publicKeyToken="89845dcd8080cc91"
culture="neutral"/>
<bindingRedirect oldVersion="13.0.0.0"
newVersion="14.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
5: Save the file. The package should now work.
When a fix in CU1 is installed, these steps should be done:
1: Remove the above added assemblyBinding element and save the file
2: Remove the dll that was added to the GAC: "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe" /u Microsoft.AnalysisServices.AdomdClientUI
In my server, "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies\Microsoft.AnalysisServices.AdomdClientUI.dll" was version 13, so in step 1 v13 was being registered (you can check the version by right clicking/Properties and then clicking on Details tab).
To solve this I:
Unregistered v13 with "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe" /u Microsoft.AnalysisServices.AdomdClientUI
Copied v14 from a computer with VS installed to "C:\Program Files\"
For step 1, I executed "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64\gacutil.exe" /i "C:\Program Files\Microsoft.AnalysisServices.AdomdClientUI.dll"
The steps when the fix arrives remain the same (with the addition of deleting "C:\Program Files\Microsoft.AnalysisServices.AdomdClientUI.dll").
Note: if you're running your packages in 32-bit instead of 64-bit, the machine.config that needs to be edited is the one located at c:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config
SQL_AS_ADOMD.msi includes Microsoft.AnalysisServices.AdomdClient.dll, but not Microsoft.AnalysisServices.AdmomdClientUI.dll.
Microsoft.AnalysisServices.AdmomdClientUI.dll is included in SQL Management Studio, but version 13.0.1700.441 that I had as a drop in replacement failed due a new method being invoked, and I have not been able to locate a matching SQL 2016 SP2 version. Presumably awaiting a hotfix from Microsoft now.
You can get the Microsoft.AnalysisServices.AdomdClientUI.dll from MS SQL Server Feature Pack component SQL_AS_ADOMD.msi.
Presumably you have SQL server 2016, so you can get it from the SQL 2016 Feature Pack.
With the version of SQL Server Data Tools included with SQL Server 2012 you could create a report definition and copy the .rdl into the folder below and it would appear when you created a new project item.
C:\Program Files (x86)\Microsoft Visual Studio
10.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
I'm trying to achieve the same with Visual Studio 2017 and the Report Project extension though this does not appear to work when I copy the file to the folder below:
C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
How can I get template report items to appear for report projects?
The new location is now under (replace Enterprise with whatever your sku is)
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSDTRS\ProjectItems\ReportProject
UPDATE: This now looks to have changed to
C:\Program Files (x86)\Microsoft Visual
Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject
It looks like the folder path has changed now that SSDT is no longer in Preview - it was released 4-10-2018 for the first complete release. Anyways, I had an SSRS template that disappeared after installing the new release. Upon inspection, I found that the folder path for SSDT templates was moved from the Enterprise to SQL paths (remove the spaces):
SSAS: C:\Program Files (x86)\Microsoft Visual
Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSAS\
SSIS: C:\Program Files (x86)\Microsoft Visual
Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSIS\
SSRS: C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject\
I have created a custom library(CodeLibrary) which internally references the dlls Microsoft.TeamFoundation.Client and Microsoft.TeamFoundation.WorkItemTracking.Client.
I added this custom Dll codelibrary.dll to my SSRS report. and the expression of one of the field as
=codelibrary.codefunction.GetValue(1000)
codefunction is the class and GetValue is the method.
When I preview the report, I get the error "Error while loading code module: 'CodeLibrary,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null'. Could not load file or assembly 'CodeLibrary,Version1.0.0.0, Culture=neutral,PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified."
I am using VS2013, I have placed the custom library DLL in the path
C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies
I have tested the custom library with a WPF application and it works fine.
I am not able to figure out what is causing this error.
I didnt have to modify rssrvpolicy.config file.
I added the custom dll to the following paths and it worked:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PublicAssemblies
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies
C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\bin
In visual studio 2015, I had to copy the dll to:
C:\Program Files (x86)\MSBuild\14.0\Bin
You should copy your custom library to the ReportServer\Bin folder ex: C:\Program Files\Microsoft SQL Server\MSRS10_50.R2\Reporting Services\ReportServer\bin
Then modify the rssrvpolicy.config in ReportServer folder, find "$CodeGen$" and add the following code
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="CoDeMagSample"
Description="CoDe Magazine Sample. ">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSRS10_50.R2\Reporting Services\ReportServer\bin\YOURLIBRARY.dll"
/>
After that, Stop and Start Reporting Service from Reporting Service Configuration Manager.
Hope this help.
Adding - In Visual studio 2019, I copied the dll to:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS
I am using "CUDA bu Example" book to get started with CUDA.
But when I included all header files given by book then got ERROR as
Error 1 error LNK1104: cannot open file 'glut32.lib' D:\book\book\LINK book
I am using Visual Studio 10
Please help me out of this
I found the same error while setting it up in Visual Studio 2010
However, I also found a fix and wanted to share it.
Just copy and paste the glut32.lib file to MicrosoftSDKs folder, as this is the default location of VC++ linker location. To be exact
C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
You probably have to build the "shrUtils_vs2010.sln" solution if you haven't done it.
The file is in "\path_to_SDK\NVIDIA GPU Computing SDK 4.2\shared" folder.
Copy the glut32.lib file from the lib folder in "cuda by example" to the folder below:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib\Win32
I have tested this solution and it worked for me in visual studio 2015
1: Copy glut32.dll to your project directory (where your source.cpp is)
2: Copy glut.h to C:\Program Files\Microsoft Visual Studio 14.0\Vc\Include\gl (gl folder should be created manually)
3: Copy glut32.lib to C:\Program Files\Microsoft Visual Studio 14.0\Vc\lib done.