How to use ClickOnce custom prerequisites with Azure DevOps Pipelines - azure-devops

We have a ClickOnce application we try to deploy with Azure DevOps pipelines.
We have figured the deployment process out with creating manifests and signing them.
The problem is now we want to also use the prerequisits option of ClickOnce with some custom packages.
After reading the docs we created a custom bootstrapper package and it was displayed in Visual Studio. When we publish the app with Visual Studio the custom package is added. But if we use it on the DevOps pipelin it's ignored. This makes sense because the build server doesn't know the custom package.
For example one prerequisit is the Microsoft OLE DB Driver for SQL Server.
One Idea maybe would be to not use the option "Download prerequisites from the component vendor's web site", but host the exe/msi files ourselves and link to them.
Another option could be this support URL for individual prerequisites but here I don't know how to set this to other applications.
Does somebody have an idea how custom prerequisites with ClickOnce can be added to a Azure DevOps build server/pipeline?

You could try to use Azure cli to upload the package(with its setup.bin file) to Azure DevOps artifact feeds
as universal packages type.
Create a feed first then you could use az artifacts universal publish to upload the packages.
Then you could use the "Universal packages" task in your Azure DevOps pielines to download the packages for using.
As you said, you could use visual studio run with the packages successfully. If you use VSBuild#1 task as the doc recommend in your pipelines to deploy the ClickOnce, you could add the path of the custom package in Azure DevOps, it looks like something like this:
'p:GenerateBootstrapperSdkPath=$(System.DefaultWorkingDirectory)\bootstrapper'
I hope it could help.

Related

Pipeline on Azure Devops is failing

a month ago we had a solution (big one) in .net framework 4.7.2. This was building fine on azure devops pipeline.
Now we ported our solution to net5.
Everything is working in visual studio but on azure devops, the pipeline is failing.
We had to change our Microsoft.Interop.Word (and excel, and outlook) to a com reference. Because net5 is multiplatform and interop is not.
Because we removed the nuget packages and changed to com reference the pipeline is failing.
Does anyone know how to handle this specific problem?
We can't remove the interop.excel and etc from our projects because they are dependent on it.
Beneath you see the result we have.
It feels like we have tried everything to make it work again on azure devops.
have you consider self-hosted agent since you have requirement to stay the external library in this case Microsoft.Office.Interops and I don't think Microsoft Azure DevOps Pipeline agent support that currently.
With self-hosted agent, you install the PIAs and link your library/com references to the paths.
There is problem with assembly in the code, your code may be building on local environment as it is getting references for all assemblies however when you checking in the code pipelines could not fetch the assemblies through nuget package restore, if you are referencing assembly from local machine, make sure you add its nuget package reference package.config file, so nuget restore will restore the package
can you try below
Link

Does anyone know how to use the Doxygen Tool in Azure DevOps?

Specifically I need the yaml for the build definition. I already have Doxygen and Latex installed on the agent machine. Also, I can create Doxygen documentation for the C# Restful API manually using the tool.
Does anyone know how to use the Doxygen Tool in Azure DevOps?
To use the Doxygen Tool in Azure DevOps, we need to install required softwares on agent machine:
Doxygen tool should be installed on the Build agent machine
(download)
PdfLatex tool should be installed on the Build agent machine.
Then add the task Documentation (Doxygen) in the build pipeline to generate the documentation from source code in your repository. On successful generation, the task uploads the file as Build artifact so that it can be downloaded at later time:
Note: This extension doesn't works with Hosted build agent as of now. So, please use a locally configured build agent.
Besides, if you want to generate YAML documentation, you could try to use the extension YAML Documentation Generator.
Hope this helps.

How can I upload a file to Azure Artifacts from my powershell console using Azure DevOps REST Api?

I want to upload a file to Azure Artifacts using the Rest API. Can I do it?
We use on-prem Azure DevOps Server 2019.
Please, note that it is not a nuget or an npm package. It is just a file.
It is not a nuget or an npm package. It is just a file.
If what you want to upload is files instead of packages, in Azure devops, I'm afraid only Universal package can available for files to stored.
BUT, what the issue is Universal package does not supported for Azure devops server. It only support in azure devops service now.
In our official forum, there has such suggestion raised to request for this feature added in Azure devops server/TFS. You can vote and share your demand there to raise its priority. Our product group will review it regularly to consider take some features into develop plan.

Use Azure Pipline with UiPath to create and deploy nuget packages

How to use azure pipleline for creating nugetpackes and deploying to orchestrator?
The generation of the package is running with the following package: https://marketplace.visualstudio.com/items?itemName=uipath.vsts-uipath-package
In the case this is the right way what's the solution to upload them to orchestrator?
Possibility 1: Create nuget feed in azure (one feed for TEST and one
for PROD)
Possibility 2: Deploy packages to orchestrator directly
Though I am not one of the developer for UiPath, as I know, this extension hasn't integrated with our Azure Devops feed. So, your first possibility solution should not suitable in VSTS.
To achieve what you want, I suggest you pack and deploy the packages by using the UiPath Package task directly.
Create the package in build pipeline:
Create a build pipeline, add and configure the UiPath Package task by following the description here. For create the package, please choose Pack as Package action value:
Note: Please keep the default value of Output folder as $(Build.ArtifactStagingDirectory). It is the path which used to store the artifact, then got by the release pipeline.
Deploy the package to orchestrator in Release pipeline:
Create a Release pipeline, choose the build you executed previously as the source.
Add the same task into the stage, but here please choose Deploy as Package action value:
Then configure your Orchestrator info and the identity Authentication details.

VSTS: Release Management Deploying Artifacts to IIS on Premise

I am using VSTS Release management to deploy artifacts to IIS websites. I have several Web applications and web services to be deployed. So, i am trying to figure out what sort of tasks that best fits my situation.
I have created a build definition with Visual Studio Build Task for projects as this one:
which works fine but i need to add a task for copying the artifacts Under IIS Website Directory.
The other approach is to use IIS web deployment as a task in Release definition, so I created the build definition as:
However, it expects a Publish Profile (the build fails because it can't find it). I don't need to create a publish profile for each project in the application because this would be too much work.
Is there is a workaround for that or what is preferred approach for this?
You can update your build definition to generate a web deployment package and upload it to artifacts. And then in Release Management, add a task to run "projectname.deploy.cmd" in the deployment package to deploy it to your IIS server. Refer to this link for details: How to: Install a Deployment Package Using the deploy.cmd File Created by Visual Studio.
And you can also enable FTP Publishing on your IIS server and add a task in your release to publish the artifacts via FTP. You may need this task:
FTP Uploader.
My Continuous Delivery with TFS / VSTS – Server Configuration and Application Deployment with Release Management blog post (with reference to some previous posts) has all the details you need for deploying your artefacts to target nodes using Windows Machine File Copy tasks then use PowerShell on Target Machines tasks to get them in to correct locations and to do token replacement and anything else that's required.
I would recommend using PowerShell DSC so that IIS is properly configured before deployment but that's not required. Where possible for web apps I favour keeping things very simple by creating artefacts that contain all the web files that are needed for a particular folder and then just using plain xcopy for the deployment.
If you need more control you can also use my MSDeploy VSTS extension to deploy a MSDeploy package
https://marketplace.visualstudio.com/items?itemName=rschiefer.MSDeployAllTheThings
https://dotnetcatch.com/2016/04/20/msdeployallthethings-vststfs-extension-is-public/