0

Builing/Rebuilding an Integration Services project (SSIS) in Visual Studio 2022 started failing after I merged my branch into the main branch. Although it says that there should be more specific errors preceding this one but there is no error before this one. I have pasted full content of output window below:

Rebuild started...  
------ Rebuild All started: Project: My.CRM.SSIS, Configuration: Development ------  
Build started: SQL Server Integration Services project: Full ...  
Starting project consistency check ...  
Error : Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.  
 ---> System.Runtime.InteropServices.COMException: The package failed to load due to error 0xC0010014 "One or more error occurred. There should be more specific errors preceding this one that explains the details of the errors. This message is used as a return value from functions that encounter errors.". This occurs when CPackage::LoadFromXML fails.  

   at Microsoft.SqlServer.Dts.Runtime.Wrapper.ApplicationClass.LoadPackage(String FileName, Boolean loadNeutral, IDTSEvents100 pEvents)  
   at Microsoft.SqlServer.Dts.Runtime.Application.LoadPackage(String fileName, IDTSEvents100 events, Boolean loadNeutral)  
   --- End of inner exception stack trace ---  
   at Microsoft.SqlServer.Dts.Runtime.Application.LoadPackage(String fileName, IDTSEvents100 events, Boolean loadNeutral)  
   at Microsoft.SqlServer.Dts.Runtime.Application.LoadPackage(String fileName, IDTSEvents events)  
   at Microsoft.DataTransformationServices.Project.ProjectBuildItemInfo.Update(DateTime lastWriteTime, PackageItem packageItem, Project project, String projectDirectory)  
   at Microsoft.DataTransformationServices.Project.ProjectBuildItemInfo..ctor(String name, DateTime lastWriteTime, PackageItem packageItem, Project project, String projectDirectory)  
   at Microsoft.DataTransformationServices.Project.ProjectBuildValidator.RefreshCache(PackageItem item)  
   at Microsoft.DataTransformationServices.Project.ProjectBuildValidator.CheckBuildItem(PackageItem item)  
   at Microsoft.DataTransformationServices.Project.ProjectBuildValidator.CheckConsistency(String& errors, String buildLogFullName)  
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.IncrementalBuildThroughObj(IOutputWindow outputWindow)  
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectBuilder.BuildIncremental(IOutputWindow outputWindow)  
Build complete -- 1 errors, 0 warnings  
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========  
========== Rebuild started at 2:42 PM and took 11.507 seconds ==========  

More behavioral information

  • This started happening after I merged my branch into the main branch (I noticed it after couple of weeks, so there are around 100s of commits between the commit before my merge and the current)
  • When I have all the three packages contained in the project opened in VS, the project/solution rebuilds successfully.
  • Once I rebuild with all the packages opened, the project/solution builds successfully without the packages opened.
  • However, rebuilding the solution/project again fails with the exact same error (without the packages opened. and I have to open all the packages again to rebuild the project successfully).

What I tried so far, didn't work

  • Removing bin, debug, obj folders
  • Removing (project).dtproj.user file
  • Building with MSBuild from Dev Command Prompt fails with an error that seems like a generic issue in all SSIS packages compiled with MSBuild (I believe this as I tested MSBuild with another SSIS project that's building successfully in VS and it returned the exact same error)

My.CRM.SSIS.dtproj(3,3): error MSB4067: The element DeploymentModel beneath element Project is unrecognized.

  • Building through DevEnv.exe from Dev Command Prompt also fails with the same error (posted above)

    devenv My.ETL.sln /rebuild Development

Visual Studio version
Visual Studio Community 2022 version 17.5.4

Update
When I rebuild the solution with all the packages open, VS changes the .dtproj file that I save. However, this still doesn't help in rebuilding solution subsequently, without the packages opened.

Khadim Ali
  • 2,548
  • 3
  • 33
  • 61

2 Answers2

0

It could be that your SSIS package files have been corrupted by the merge process.

Open all the packages in VS and then rename the dtsx files. This will force VS to create the dtsx files ex novo when you save the packages.

0

It seems like VS2022 SSIS support is limited to newer versions. We are using VS2017 to support SQL 2014 SSIS packages.

Here is an example error:

There was an exception while loading Script Task from XML: System.Exception: The Script Task "ST_cad226ac6421429fac770a5dbc921916" uses version 16.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)
David
  • 1,074
  • 11
  • 12
  • 1
    The error message you posted is not relevant in my case. However, this is by design. SSIS projects use fixed version of .NET framework for script tasks for any specific Visual Studio version. When you upgrade the SSIS project it should convert the script task framework version automatically. If it is not converting, to resolve this error you may have to create the script task in newer VS again. – Khadim Ali May 29 '23 at 21:21