dotnet build vs publish on Azure DevOps

0 votes

I have a console app for .NET Core 2.0. 

I can successfully create, distribute, and operate this software locally. 

In Azure DevOps, I can successfully create and publish this app. 

However, I am unable to launch the finished product if I construct the app in Azure DevOps. I tried creating in Azure DevOps using:

dotnet build -c Release -r win-x64 -o app

When I run:

dotnet publish -c Release -r win-x64 -o app

The System.*.dll files and other files are included, however, I still receive the same files. 

This time, I've seen that MyApp.exe runs successfully and functions as intended.

Why does dotnet build... function locally, but when I run it in Azure DevOps, I don't seem to get the same behavior? 

I feel as though I must use dotnet publish. 

The resulting.zip file grows from 500kb to 30MB, which is my problem. 

This difference is significant.

Dec 13, 2022 in DevOps on Cloud by Nicholas
• 7,760 points
885 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In DevOps on Cloud

0 votes
1 answer

How can we publish html test reports in azure devops build results?

This might help you. Have a look ...READ MORE

answered Oct 12, 2020 in DevOps on Cloud by Kriti

edited Oct 27, 2021 by Sarfaraz 8,230 views
0 votes
0 answers
0 votes
0 answers

Azure DevOps Build Pipeline - Exclude a Folder from Code Coverage

I'm trying to exclude a folder from the code coverage analysis, but I'm not having any luck despite a lot of trial and error and research on this site. This is my build pipeline test task: - task: DotNetCoreCLI@2 displayName: 'Running Unit ...READ MORE

Dec 19, 2022 in DevOps on Cloud by Damonlang
• 1,230 points
2,691 views
0 votes
1 answer

Advantages of using DevOps with Azure

One of the main advantages is the ...READ MORE

answered Mar 29, 2019 in DevOps on Cloud by Yesha
478 views
0 votes
0 answers

Update test results @ test step level in Azure DevOps during test execution through automation scripts

My automation framework is writtin in Java, ...READ MORE

Aug 21, 2020 in DevOps on Cloud by Anand
• 120 points

recategorized Aug 21, 2020 by MD 981 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP