Search code examples
buildssissql-server-data-tools

use devenv to generate ispac with EncryptSensitiveWithPassword


We have an external app that allow use to build and deploy ssis projects using command tool

after a migration with vs 2019, process no longer work (probably because external app use old resource file)

previously, we use msbuild, with a xxx.proj using

UsingTask TaskName="DeploymentFileCompilerTask" AssemblyFile="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\Microsoft.SqlServer.IntegrationServices.Build.dll" 

now, the same no longer work. I tried to use a newer version of Microsoft.SqlServer.IntegrationServices.Build.dll but it refer now to an vsintegration dll file.

So, I would like to use devenv.com tool instead.In local, it works.

the problem is that some projects have SecurityLevel to EncryptSensitiveWithPassword and when using

devenv.com "project.sln" /Build Development /Project "project\SsisCommon.dtproj" /ProjectConfig Development

in local, it prompt for the project password, and then after entered it, it generate ispac.

But the problem is that the external app not allow prompting, and then we got this kind of error

Unhandled Exception: System.InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

How I can pass the project password without prompting ?

thanks in advance

regards


Solution

  • I finally use the SSISBuild project - https://github.com/rtumaykin/ssis-build/ - (recompiling after updating encrypt / decrypt process) as related here: https://github.com/rtumaykin/ssis-build/issues/25

    it works finally fine.

    regards