Build SSIS project with Visual Studio 2013 - visual-studio-2013

I have to automate the way we build and deploy our SSIS projects.
We use VS2013, SQLSERVER2014 and TFS2015. I'm already aware of two solutions:
1) MSBuild: I followed this blog https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/ and it works fine for VS2010 but unfortunately not for VS2013.
The error I'm getting is:
Project "SSISTest\SSISTest\SSIS.MSBuild.proj" on node 1 (SSISBuild target(s)).
SSISBuild:**************Building SSIS project: ..\SSISTest\SSISTest.dtproj for onfiguration: Development**************
------
Loading project file '..\SSISTest\SSISTest.dtproj'
Setting output directory to '..\SSISTest\bin\Development'
Setting project ProtectionLevel to 'DontSaveSensitive'
Loading package '..\SSISTest\Package.dtsx'
error : Error while loading package '..\SSISTest\Package.dtsx': 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.\r
error :
error : 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.\r
error : \r
error : at Microsoft.SqlServer.Dts.Runtime.Package.LoadFromXML(String packageXml, IDTSEvents events)\r
error : at Microsoft.SqlServer.IntegrationServices.Build.DeploymentFileCompilerTask.LoadPackage(String path)\r
error : at Microsoft.SqlServer.IntegrationServices.Build.DeploymentFileCompilerTask.Execute()
Done Building Project "SSISTest\SSISTest\SSIS.MSBuild.proj" (SSISBuild target(s)) -- FAILED.
2) devenv: works fine but our projects are all protected with a password, and everytime you try to build it prompts the dialog to insert the password.
Is there any other way I can automate this in VS2013?

I'll answer myself. After adding the proper dll references (expecially the Microsoft.SqlServer.ManageDTS one) for VS2013 to the http://sqlsrvintegrationsrv.codeplex.com/SourceControl/latest project, generating the .dll allowing MSBuild to build SSIS project as suggested by https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/, worked just fine. I'm now able to automatically build SSIS projects with MSBuild and deploy them to a SQL Server 2014 instance.

Related

MSB4019 VSTO targets not found TeamCity build agent

I'm using a TeamCity build server to try and build an Outlook Addin, I can build & test the code using TeamCity, but when it comes to publishing the app to a folder I get the following error.
Obviously the build server is missing some SDK components to complete the package\publish step.
Does anyone know which Windows SDK I need to get installed on the build server?
Nothing to do. None of the projects specified contain packages to restore.
XXXXXXXX.Outlook.csproj(331,3): error MSB4019:
The imported project "C:\Program Files\dotnet\sdk\7.0.102\Microsoft\VisualStudio\v17.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" was not found.
Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\7.0.102\Microsoft\VisualStudio\v17.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets" is correct, and that the file exists on disk.
Build FAILED.

Visual Studio 2022 cannot build application

When I try to build in vs22, it gives me an error that it cannot find some DLLs that have been added. But on VS19 the build works without problems.
I tried to change the build settings but no luck.
Error :
Severity Code Description Project File Line Suppression State Error CS0006 Metadata file 'C:\xxxx\xxx\xxx\xxx.CMS.Service\bin\Debug\xx.CMS.Service.dll' could not be found xx.CMS.Frontend C:\xxx\xxx\xxx\xx.CMS.Frontend\CSC 1 Active

Visual Studio - Cannot Read Configuration File

When I try to run IIS Express for any project on visual studio, sometimes the following error dialog appears:
[Microsoft Visual Studio]
The following error occurred when trying to configure IIS Express for project Accounts.web.Host. Filename: redirection.config
Error: Cannot read configuration file
I have tried most common answers on
Cannot read configuration file due to insufficient permissions. Is there a standard approach to how I solve this issue?
Right click on your project file
Edit the project file and remove the URL from IISUrl
Reload your project
Then it will work.

Azure devops failing to build visual studio sql database project: SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found

I have a sql database project in Visual Studio (2019).
I am trying to deploy it via azure devops.
The pipeline is failing due to the below error:
##[error]C:\azagent\A1_work\r1\a_Transcripts-SQLDeployment\SampleDatabaseProject\SampleDatabaseProject\SampleDatabaseProject.sqlproj(117,3): Error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk
The project builds without issue on my pc.
In the pipeline I have tried both the MSBuild and Visual Studio Build tasks, but the result is the same in each case.
Steps tried:
I found the reference in the sqlproj file xml, and removed it but this did not resolve the issue.
Appreciate any expertise on how to resolve this.

Compilation error when publishing a ClickOnce application using MSBuild on CI server

I have a windows form application and I'm trying to publish it using ClickOnce with MSbuild.
When I publish it locally, it works fine, but when I run the same script on my CI server it fails with this compilation error:
error rsInvalidReportDefinition: The report definition is not valid.
Details: The report definition has an invalid target namespace
'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition'
which cannot be upgraded.
Also, when I publish it using Visual Studio on the server, it works just fine... it's the msbuild call that fails.
My publish target is:
<MSBuild Projects="#(Project)" Targets="Publish" Properties="PublishDir=%(PublishDir.FullPath);Configuration=$(Configuration)"/>
What am I missing?
Thanks in advance.

Resources