Install Certificate on Build Server - tfs

We have a dream to automate our build process using Visual Studio Online Build 2015 (vNext).
We are developing Desktop application that has Windows Logo program. That's why we have to sign-authenticode every binary and msi-installer file. For that purposes ideally we have to install authenticoding certificate on build server. Please help me with some tutorial.

Instead of using Hosted Build Pool/Controller, you should set up one on-premise build server.
To work with Windows Logo program, the Windows Hardware Certification Kit is required. However, this certificate kit is not installed on the hosted build pool/controller, and you don't have permissions to install it on hosted server either. So, you need to set up one on-premise build server, install the certificate kit on it and register it with VSO. Please check this blog for the steps on how to register a on-premise build server with VSO: http://myalmblog.com/2014/04/configuring-on-premises-build-server-for-visual-studio-online/

Related

UWP certificate issue on hosted agents

I'm trying to run UWP build using Team Foundation Server and App Center and it gives me this error.
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(3090,5): Error MSB3325: Cannot import the following key file: AppCenterTest.UWP_TemporaryKey.pfx. The key file may be password protected. To correct this, try to import the certificate again or manually install the certificate to the Strong Name CSP with the following key container name: VS_KEY_480BF88F6934FA8C
I tried creating a private agent for Team Foundation Server which fixed the issue for Team Foundation Server only since the certificate is installed on my private agent. But for App Center by default is running a hosted agent.
How to resolve this issue? Thanks.
Instead of Creating a test certificate in Package.appxmanifest > Packaging > Choose Certificate. I create the certificate in my UWP project Properties > Signing > Choose a strong name key file: > New. This steps resolved my issue.
Take a look at below statement:
Select the right type of build agent
Choose the type of build agent that you want VSTS to use when it
executes the build process. A hosted build agent is deployed with the
most common tools and sdks, and it will work for most scenarios, see
the Software on the hosted build server article. However, you can
create a custom build agent if you need more control over the build
steps. You can use the following table to help you make that decision.
Note: If you plan to target the Windows Anniversary Update SDK (Build 14393) you will need to set up your custom build agent, since the hosted build pool only supports SDK 10586 and 10240. More information to choose a UWP version
Besides, if you use a Git repository, add the certificate file of your project to the repository so that the build agent can sign the appx package. If you don’t do this, the Git repository will ignore the certificate file. To add the certificate file to your repository, right-click the certificate file in Solution Explorer, and then in the shortcut menu, choose the Add Ignored File to Source Control command.
More details please refer this tutorial: Set up automated builds for your UWP app

Could not find SDK SQLite.UWP.2015 when building UWP application using Hosted TFS pool

I have build a UWP application using Sqlite. On my local machine I had to install the following SQLite for Universal Windows Platform Visual Studio Extension to get it to build. I followed this blog when using sqlite on UWP
I am now trying to implement Continuous integration with Visual Studio Team Services (was Team Foundation Server Online).
I am using a Hosted pool to build my application but I get the following message:
C:\Program Files
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2049,5):
error MSB3774: Could not find SDK "SQLite.UWP.2015, Version=3.12.2".
and it breaks the build.
How can I fix this on a hosted pool? I do not have physical access to the machine as this is managed by TFS online
EDIT:
After finding this is a library that is installed on my local machine (through the Visual Studio Extension) and so doesnt exist on my hosted machine meaning the reference is broken I am trying to add the respective files to source control and reference it directly from source control. But I have no idea what dll it is actually referencing as it doesnt say. The properties of the reference are as follows:
Actually there is a simple solution that has worked perfectly for us:
Copy the Microsoft SDKs folder to your repo (or submodule).
Add this to the end of your csproj file:
<PropertyGroup>
<SDKReferenceDirectoryRoot>$(MSBuildProjectDirectory)\..\..\..\..\Microsoft SDKs;$(SDKReferenceDirectoryRoot)</SDKReferenceDirectoryRoot>
</PropertyGroup>
From now on the build process will first check this directory for the required extensions and then fallback to the locally installed extensions. This works perfectly on VSTS hosted agents and doesn't require you to install all the extensions on every dev machine.
There isn't any way to install the extension on Hosted Build Agent.
Q: Does your build depend on software other than this software that is
installed on hosted build resources?
A: No. Then you can use the hosted pool.
Here is the software installed on Hosted Build Agent: Software on the hosted build server.
The work around is deploy your own build agent. With this build agent, you can install the software you want to build your project.
You can not install extra extension in a Hosted VSTS. I tried with TS support and there is no way to do it right now.
You can use difference CI service like Appveyor with give you some control over installing extension via powershell.
Or you can wait for Windows 10 Anniversary with include Sqlite.
Download SQLite for Universal Windows Platform SDK from here
Install it by double clicking.
This solved same issue with my UWP project.

tfs preview and software licenses

Recently moved project to tfs preview and having trouble with software licenses installed on local dev boxes building correctly but on on tfs preview.
TFS fails the build saying it can't access registry due to those dll's that require installation. When removing the license contents from the .licx file tfs builds ok but the resulting drop and install issues a warning due to the license not being imbedded in the .exe.
Is there a way to install 3rd party licenses on tfs preview or is there another work around I am missing?
I'm going to assume you're using the hosted build controller. If so, you can't install software on those machines as they use standard base images and are reset after each build.
Any builds where you want/need custom software installed are best done using your own build server, either with an on premise machine or an IAAS VM in Azure.
For reference the software included on the hosted build servers is listed here.

Installshield Limited Edition licencing on build server

I have recently installed Installshield LE on my local PC for vs2010, built a package and now wanting it to be built on our build server. I have also installed it on our build server.
I am getting the error:
error : -7159: The product license has expired or has not yet been initialized.
I have logged onto the build server, started vs and entered in my licence code. However, this has has not resolved the error.
I have read about the stand alone version but that appears to be only available for premium edition. Anyone have any ideas?
if you are using the 2012 Spring edition of Installshield LE run the license activator on the build server at :
C:\Program Files (x86)\InstallShield\2012SpringLE\System\TSConfig.exe
The location may be different for other versions of Installshield LE.
You should be able to use the same activation code they sent you when you signed up for the Installshield LE, according to the license it allows for installation on more than one machine for automated build purposes.
InstallShield has online activation. You'll need to request multiple license keys and activate them on different machines.
Ran into this issue on our TeamCity build server. Initially I was able to run TSConfig.exe as the build server user and that worked. After a disaster recovery exercise, however, TeamCity reported the license was expired again, but running TSConfig.exe didn't do the trick.
I ended up launching VS 2015 as the build server user and opened a new InstallShield project. Instead of informing me the license was expired it said the license was corrupted and needed to be repaired. It performed the repair and I'm back on track.
I didn't know it was an option until after, but TSConfig /repair likely would have done the trick without opening Visual Studio.

Is it possible to install the Team Foundation Build Services on another machine or VM?

I'm working on automating our build process using Team Foundation Build 2010. When our TFS Server was installed, whomever installed it didn't install the Build Configuration Services so this node is missing from the TFS Admin Console. I'm pretty sure I know the answer to this but I wanted to check in case I'm missing something. I'm also asking because the TFS Server is a production server and my supervisors do not want to install anything on this server. Can the Build Services be installed on another machine or VM and still have the Build Configuration Node appear in the TFS Admin Console? I know the Build Controller as well as the Build Agent can be installed on another machine or VM. I just wanted to get clarification on the "Build Configuration Services" piece. Thank you
Absolutely! This is actually a very typical scenario. I don't normally recommend for people to install the build services on any of the application tier servers. When you install only the build features, the TFS Administration Console will show only the build features.
By installing it on separate machines, you can create a build farm of a build controller with multiple build agents. It scales very well.
Build servers would be considered "production" servers in my opinion as well. They don't have the same disaster recovery or monitoring requirements though. If a build machine dies, just image another one and add it to the pool. This is essentially how the elastic build service for the Team Foundation Service (aka TFS Preview) currently works. They get destroyed after each use.

Resources