Showing posts with label SSDT. Show all posts
Showing posts with label SSDT. Show all posts

Friday, 20 September 2019

GIT Snack: missing buttons in Team Explorer

Case
I can commit and sync, but where are the GIT buttons Pull Request, Work Items and Builds in my Visual Studio's Team Explorer?
Missing 3 Git buttons: Pull Request, Work Items and Builds

















Solution
You are not connected to the project in GIT. Let's connect to your project:
  1. In Visual Studio/SSDT go to Team in the menu and click on Manage Connections...
  2. In the Team Explorer an option "Manage Connections" appears. Click on it and choose Connect to a Project...
  3. A new GIT window "Connect to a Project" appears, find and select your project and click on the Connect button.
Connect to GIT project
















After connecting the 3 buttons Pull Request, Work Items and Builds will appear in the Team Explorer pane and then you can start a Pull Request from within Visual Studio/SSDT.
All buttons are now available


































Monday, 29 October 2018

Bug: Script Task - Cannot load script for execution

Case
My Script Tasks are running fine in Visual Studio 2017, but when deployed to the catalog I get an error in all Script Tasks: Cannot load script for execution
Error: Cannot load script for execution










Solution
There is a bug in SSDT for Visual Studio 2017 (15.8.1). The (temporary) workaround is to NOT use SSDT 2017 for deployment. Instead you could use SSMS to deploy your SSIS projects.
Deploy packages with SSMS



















Or use ISDeploymentWizard.exe in the folder C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSIS\150\Binn\  to deploy your projects.

Expect an update soon!


UPDATE: SSDT 15.8.2 is available
Fixed an issue that deploying SSIS project which contains packages containing Script Task/Flat file destination to Azure-SSIS will result in the packages failing to execute in Azure-SSIS






Wednesday, 23 August 2017

Where is the new SSIS project type?

Case
I just downloaded the new SSDT for Visual Studio 2017 (15.3.0 preview) and although I selected Integration Services during installation it isn't showing in the New Project window.
SSDT for Visual Studio 2017 (15.3.0 preview)























Solution
You probably already had Visual Studio 2017 installed and added the Analysis Services and Reporting Services project types via Extensions and Updates.


1) Remove projects
Go to Extensions and Updates and remove both the Analysis Services and Reporting Services projects.
Remove SSAS and SSRS projects



















After that close Visual Studio and let the VSIX installer, uninstall both projects.
VSIX (un)installer

















2) Uninstall SSDT and Install SSDT
Then first uninstall SSDT completely. And then install SSDT (Repair didn't work).
Uninstall and install SSDT






















3) Create new SSIS Project
Now open Visual Studio and create a new SSIS project.
New SSIS Project







Wednesday, 9 March 2016

Switching Target Server Versions for custom components

Case
Microsoft just released the first multi-version SSDT which can edit 2012, 2014 and 2016 SSIS packages. You can now change the Target Server Version in the properties of your SSIS project and then SSDT will convert the entire project to that SSIS version. But how can you make your custom components 'switchable'?
Target Server Version












Solution
For this example I will use my own Zip Task which has a 2008, 2012, 2014 and 2016 version. There are different approaches and this is only one of them. And it doesn't descibe how to create a custom task it self, but you can read that here and here.

In a Visual Studio Solution I have my 4 editions of the Zip Task. The projects and the assemblies have the same names and use the same strong name key file.
Solution with different editions of my Zip Task





















AssemblyInfo
If the assemblies are identical there can only by one assembly in the GAC at a time, but we need them all in the GAC. So I gave my assemblies different versions. You can do that in the AssemblyInfo file of your project. See the red rectangles in the image below.
AssemblyInfo















GAC
Now I can have all versions in the GAC. Different version number, but same strong name key.
2012, 2014 and 2016 version in the GAC












This looks very similar to the out-of-the-box tasks and transformations like the FTP task. Different version number, but the same strong name key.
Different editions of the FTP Task in the GAC











UpgradeMappings - Mappings
Now we need to tell SSIS how to convert between 2012, 2014 and 2016. There is a subfolder in the DTS map called UpgradeMappings. Each version of SSIS has its own folders (even the 2008 version):

SSIS 2012: C:\Program Files (x86)\Microsoft SQL Server\110\DTS\UpgradeMappings
SSIS 2014: C:\Program Files (x86)\Microsoft SQL Server\120\DTS\UpgradeMappings
SSIS 2016: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\UpgradeMappings

In each of these folders you need to add an XML mapping file with the name of your task (or transformation/enumerator/connection manager). For example ZipTaskMapping.xml. In this file you need to tell which assembly is the old version and which one is the new version of your task. For example: in the SSIS 2014 UpgradeMappings folder I will use the 2012 assembly as old and the 2014 as the new assembly. The assembly strong name string can be copied from the UITypeName property in your task code (search for "UITypeName"). You can also find an example file called mapping.xml.sample in the folder which you can use to start with. Here is my 2014 example:
 
<?xml version="1.0" encoding="utf-8"?>
<Mappings xmlns="http://www.microsoft.com/SqlServer/Dts/UpgradeMapping.xsd">
  <!-- Extensions -->
  <ExtensionMapping tag="ZipTask"
      oldAssemblyStrongName="ilionx.SSIS.Tasks.Zip, ilionx.SSIS.Tasks.Zip, Version=1.12.0.0, Culture=neutral, PublicKeyToken=4b5c6d755ae87bf7"
      newAssemblyStrongName="ilionx.SSIS.Tasks.Zip, ilionx.SSIS.Tasks.Zip, Version=1.14.0.0, Culture=neutral, PublicKeyToken=4b5c6d755ae87bf7" />
</Mappings>


The tag property is for logging purposes only, but it seems to be handy to put your tasks name in it: ZipTask.

UpgradeMappings - Extensions
In a second file we need is to set an alias for our assembly. This should be done for SSIS 2014 and later only. When you use this file, SSDT will change the package XML code for your task (when you add it to the package). Instead of using the strong name string as CreationName it will use this alias. The filename should be something like ZipTaskExtensions.xml. Here is my 2014 example:
<?xml version="1.0" encoding="utf-8" ?>
<Extensions xmlns="http://www.microsoft.com/SqlServer/Dts/Extensions.xsd">
  <Tasks>
    <Task Identifier="ZipTask" Model=".NET">
      <CreationName>ilionx.SSIS.Tasks.Zip, ilionx.SSIS.Tasks.Zip, Version=1.14.0.0, Culture=neutral, PublicKeyToken=4b5c6d755ae87bf7</CreationName>
    </Task>
  </Tasks>
</Extensions>

I used the same Identifier for SSIS 2016. The only difference is the version number. The rest is identical. After adding this extensions file, restart SSDT and add your custom task to the control flow and check the package XML.
Difference in XML code














After you have done this for your own custom SSIS components you can safely switch between the Target Server Versions (or upgrade packages with your custom component in it).

You can download the XML example files here or download and install my ZipTask and browse to the UpgradeMappings folders. I have added these XML files in my installers. The installer now copies the assemblies to the task folder and installs them in the GAC. The XML files are copied to the UpgradeMappings folder. Some extra info on upgrademappings on MSDN and here a blogpost from Matt Masson.

Thanks to the SSIS team for pointing me in the right direction with the XML files and letting me play with an early edition of the multi version SSDT!

What I still need to figure out is how to have only one edition of the projects and just switch references if I want to create different versions for 2008, 2012, 2014, 2016, etc. For one component that doesn't change that much this approach is no problem. If you have a whole bunch of custom components and that perhaps often change then this approach with different projects for each version of SSIS is hard to maintain.


Saturday, 11 October 2014

Method not found: IsVisualStudio2012ProInstalled()

Case
I just installed SSDT 2012 on top of SSIS 2012 with SSDT 2010, but when I want to run a package I get an error:

Method not found: 'Boolean Microsoft.SqlServer.Dts.Design.VisualStudio2012Utils.IsVisualStudio2012ProInstalled()'.
















Solution
Apparently the Microsoft.SqlServer.Dts.Design dll belonging to SSDT 2012 is not installed in the GAC during installation. The version belonging to SSDT 2010 is still in the GAC. On the left side the assembly before fixing this bug and on the right side the assembly after fixing this bug. Ironically the assembly from 2012 has a lower version than 2010. Dave found a solution for it.
Microsoft.SqlServer.Dts.Design dll before and after fixing the bug.

















1)  Close SSDT 2012
Close Visual Studio (SSDT) 2012.

2) Visual Studio Command Prompt
Open the Visual Studio Command Prompt as administrator (otherwise the gacutil will return an error). You can do this by right clicking the shortcut and then choose Run as Administrator.

3) Change Directory
Enter the following command to change the direcory to the PrivateAssemblies folder of SSDT 2012:
cd C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies

4) Run GACUTIL
Run GACUTIL with the following parameters to add the assembly from SSDT 2012 to the GAC:
gacutil/if Microsoft.SqlServer.Dts.Design.dll
Parameter /if will force the installation of this assembly regardsless of any existing versions of the assembly
gacutil/if Microsoft.SqlServer.Dts.Design.dll

















5) Open SSDT 2012
Now open SSDT 2012 and try running the package again to check the fix.


*UPDATE (see comment Alejandro Bello)*
If you didn't install SSDT 2010 then the GAC Util is located in a different folder. Start the regular Command Prompt as Administrator and then execute the following commands:

cd "C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0a\bin\NETFX 4.0 Tools"

gacutil.exe /if "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.Dts.Design.dll"

Different location GacUtil





Thursday, 25 September 2014

'Auto Layout - Diagram' missing in Layout Toolbar

Case
I often use the 'Auto Layout - Diagram' option in the Format-menu to auto arrange my tasks or transformations, but it costs me three clicks (/moves). All other options from the Format-menu can be found in the Layout toolbar (one click only), except the Auto Layout - Diagram option. Is there a way to solve that for 'lazy' developers?
Three clicks instead of one









Solution
Yes there is! Screens are from VS2010, but it works the same in newer versions.

1) Show Layout toolbar
First make sure the Layout toolbar is visible. If it's not visible, rightclick the toolbar and select the Layout toolbar.
Show Layout toolbar



















2) Add Button
Click on the little triangle on the right site of the toolbar and choose 'Add or Remove Buttons'. After that choose 'Customize...'. Now the Toolbar Customize window will show.
Customize window














3) Add Command
Click on the Add Command button and choose Format as category and then locate the Diagram command. Click OK to add it and click Close to close the customize window.
Add command















4) The Result
Now the new button is available in the Layout toolbar and with one click you can auto arrange your package.
One click only :-)










Monday, 16 December 2013

The process cannot acces the file 'ssisproject.ispac' because it is being used by another process.

Case
I want to run an SSIS 2012 package but I'm getting an error:
ispac file in use by other process






System.IO.IOException: The process cannot access the file 'c:\folder\ssisproject.ispac' because it is being used by another process.
     at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
     at System.IO.File.Delete(String path)
     at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow outputWindow)
     at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow outputWindow)


Solution
You have probably already restarted SSDT, but that didn't help. Open the Task Manager (Ctrl + Shift + Esc) and locate DtsDebugHost.exe under Processes and end that process (could be multiple times, end them all). Now try running the package again.
Task Manager, End SSIS Debug Host









This happens when SSDT/Visual Studio crashes during runtime. If you kill SSDT then the SSIS Debug Host will still be active locking the ISPAC file.


Friday, 9 August 2013

Use Visual Studio 2012 for SSIS 2012

Case
I want to use Visual Studio 2012 to edit my SSIS packages, but during installation of Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012,  I get an error:
Rule "Same architecture installation" failed. The CPU architecture of installing feature(s) is different than the instance specified. To continue, add features to this instance with the same architecture.
The CPU architecture of installing feature(s) is different than the instance specified. To continue, add features to this instance with the same architecture.
The CPU architecture of installing feature(s) is different
than the instance specified. To continue, add features
to this instance with the same architecture



















Solution
During installation you selected the wrong Installation Type. Although it might not sound logical, you should perform a new installation instead of adding features to the existing instance.
Do NOT add features to an existing instance





















For the sake of completeness, lets review all steps.

1) Download
First download Microsoft SQL Server Data Tools - Business Intelligence for Visual Studio 2012

2) Start installation
Start the installer and include any updates.























3) Installation type
Now the important one. Use the default installation type: Perform a new installation of SQL Server 2012.
Perform a new installation of SQL Server 2012

License






































4) Features
Select all features and then, Next, next...
Select all features (at least the first)


No errors or warnings this time





















5) Finish
Finish the installation and start SQL Server Data Tools (SSDT) for Visual Studio 2012. Now you will see the familiar BI project types.
Finished

New: the BI project templates



































6) Color themes
When you install Visual Studio 2012 Update 4 you will get an extra blue color theme which is less depressing then the light grey and dark grey color themes. Or use the Visual Studio 2012 Color Theme Editor for even more color themes.

The color themes of Visual Studio 2012








Monday, 28 January 2013

Multiple Configurations in SSDT

Case
In the SSIS Catalog we have the ability to configure for several environments by creating multiple environments (one for development, one for test), but how do we easily switch environments in SSDT while developing?
Multiple environments













Solution
In SQL Server Data Tools (SSDT) we have the Configuration Manager that can do something similar.


1) Start
Lets start with a basic package which loads a flat file into a database table. The two connection managers should be changed if we want to load data from the Test environment instead of data from the Development environment.
My basic package





















2) Package Parameter
We have to create a Package Parameter for the Flat File Connection Manager. (This Connection Manager is for this package only.) Right click the 'Clients' Connection Manager and click Parameterize. Select the ConnectionString as the property. Create a new parameter and set the scope to Package.
Parameterize Connection Manager




















3) Project Parameter
Do the same for the OLE DB Connection Manager that connects to SQL Server. Because this is a Project Connection Manager, the Scope is automatically set to Project
Parameterize Connection Manager























4) Add Configuration
Next step is to add a Configuration in addition to the existing Development Configuration. In the Standard toolbar you see a drop down called Solution Configurations. Open it and select Configuration Manager. A new window will open.
In the Active solution configuration drop down click on <New...>. Now you can enter a new name and optional copy settings from the existing Development Configuration.
Adding a Configuration

















5) Add Parameters to Configuration - Package Parameter
Now we have two Configurations (Developement and Test) and we can give the parameters different values for each Configuration. First the Package Parameter: Go to the Parameter tab in the package and click on 'Add Parameters to Configuration'.
Next, click on the Add button in the new window to select a Parameter to configure. In the next new window you can select that variable.

Add Parameters to Configuration


















Now you have added the Parameter to the Configurations, you can give it a different value for each Configuration.
Change Parameter value for Test Configuration

























6) Add Parameters to Configuration - Project Parameter
Now do the same for the Project Parameter. In the Solution Explorer (default upper right corner) you can find the Project Parameters. This will open a new document. The rest is the same as the previous step.
Add Project Parameters to Configuration

















Change the parameter value for the Test Configuration.

Change Project Parameter value for Test Configuration
























7) Test
Now you can run the package with different Configurations within SSDT. In this example a small file for Development and a large file for Test.
Running with different Configurations
















Note 1: These configurations won't be deployed to the SSISDB.
Note 2: You can also change other project properties per Configurations, like the deployment path or the 32/64bit property.
Configure other project properties
Related Posts Plugin for WordPress, Blogger...