SSIS error loading package in VS 2012 with TFS - sql-server

I am receiving the following error when trying to execute an SSIS package using Visual Studio 2012:
Error 39 Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The
package failed to load due to error 0xC0011008 "Error loading from
XML. No further detailed error information can be specified for this
problem because no Events object was passed where detailed error
information can be stored.". This occurs when CPackage::LoadFromXML
fails. ---> System.Runtime.InteropServices.COMException: The package
failed to load due to error 0xC0011008 "Error loading from XML. No
further detailed error information can be specified for this problem
because no Events object was passed where detailed error information
can be stored.". This occurs when CPackage::LoadFromXML fails.
at
Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSPackagePersist100.LoadPackageFromXML(Object
vSource, Boolean vbSourceIsLocation, IDTSEvents100 pEvents) at
Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(String packageXml,
IDTSEvents events) --- End of inner exception stack trace ---
at Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(String
packageXml, IDTSEvents events) at
Microsoft.SqlServer.Dts.Runtime.Project.LoadPackage(IProjectStorage
storage, Package package, String streamName, IDTSEvents events) at
Microsoft.SqlServer.Dts.Runtime.PackageItem.Load(IDTSEvents events)
at Microsoft.SqlServer.Dts.Runtime.PackageItem.get_Package() at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow
outputWindow) at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow
outputWindow)
0 0
The package is stored in TFS and I can open the package/solution without any errors. I just get the error when i try to excecute the package or any step in the package.
I created a new package on my machine (64 bit) and it worked fine. I'm just having trouble running the package when opening from TFS.
thanks
Scott

I resolved a very similar situation by changing the SQL Server sdk version that my solution was pointing.
I had SQL Server Express 2008 installed, and was using VS 2012 with BI Tools 2012. So, my solution was referencing the assembly Microsoft.SqlServer.ManagedDTS.dll version 10. For my case, the correct was the version 12.

I had this problem when trying to open an SSIS package which used a component which I did not have installed. In my case, it was the "Azure Feature Pack".

I had similar errors on a Win64, VS2013, SQL2012 system. The SSIS package did not load correctly.
Identify: I created a local copy of the whole package, and narrowed the problem with reduction to a single sub-package.
Reason: different date format.
Solution: I had to change the Windows date format to UK (source of the package), and since then everything is fine.

You have to copy the reference libraries to the Program Files directly as well.
I saw that in the (x86) path, the files were there, but not in the 64-bit folder of Program Files. I'm using Visual Studio 2010.
1 - C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Connections
2 - C:\Program Files\Microsoft SQL Server\110\DTS\Connections
The referenced DLL was found in location 1, but not in 2.
I closed Visual Studio, copied the DLL over to path 2, and opened VS again. The package just worked like normal.

I resolved a very similar situation by changing the TargetServerVersion in the project general configuration properties. I use Visual Studio 2015. By default SQL Server vNext was selected, whereas I have SQL Server 2012 installed.

Related

Error SQL Server Data Tools for Visual Studio - DQS - System.NotImplementedException

When I create a Connection to DQS in an SSIS Project I get System.NotImplementedException error after the build. I am using Visual Studio 2017
Running SQL Server Data Tools for Visual Studio 2017
This is the error I get:
Severity Code Description Project File Line Suppression State
Error System.NotImplementedException: The method or operation is not
implemented. at
Microsoft.SqlServer.Dts.Runtime.Interop.ProjectInterop.ReferencePackage(Package
package, String packageLocation) at
Microsoft.SqlServer.Dts.Runtime.PackageItem.Load(IDTSEvents events)
at Microsoft.SqlServer.Dts.Runtime.PackageItem.get_Package() at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow
outputWindow) at
Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow
outputWindow) 0
This is a known issue by Microsoft.
It can be resolved by using an older version of SSDT.
Works fine with SSDT FOR vs2017 15.9.0.
https://learn.microsoft.com/en-us/sql/ssdt/previous-releases-of-sql-server-data-tools-ssdt-and-ssdt-bi?view=sql-server-2017

Error in upgrading report server project in Visual Studio 2017

I recently have attempted to migrate a solution created and developed in Visual Studio (VS) 2012 to VS 2017.
I've managed to migrate all projects of my solution except for a Report Server Project. When I try to open my solution in VS 2017 I get the following message:
I click on Yes and VS automatically upgrades the project file (this is a file having the extension .rptproj)
When I now try to build the project I get the following error message:
Error Copying file Reports\Report\Project1\MyReportProject.rptproj.user to
obj\Debug\AspnetCompileMerge\Source\Reports\Report
Project1\MyReportProject.rptproj.user failed. Could not find file
'Reports\Report Project1\MyReportProject.rptproj.user'
I thought the upgrade would be performed transparently. Am I missing something? Is there any extra step I should take in order to do the upgrade?
Note: I've already downloaded and installed the latest version of Microsoft Reporting Services Projects .vsix package.
You can try the latest msbuild.exe for SSRS is here.
This includes steps of up-gradation of SSRS for both VS15 and VS17.
Once you install the latest update, depending on which version of Visual Studio you’re using, the new files enabling MSBuild for your projects will be installed in different folder path:
In Visual Studio 2017, it’ll will be a nested folder in your Visual Studio folder hierarchy. For example, the location with the Community Edition is in the Community folder:
Edit 1:
Try these steps:
1) Close Visual Studio - 17
2) Open VS-17 Installer
3) Try to install the SSDT workflow as:

Error Running SSIS Package from Command Line

Ultimately, I'm trying to schedule SSIS packages to run on a regular basis using Task Scheduler in an Azure VM (Windows Server 2016 Datacenter). From the command line on my development machine (Windows 10), I'm able to run...
dtexec.exe /Project "pathToMy.ispac" /Package "pathToMy.dtsx"
...and it works as expected. However, when I try to do the same from the Azure VM I get the following error:
Microsoft (R) SQL Server Execute Package Utility Version 11.0.6020.0
for 32-bit Copyright (C) Microsoft Corporation. All rights reserved.
Started: 2:17:46 PM Could not load package
"MyPackage.dtsx" because of error 0x80131500.
Description: The package failed to load due to error 0xC0011008 "Error
loading from XML. No further detailed error information can be
specified for this problem because no Events object was passed where
detailed error information can be stored.". This occurs when
CPackage::LoadFromXML fails. Source: MyPackage
Started: 2:17:46 PM Finished: 2:17:47 PM Elapsed: 0.547 seconds
On both machines, I have the same version of SQL Server 2016 Developer (w/ SSIS) and Visual Studio 2015 installed. Also, I'm able to run the package fine on the VM from within Visual Studio. It's only from dtexec.exe that I have issues.
I've tried every solution on here from other posts getting similar errors and none have helped. Any ideas?
Thanks,
Ian
Thanks to #Nick.McDermaid, the answer to this riddle has been found. By running dtexec.exe (with no parameters) on the dev machine and on the VM, I was able to see that the VM version was v11 and the dev version was v13 which explained why I was getting the error and why one worked and another didn't.
I then did a File Explorer search on the VM for dtexec.exe copies and found several. Apparently, the environment path was set to find the older version. I probably could have found the variable causing this problem and changed it. However, out of concern about breaking something else and wanting a quick solution, I chose to execute using the full path to the correct version. For v13, this ended up being...
"C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"
So, for my schedule task I set the following properties for my "Start a program" action.
Program/Script: "C:\Program Files\Microsoft SQL Server\130\DTS\Binn\dtexec.exe"
Add Arguments: /Project "bin/Development/myProject.ispac" /Package "myPackage.dtsx"
Start in: c:{path to my .dtsx file}

Headless build .sqlproj file on TFS build server

I'm attempting to build a .sqlproj on a TFS Build Server. I've followed the instructions here:
http://sqlproj.com/index.php/2012/03/headless-msbuild-support-for-ssdt-sqlproj-projects/
which I was directed to from here:
How to build .sqlproj projects on a build server?
But I still cannot build. The error is:
C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets
(441): The "SqlModelResolutionTask" task could not be instantiated
from "C:\Program Files
(x86)\Common7\IDE\Extensions\Microsoft\SQLDB\Dac\120\Microsoft.Data.Tools.Schema.Tasks.Sql.11.dll".
System.TypeInitializationException: The type initializer for
'Microsoft.Data.Tools.Schema.Tasks.Sql.DataTask' threw an exception.
---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.Tools.Schema.Sql, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
system cannot find the file specified. at
Microsoft.Data.Tools.Schema.Sql.Extensibility.ToolingShim.ConfigureExtensions()
--- End of inner exception stack trace --- at Microsoft.Data.Tools.Schema.Tasks.Sql.DataTask..ctor()
The SqlTasks.targets file, used by the SQL project, references this:
C:\Program Files (x86)\Common7\IDE\Extensions\Microsoft\SQLDB\Dac\120\Microsoft.Data.Tools.Schema.Tasks.Sql.11.dll
which in turn references the invalid version mentioned above.
However, the files installed by the process in the link above don't install this version. They do install version 10.3.0.0, which is referenced by
C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\Microsoft.Data.Tools.Schema.Tasks.Sql.12.dll
but this file is not the one used by the .targets file.
I don't know what the numbers at the end of this dll mean, but it seems odd to me that the one ending 12.dll references an earlier version of the one ending 11.dll.
I'm using Visual Studio 2013 and SQL Server 2012 - neither of which are installed on the build server, which I believe is the recommended situation. I don't know what the IDE folder is, or why the .targets file is using it.
I've spent about two days now trying to get this to build, but I'm out of ideas. Anyone know what's going on?
If you are running VS2013 SSDT is built into VS as long as you select it on the install screen. Install VS2013 with SSDT onto your build server. create a build definition and under Process > Build > Advanced Add the following to the MSBuild arguments to build the sql proj
/t:Build
if you have a publish profile and want to test publishing to SQL then add the publish switch and provide the link to the profile file
/t:Publish /p:SqlPublishProfilePath=MyDB.publish.xml.
this will publish the db to the server specified in the publish file.
the publish profile file can be created by opening the project in Visual Studio, right click on the project and select publish. Select save once you are happy with the publish options and then check in the file to source control so the build can find it, (project Root).
I was having this issue building a SQL Server project on an Azure DevOps CI/CD pipeline. None of the pre-built build tasks would work for me. And it is not possible to install a VS instance on the build server, I guess.
I solved this by avoiding to add a SQL Server project to the solution.
I achieved this by using an MSBuild SDK, capable of producing a SQL Server Data-Tier Application package (.dacpac) from the set of SQL scripts. By adding this second project to the solution, I managed to continue taking advantage of linking the project to a live database through SQL Server Object Explorer on Visual Studio. I gave a more detailed explanation in this answer.

Reporting services - custom library is not working after installing report on production Server

I created a report which uses custom library created by me. I've copied these libraries to the following folders:
c:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting
Services\ReportServer\bin\
c:\Program Files\Microsoft Visual
Studio
8\Common7\IDE\PrivateAssemblies\
Everything works fine when I run the report using on development environment using Visual Studio. When I install it on Production Server (where these dlls were also copied) the following error is returned:
Failed to load expression host assembly. Details: The type initializer for 'MyParserForReportingServices.MyParser' threw an exception. (rsErrorLoadingExprHostAssembly)
Can someone please help me?
add your dll to this folder too
C:\Program Files\Microsoft SQL
Server\MSSQL.3\Reporting
Services\ReportManager\Bin
I had the same issue, and copied the DLL to the ReportServer folder and worked!!
Weird because in the doc. the ReportManager is mentioned but ReportServer not.
Thanks Masoud!

Resources