0

I created a DevOps project witch contains a dotnet core 3.0.0 web application. If I publish my project right from visual studio (where I selected "self- contained" deployment), the App runs and i can access the Website. But if I release the App trough the Pipeline, I get the error:

The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.

I've already tried adding the dotnet core 3.0 sdk extention to the webapp using the "Advenced tools of my Web App" and i also added the "use net core" task to the pipeline so i can run the Bulid Pipeline:

- task: UseDotNet@2
  displayName: 'Use .Net Core sdk 3.0.x'
  inputs:
    version: 3.0.x

I've been looking for a solution of that Problem for Hours and couldn't find anything. Is the any way i can make the App run without downgrading to dotnet core 2.x?

  • Maybe this link can help you => [opserver](https://github.com/opserver/Opserver/blob/craver/aspnetcore/azure-pipelines.yml) (From Nick craver, devops/sre at stackoverflow) – Kalten Oct 01 '19 at 20:34
  • try adding 3.0 runtime env also sdk wont help in prod – RAHUL S R Oct 01 '19 at 21:02
  • The "use net core" task should be implement dotnet core 3.0 in devops project. Is your target framework 3.0 `netcoreapp3.0` in your project file? Have you tried create a new Web app with .net core 3.0, then build/publish it, check if you still have this issue. – Leo Liu Oct 02 '19 at 08:05
  • FYI: I encountered [a similar issue](https://stackoverflow.com/questions/60839745/troubleshooting-500-31-ancm-on-azure-app-service/60839746). As I'm unclear why there's a difference between publishing from **Visual Studio** and publishing from an **Azure DevOps Pipeline**, I am not submitting an answer here. But I did submit a separate answer on [how to troubleshoot these types of issues](https://stackoverflow.com/a/60839746/3025856) which may be useful to you, or other people coming across this question. Alternatively, if you discovered a solution to this, I'd love to hear what you found. – Jeremy Caney Mar 24 '20 at 21:41

1 Answers1

1

Mine was as simple as adding a task at the beginning of the build like so: Screenshot

Robert Perry
  • 1,906
  • 1
  • 14
  • 14