In Visual Studio (2019) I can build my app and publish it locally. I can then copy the files manually to my server and everything is fine.
I amusing C# Asp.Net-Mvc Core 2.2, I'll be moving to 3.1 shortly but would like to solve this before I move on.
I'm trying to set up an Azure pipeline as I use VSTS-GIT for my source control. My YAML file is below.
The pipeline runs fine and it uploads files to my server but the website doesn't work and the files that are uploaded aren't the same as the manual method. The error is HTTP Error 500.31 - Failed to load ASP.NET Core runtime
, but I think that's a red-herring because the exact same website works perfectly fine if I upload files manually.
I've been at this a while now, reading all sorts of articles and videos but I can't seem to get it to work. I know I am doing something wrong but I don't know what.
I'm struggling to find the right details to do the same thing with Azure Dev Ops, can anyone help, please?
trigger:
- local-1
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: false
- task: FtpUpload@2
inputs:
credentialsOption: 'inputs'
serverUrl: 'ftp://ftp.xxxxxxx.com/'
username: 'xxxxxxxxxxxxx'
password: 'xxxxxxxxxx'
rootDirectory: '$(Build.ArtifactStagingDirectory)'
filePatterns: '**'
remoteDirectory: '/'
clean: false
cleanContents: false
preservePaths: false
trustSSL: false