I'm having an issue using VS 2015 MSBuild to deploy a database project via the command line. The issue is I need to be able to use MSBuild with 14.0 only, without VS 2013 installed.
I'm using 14.0 MSBuild at:
C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe
The following works because I also have Visual Studio 2013 installed with the appropriate SQL Server Data Tools:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy "/p:TargetConnectionString=Data Source=localhost;IntegratedSecurity=True" /p:TargetDatabase=TestDeployDb /p:Configuration=Release /p:VisualStudioVersion=12.0
However, if I change "VisualStudioVersion" to "14.0 for VS 2015, I get an error:
Deploy error Deploy72002: Unable to connect to master or target server 'TestDeployDb'. You must have a user with the same password in master or target server 'TestDeployDb'.
Credit to Cole Wu for saying my connection string was invalid, but his answer didn't work for me out of the box. For some reason my connection string was* valid for 12.0 but not for 14.0.
The issue ended up being that I had IntegartedSecurity rather than Integrated Security, which broke my command when moving to 14.0
Here is the final that worked:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy /p:TargetConnectionString="Data Source=localhost;Integrated Security=True" /p:TargetDatabase="TestDeployDb" /p:Configuration=Release /p:VisualStudioVersion=14.0
According to your description, I create a demo and reproduce your issue on my side, you use an incorrect connection string. please modify your command like this:
MSBUILD "C:\Users\XYZ\Desktop\temp\Testing\TestProject\TestProject.sqlproj" /t:build "/p:Platform=AnyCPU" /t:deploy /p:TargetConnectionString="Data Source=localhost;IntegratedSecurity=True" /p:TargetDatabase="TestDeployDb" /p:Configuration=Release /p:VisualStudioVersion=14.0
Related
We have been using Visual studio 2010 - 2013 on the build server using the following MSBuild command so far:
Set msBuilder=%windir%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
However recently we moved to VS 2015, and had to uninstall all other VS versions (for saving space), and used the following build location (partially also to cater compilation of C# 6.0 features):
Set msBuilder =%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe
This seems to work for most of the VS Solutions we have,however for one particular VS solution, when we execute this line:
Set doSolutionBuild=%msBuilder% MySolution.sln /t:clean;Build /p:Configuration=Release;Architecture=x86;Platform=x86 /v:n
it opens and instance of VS 2015 of the same project on the build server and the build process just hangs there in the command prompt.
Can anyone explain how we could resolve this?
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}
I am Currently using the visual studio 2015 in which my script task runs fine. When i tried to run the same package using DTEXEC util using the command
C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe" /f "filepath"
I am getting an error
The Script Task "ST_7432393ecf7a4af3906ba19425aeb245" uses version 14.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services. at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events) "
Note :
My SSDT Version is 14.061021.0
Sql server version 2016
Visual studio version 2015
"C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\DTExec.exe"
/f "filepath"
The 120 refers to SQL Server 2014 while script version 14.0 is meant for SQL Server 2016.
Your SSIS is probably build with the wrong TargetServerVersion. Check the properties of your project and change it to the correct version.
EDIT: Or if you're using SQL Server 2016 then you need to change the path to the correct version DTExec.exe. If you installed it in the default path then changing 120 to 130 should work.
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.
Running Windows 8.1 Pro x64 (upgraded from 8.0) with all updates installed. I'm trying to install SQL Server Management Studio 2012 using SQLManagementStudio_x64_ENU.exe. When the setup is initializing, I get this error:
ScenarioEngine.exe - Configuration parser error
-----------------------------------------------
Error parsing C:\Windows\Microsoft.NET\Framework64\v2.0.50727\config\machine.config
Parser returned error 0xC00CE556
I tried replacing machine.config with machine.config.default but with no success. Google has no more information regarding this, as far as I can see.
Has anybody seen this error before? How do you solve it?
It can be solved by installing dotnet framework 4.0 on your system.
Replacing machine.config with machine.config.default for both the 32-bit and 64-bit versions did the trick.