Deploying AzureDevOps Build Artifacts - azure-devops

I have a solution in Azure Devops. This is for Azure function. I am using the build pipeline to generate a artifact. This artifact I need to deploy it through powershell, I am using kudo API to deploy this.
https://$appName.scm.azurewebsites.net/api/zipdeploy
The issue is the format which Azure DevOps generates completely different from msdeploy in visual studio generates. When I deploy the zip file generated from vs it gets deployed correctly. Can I make Azure Devops to generate the Artifact same as visual studio
Adding more information as per comment
I am using Visual Studio Build Task to generate build and Publish task to publish artifact
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/build/visual-studio-build?view=azure-devops
https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/publish-build-artifacts?view=azure-devops
The generated artifact with zip has a high depth something like "\publish\Content\D_C\a\1\s\src\aadsr\aadsr\obj\Release\net461\PubTmp\Out".
I just want the zip file should have content of Out folder, which I directly want to publish to a function APP

Related

How to Create Artifacts feed in Azure DevOps only with dll

I have found that we can create private Artifact feed in Azure DevOps pipeline by build, Pack and Push task in YAML Pipeline when we have source code.
But now I have access to one third party dll (but not source code) which will be referred by all other .Net solutions.
Can some one help me how can we create Artifact feed only with the dll and with no source code access.
In this scenario, you could create Universal Package instead of Nuget with the dll file.
Both Azure CLI and Azure Pipeline task are supported to publish and download Universal Package.
Azure CLI: https://learn.microsoft.com/en-us/azure/devops/artifacts/quickstarts/universal-packages?view=azure-devops
Universal Package task in Azure Pipeline: https://learn.microsoft.com/en-us/azure/devops/pipelines/artifacts/universal-packages?toc=%2Fazure%2Fdevops%2Fartifacts%2Ftoc.json&bc=%2Fazure%2Fdevops%2Fartifacts%2Fbreadcrumb%2Ftoc.json&view=azure-devops&tabs=classic
Choose the dll file as "Path to file(s) to publish"

What happens to csproj on Azure DevOps buid

When building and publishing an Azure DevOps build, what happens to csproj and where does it go?
I'm writing data to csproj in AssemblyInfo Visual Studio marketplace but I can't seem to consume the data.

Does TFS has releases tab like we have at GitHub Releases

I am looking for hosting .exe files in Azure Devops. It seems to don't have feature similar to how we host executable or build files in GitHub for other people to download. Do we have such kind of feature to host the executables and have the latest commit tagged?
You can try publishing the executable or build files as Build Artifacts in Azure devops build pipeline.
You can create a pipeline in azure devops and using Publish build artifacts task to store the executable or build files in azure pipeline
See example here to create a classic azure pipeline. See Here for yaml pipeline example.
When you run the pipeline. You will see the commit hash and the files uploaded in the highlighted field of the build summary page shown in below screenshot. And you download the files from there.
You can retain this artifacts by Clicking retain in the pipeline run. See below
You can also change the retention policy for your pipeline. See here for more information.
Go the Project settings page-->Settings under Pipeline. See below:

ClickOnce deployment on Azure DevOps release pipeline

I am trying to create ClickOnce deployment on Azure DevOps release pipeline
I create signature, manifest, application, deploy files with certificate
But how can I create the exe and setup file (via Azure DevOps release pipeline)
But how can I create the exe and setup file (via Azure DevOps release
pipeline)
Check document Build ClickOnce applications from the command line: Msbuild has Publish target to build and publish the ClickOnce application. It will generate the setup.exe you want. See similar hint here.
And all above is about doing that in local machine, to do similar job in release pipeline you can use msbuild task or Visual Studio Task with Publish target(/t:Publish as argument).
Then you'll get one app.publish folder where the files you want exist there:
This folder can be used for your further deployment.
In addition:
If you meet error like Unable to find manifest signing certificate in the certificate store, please check the suggestions in this issue.

Deploy Azure App Service and Webjobs using Azure Devops in .Net Framework

I have created Azure AppService and added Webjobs console application in a single solution. I'm trying to build the solution through Azure DevOps build pipeline and Deploy the package through Octopus. When I build the solution there files required for Appservice such as Web.config and Global.asax are missing from Artifacts folder. so When deploying that package is breaking the AppService.
I tried to change the MSBuild arguments while building the solution. the current MSBuild arguments are as follows:
/p:DeployOnBuild=true/p:WebPublishMethod=Package
/p:Configuration=$(BuildConfiguration) /p:OutputPath=.\bin\ /p:PackageTempRootDir="$(build.artifactstagingdirectory)\temp" /p:packageAsSingleFile=true /p:TargetProfile=Cloud
I suspect, while building the Webjobs it is removing the App Service files, so the generated package does not contain all the required files. My Build pipeline looks like below.
My Artifacts folder Creates a Nupkg file which has following files.
If the App Service is deployed alone, It is working fine,Please suggest me the way I can deploy both from single solution and one Build definition on Azure devOps.