Using Visual Studio Online to build Windows Store Apps? - windows-store-apps

I have a Windows Store Application (Windows 8.1), hosted on a GIT repo on Visual Studio Online.
I created a build definition, left all the default values as they were, ran the build and downloaded the artifacts.
I didn't find the Powershell script used to side load (install) the application, instead I found an .exe file.
What can be missing to generate the Powershell script needed to install the app?

The default build configuration is copying the files in "bin" folder to artifacts, that's why you see exe file.
To copy the package files to artifacts, please configure your build definition as following:
In "Visual Studio Build" step, add following argument in "MSBuild Arguments":
/p:AppxPackageDir="$(Build.BinariesDirectory)\AppxPackages\\"
And in "Publish Build Artifacts" steps, set "Path to Publish" as following:
$(Build.BinariesDirectory)\AppxPackages

To package Windows Store App during the TFS build process, you can (assume you're using XAML build):
1). Set MSBuild Arguments to be: /p:DeployOnBuild=true;DeployMethod=Package /p:DefaultPackageOutputDir="$(TF_BUILD_BINARIESDIRECTORY)"\StoreAppPackage
2). Set Output location to be 'SingleFolder' or 'PerProject'.
Then, after you queue one build, you will find one folder called StoreAppPackage in the TFS Build Drop folder. You can then find the Add-AppDevPackage.ps1 file.

Related

Azure Devops Build SSIS task

I have created an SSIS package using VS 2017 and added the project to Azure Devops. I am trying to setup a build task in Azure Devops using the SQL Integration Service add in. Everything I am doing is setup on my machine which includes the Agent Pool etc. When trying to setup parameters for the SSIS build the Devenv Version selection only gives me 12 and 14. VS2017 doesn't appear. As a result it appears that when I do a build the incorrect version on devenv is used and the build (even though it doesn't say its failed) fails.
The version the build is using is C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Devenv.com but should be using C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE>Devenv.com
How do I get to DEVENV config parameter to include the Hosted VS2017 version?
The following web page gives an idea of what I am trying to achieve: -
http://chamindac.blogspot.com/2018/09/build-and-deploy-ssis-with-azure-devops.html
I ended up using a powershell script instead.
The script has one line to run the build.
&"${env:ProgramFiles(x86)}\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com" "C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS.sln" /rebuild
I place the code in a .ps1 file and put it into the root of my repo. I then used the Powershell config to reference the file and it worked.
I did a similar thing for the deployment where I used : -
ISDeploymentWizard /S /SP:C:\Users\me\Downloads\vsts-agent-win-x64-2.140.0_work\2\s\POC_SSIS\bin\Development\POC_SSIS.ispac /DS:serverName /DP:/SSISDB/POC_SSIS/POC_SSIS

SSIS via MSBuild - Could not load ...DTSRuntimeWrap

I'm using the CodePlex-hosted Microsoft.SqlServer.IntegrationServices.Build project to build a DLL that contains the MSBuild tasks for building SSIS packages via MSBuild.exe.
I also am using an MSBuild proj file that's floating around the web.
More here:
https://speaksql.wordpress.com/2013/06/07/a-journey-to-db-deployment-automaton-ssis-build-using-msbuild/
I've opened the CodePlex project, disabled signing, switched it to 4.6.1 and built the DLL and corrected paths etc. and go it semi-working. However MSBuild spits this error:
Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
I've installed SSDT latest for Visual Studio 2015. I have various SQL Server editions installed on my dev PC. The DLL seems to be present; I've copied all I need into one folder for the moment.
Open the CodePlex project again and remove the reference to Microsoft.SqlServer.ManagedDTS.
Look on your local disk for the missing Microsoft.SqlServer.DTSRuntimeWrap.dll and note the version(s) you have available.
Now look on your disk for Microsoft.SqlServer.ManagedDTS.dll and note the version(s).
Re-add the reference but make sure you pick a DLL for which you also have the version of the 'wrap' available.
Now make sure those DLLs are (re)copied over into your working folder or whatever.
If you're still having problems, you may need to copy some files around so that MSBuild.exe can find them or edit/create a config file for MSBuild.
How to solve: Custom MSBuild task requires assembly outside of AppBase

nuget package restore with MonoDevelop

I have a solution that is primarily developed in Visual Studio 2012. I would like to develop in MonoDevelop without major incompatibilities.
Thus far, I have installed mrward's nuget addin for MonoDevelop and things work if I manually add each package in packages.config through that interface. However, this is highly onerous. This addin doesn't have support for automated package restore as of this writing.
I downloaded nuget.exe from CodePlex ("NuGet command line utility", as it's labeled). I use a simple find/xargs combination to install all required packages:
find . -name packages.config | xargs -I '{}' mono nuget.exe install '{}'
This creates several dozen directories in the directory from which it is run instead of putting things under packages/ as expected, and it also doesn't touch the project files so MonoDevelop still thinks that it should be looking for package references in the directory from which MonoDevelop was started.
I therefore opened MonoDevelop from the working directory that contains all of these package folders, and I still get invalid references. I think this is probably because the project is looking for package_name/ reference, but the folders are name package_name.version/ in the working directory.
Any suggestions for a sane, simple way to interact with this solution? I'm next going to try modifying my shell command so that it automatically drops to project/packages and runs nuget from that directory.
Did you try using the -o command line parameter with NuGet.exe? You can use that to get the packages to install into a particular packages folder.
The NuGet addin for MonoDevelop supports package restore from version 0.6 or above. Right click your project and select Restore Packages. This will download all the packages defined in your packages.config for all projects in the solution. It uses NuGet.exe to do this.
Another way to get this working is to use the custom NuGet MSBuild target so the package restore happens at build time when using xbuild. It would require some manual editing of project files though. Under the covers the custom MSBuild target just uses NuGet.exe with a similar command line to what you have already just with the output directory option specified. So I would try the command line approach since that will be less work.
You would have to get the following files from the NuGet repository on codeplex:
NuGet.exe
NuGet.targets
NuGet.config
Put these in a directory somewhere. Typically these are put in a .nuget directory in the same directory as your solution file. Then you need to edit your project files to include the NuGet.targets file and also define the SolutionDir property. So something like this:
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
You will also need to enable package restore on your machine. You can do this using the NuGet addin for MonoDevelop in the Options dialog. Under Linux this is available from the Edit menu under Preferences. Then look in the NuGet - General options and there is a checkbox for enabling package restore.
There is an example project on GitHub created by Jonathan Channon which uses package restore and works when building with xbuild inside MonoDevelop. There is also an issue on GitHub about using NuGet restore on Linux which might be helpful.
Update: 2014-05-14: NuGet addin for MonoDevelop now supports package restore.

Porting to WinRT apps: How to use NMAKE to call winRT apps in build process

I am trying to port an open source library to WinRT.
In original setup few projects would compile to form .exe which were then called by a makefile using NMAKE. These .exe used to prepare a data .dll from .txt(raw data files).
Now for porting i have converted all the exe projects into winRT apps. This is did by adding Package.appxmanifest files and assests folder. Also making changes in project settings of all the exe.
In the configuration manager, I have checked the option to deploy after building for all these apps. Now i need to call these exe. How to do this?
Please help.

Installing files to x64 "Program Files" from x86 msi

I'm creating installer using InstallShield 2010 (basic MSI) that is having two features.
First feature consists of:
main .NET application compiled as x86,
some native x86 third party dlls which are used by main application (x64 versions are unavailable).
Second feature contains single component which is an extension for MS Reporting Services compiled as AnyCPU.
During UI sequence I'm using InstallScript custom action to enumerate all available Reporting Services instances from both x86 and x64 registry trees.
The user is prompted to select on which instance he wants to deploy our extension.
Based on selected instance I'm quering registry for actual location of Reporting Services in file system which is usually something like "C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services" and storing this value in a MSI Property.
Then by using Set Directory action I'm setting destination directory of a component (our extension) to the value of that MSI Property.
Everything is installing perfectly fine unless you've trying to install it for x64 Reporting Services in that case extension files are installed to wrong location. Even thou MSI Property is set to correct path "C:\Program Files\MicroSoft..." (I've checked msi log) it looks like system is automatically redirecting to "Program Files (x86)".
Is there any possible solution to overcome this issue?
If you need to install to the 64-bit ProgramFiles folder, use a 64-bit MSI.
Finally solved this issue myself without creating 64bit MSI by using InstallScript custom actions.
First custom action to install:
Manually copy required files to desired location (InstallScript can access x64 Program Files)
Save this location in registry as a key component for this feature to use during uninstall
Second custom action to uninstall:
Read installed location from registry (do not use System Search to get this value due to it'll be auto translated by WindowsInstaller to "ProgramFiles (x86)")
Delete files
You can change the INSTALLDIR property to ProgramFile64 rather then ProgramFiles, this will help you to install on desired path, since you application is 32-bit so the path will be C:\ProgramFiles(x86)\Your Company Name\Your Product Name along with this have you made your components as 64-bit compatible?