Unable to build SSIS package from command line: Missing switch argument. Configuration name required for /build switch - ssis

I am trying to script out the building of an SSIS solution in VS 2013.
I keep getting the error: Missing switch argument. Configuration name required for /build switch.
My Command is this from PowerShell:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE> .\devenv.exe C:\Dev\SSIS\RCLShippedFileProcess\RCLShippedFileProcess.sln /build /project RCLShippedFile /projectconfig "Debug"
When I build within Visual Studio, I can see that my ProjectName and the Config are what I am passing in. This certainly has me stumped!
Documentation about this is here.

I ended up resolving the issue, I needed to call the devenv.com application, which is ultimately what devenv.exe calls. If you call devenv.com directly it worked.
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE> .\devenv.exe C:\Dev\SSIS\RCLShippedFileProcess\RCLShippedFileProcess.sln /build "Debug"

Related

Azure Devops Build SSIS task

I have created an SSIS package using VS 2017 and added the project to Azure Devops. I am trying to setup a build task in Azure Devops using the SQL Integration Service add in. Everything I am doing is setup on my machine which includes the Agent Pool etc. When trying to setup parameters for the SSIS build the Devenv Version selection only gives me 12 and 14. VS2017 doesn't appear. As a result it appears that when I do a build the incorrect version on devenv is used and the build (even though it doesn't say its failed) fails.
The version the build is using is C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Devenv.com but should be using C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE>Devenv.com
How do I get to DEVENV config parameter to include the Hosted VS2017 version?
The following web page gives an idea of what I am trying to achieve: -
http://chamindac.blogspot.com/2018/09/build-and-deploy-ssis-with-azure-devops.html
I ended up using a powershell script instead.
The script has one line to run the build.
&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com" "C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS.sln" /rebuild
I place the code in a .ps1 file and put it into the root of my repo. I then used the Powershell config to reference the file and it worked.
I did a similar thing for the deployment where I used : -
ISDeploymentWizard /S /SP:C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS\bin\Development\POC_SSIS.ispac /DS:serverName /DP:/SSISDB/POC_SSIS/POC_SSIS

Error: Could not load file or assembly Microsoft.AnalysisServices.AdomdClientUI

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.

Run a SSIS Package Using Batch File

need some help in executing my SSIS package from command prompt.
below is the path of my DTExec file and the package path. when i run this , i am getting an error "missing argument for option "file"
"C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\DTExec.exe"/f
"C:\Users\myname\Documents\Visual Studio 2015\Projects\SSIS tutorials\SSIS tutorials\filtering duplicates using fuzzy grouping.dtsx"
please help
When installed Integration Services the DTExec path (C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\) is added by default to PATH environment variable so you can use the following command (make sure it is one line command)
Dtexec /f "C:\Users\myname\Documents\Visual Studio 2015\Projects\SSIS tutorials\SSIS tutorials\filtering duplicates using fuzzy grouping.dtsx"
Also check spacing between arguments
Reference
dtexec Utility (SSIS Tool) TechNet article
I was able to resolve my issue by placing everything on one line as criticalfix and Hadi mentioned above. Make sure there are no returns after the /f argument, just a space.

SSRS Custom Assemblies could not be loaded under Visual Studio 2017

I have just installed VS 2017 and moved my SSRS project from VS 2015 to 2017. I have a custom assembly which is working fine under VS 2015, but not 2017. It says
Error while loading code module: 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. Details: Could not load file or assembly 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I had exact same problem under VS 2015 and the solution was moving my custom dll under
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\PrivateAssemblies
So, I have moved my custom dll under
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies
which I believe is the correct path for VS 2017 and check file/folder permissions and set them identical, but no way, it still throws same error.
What am I missing?
This now requires two locations for the dll - the first works for new VS2017 RS projects, but upgraded projects also need the dll in the second location:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSRS
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PrivateAssemblies
I too have run into this issue, what fixed it for me was doing what was mentioned above and also editing the RSPreviewPolicy.config located in
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsof‌​t\SSRS
I set PermissionSetName="FullTrust" in all of the < CodeGroup>< /CodeGroup>
blocks.
TLDR - C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSDTRS
I was having the same problem - try using the Fusion Assembly Binding Log Viewer to peer into what the problem is as per http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx
With "Log bind failures to disk" enabled (and restarting VS) the devenv.exe process folder in your log location should then produce log files when you recreate the problem. Part of what it will tell you is the various folder locations VS is checking for assemblies. My issue was that I hadn't copied a required assembly. You might also be having a problem with it not liking a specific version of a dll it is trying to load (for instance .Net 4 v 2), the logs will highlight that as well.
The viewer tool is pretty poor in terms of being able to sort columns. I found it much easier to just open C:\FusionLogs\Default\devenv.exe (where I had set C:\FusionLogs as the custom log path), sort by date modified and watch as new files were created when trying to add the data source.
In terms of which folder to use - I initially dropped them into PrivateAssemblies which worked for creating the data source / reports. However when it came to build the preview the report I then got another could not load assemblies message. Again using the log viewer, but this time in the PreviewProcessingService.exe folder the error suggests the only directory that checks for the assemblies is: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSDTRS - this location works for both creating and previewing reports.

Could not load file or assembly error on adding custom libraries in SSRS reports

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