use devenv to generate ispac with EncryptSensitiveWithPassword - build

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

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

Related

Visual Studio 2017 Deployment Error on Windows 10 IoT

I've been developing my Windows Store App for over a month, and all of a sudden I get this error when I try to run it in Visual Studio 2017 on my developer machine:
Visual Studio Errors
(DEP0600 Deployment Failed. Failed to deploy through new deployment pipeline)
(DEP8000 Unexpected deployment failure: AggregateException : One or more errors occurred)
This error only occurs at my current project, not at a standard template for example.
I already cleaned and rebuild my solution but still no success.
At the moment I run
Target Version : Windows 10 Anniversary Edition(10.0; Build 14393)
and
Min Version : Windows 10(10.0; Build 10586).
For me the problem was that my app was already running. I set it as the startup app and after that I couldn't redeploy the newer version. Stopping the app solved the problem.
DEP8000 just means that an agregated thread encountered an error and is thrown to the parent thread.
The real issue here is DEP0600.
I encountered a solution on MSDN.
Basicaly it can occur if any of your filenames has accented characters (á, ô. õ, é) ect.
Rename all your files to remove these and you're good to go.
You need to change the Universal Window Target Version as Windows 10 Fall Creators Update(10.0;Build 16299).
If you can not find this version option,you need to install the WDK for 16299, this is the download link.Please try it,and feel free to let me know if there is any problem.
I encountered the same problems when working with Deploying UWP app to HoloLens.
Here are few steps that can help:
Clean & Rebuild solution
Deleting .vs folder can help
Else you can just rename the package name under project settings.

Building UWP app from command line

I need to create kind of builder for my Universal Windows App (UWP) application, that would load some configuration into it, build it and create app store package. Is there any way to build UWP app from command line, without associating it with the store and using Visual Studio at all?
There is WinAppDeployCmd, but it can be used to install builded appx package on device and I need tool like that to generate that package.
UPDATE
I've managed to build it and create app packages with command line, here is command I used:
msbuild "path to .csproj file" /p:OutDir=output_dir /p:AppxBundle=Always;AppxBundlePlatforms="x86|x64|ARM" /p:BuildAppxUploadPackageForUap=true
It's working but not as it should apparently. I can not install generated appx package on my phone (and emulator). I just get error
Failure reason: Failed to start deployment. Failure text: Install failed. Please contact your software vendor. (0x80073cf9)
I found many solutions for Windows 10 PC version, but there is only one solution I found for Windows 10 Mobile and this "solution" is to hard reset the phone, but I do not want to do that. Is there any other way?
And there is one more problem. This command doesn't work with parameter /p:Configuration=Release; and it only builds with Debug configuration, but I believe this is not related to previous error, because it doesn't work with Visual Studio either.
UPDATE
I could not find another solution, so I did the 'hard reset' of my phone and now it is working. It's sad, but I hope the reason is the Windows 10 Mobile OS is still in beta version.
Step 1 : See, you need to install .NET Framework installer from the below link. https://www.microsoft.com/en-us/download/details.aspx?id=30653
Step 2 : Go to C: drive and find where msbuild.exe is. You will find more msbuild. But mostly it will be in the location like C:\Windows\Microsoft.NET\Framework\v4.0.30319.
Step 3: Open the CMD in administrator and point to the location which is mentioned in Step 2.
Step 4 : Paste this. msbuild.exe "YourCompleteProjectPath.sln" /t:rebuild
See this for reference : https://msdn.microsoft.com/en-us/library/ms164311%28v=vs.85%29.aspx

Building Django on Visual Studio Online

I'm working on a Django (1.8.6) project and using Visual Studio Online's GIT source control. I am building the application successfully in my local environment and push the changes to the VSO. However, whenever I try to build the application on VSO to be able to benefit from "Continuous Integration" as a next step (will try to deploy Azure), it fails by giving the error below:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Python
Tools\Microsoft.PythonTools.Web.targets (235, 5) The environment 'env
(Python 3.4) (unavailable)' is not available. Check your project
configuration and try again.
Unexpected exit code received from msbuild.exe: 1
My build definition on VSO:
Build Definition Screenshot
Python Version: 3.4.3
VS Version: 2015
Any suggestions regarding to my case is highly appreciated.
This is a known issue for PTVS. MS is still working on it. Refer to this thread for details: https://github.com/Microsoft/PTVS/issues/128
There is a workaround in that thread you may use, I quote it here. The second link is unavailabe now, but the first one still works.
For deployment via PowerShell, I found this, which looks correct
AFAIK.
http://www.kenneth-truyers.net/2014/02/06/deploying-cloud-services-to-azure-with-powershell/
You can also use the Python Azure SDK to deploy, but that's not as
well documented. This is what this test does:
https://github.com/Azure/azure-sdk-for-python/blob/master/tests/test_servicemanagementservice.py#L940
Both of these assume that you are able to create the .cspkg, as that's
the file you have to upload to blob storage.

Roslyn: How to get a reference to Workspace from currently loaded solution?

I am trying to get a reference to currently loaded workspace, without success. As per documentation (part in bold) I should be able to get a reference to it.
The Workspace APIs are found in the Roslyn.Services namespace, and
they are available if you include the following using directive:
using Roslyn.Services;
The workspace you use will typically be provided directly by the host
environment (such as the Visual Studio IDE). However, you can work
with a workspace outside of a host environment by constructing your
own IWorkspace instance.
You can construct a workspace by loading a solution file.
IWorkspace workspace = Workspace.LoadSolution(#"HelloWorld.sln");
ISolution solution = workspace.CurrentSolution;
I tried following in unit test but workspace is null.
IWorkspace workspace = Workspace.PrimaryWorkspace;
ISolution solution = workspace.CurrentSolution;
I dont want to load solution, I want to work within currently loaded solution. How is it done? I am using Visual Studio 2012.
Edit:
Tried using switch /rootSuffx Roslyn as suggested in answer and VS throws an error that it is invalid switch. Changed it to /rootSuffix Roslyn, and VS starts but workspace is still null.
As described by Dustin Campbell in his answer here: How to work with Workspace.PrimaryWorkspace.CurrentSolution inside VSPackage
The primary workspace inside of Visual Studio is only populated when the Roslyn C# and Visual Basic language services are enabled.
To enable the Roslyn languages services you need to start your VS with the following command:
devenv.exe /rootSuffix Roslyn

0xE0434F4D Error

all, I have a rather frustrating issue. The application in question has an MFC GUI that uses the classes available in the MFC Featurepack. This GUI uses an DLL that is developed in C++\CLI. Our company uses Cruise Control. NET (1.4.4 SP1) on Windows Server 2008 SP2 for continuous integration. Cruise Control is setup to use the version of MSBuild that comes with the 3.5 version on the framework.
The issue in question is that if I use the build that Cruise Controls creates, I receive the following error: "Unhandled exception at 0x7642fbae (kernel32.dll) in FormView.exe: 0xE0434F4D: 0xe0434f4d." After some digging, the issue seems to be that the GUI doesn't like the C++\CLI assembly.
The "gotcha" is that if I log on to the server, and, using PowerShell, execute the same MSBuild command, the build works. Any one have ideas?
The issue was how I was building the installer. It was a separate solution from the project's main solution, and was thus a separate task from the primary build. Therefore, the output assemblies got signed twice, and loader complained because the one the application wanted was no longer valid.
you could try and attach the process to the visual studio debugger.