EDIT / SOLUTION
Turns out problem had nothing to do with the build pipeline. The git repo allowed two folders (wwwroot and WWWroot) in the same place but was only sending the wwwroot to my development machine. Suspect the build process was either prioritizing the other one which caused some of the resources (js css) to not be available - makes sense now that it was serving old versions, just did not at all make sense why). Even decompiling in dotPeek didn't help because the files (an and correct versions) were there, I just didn't notice the additional WWWroot and I guess OrchardCore must have prioritized that folder from the build... Sigh...
END EDIT
I am trying to get a publish of an OrchardCore website going in Azure Devops. When I build/publish locally, the site runs fine. When I publish from Azure Devops, the results are just a little different. There are a small number of additional files and the dlls are generally a small number of KB different. I have tried lots (and lots) of options in Azure Devops to no success.
The result I am seeing is that the site is complaining that some css and js files are not available. When I disassembly with DotPeek, I see they are available, but I can't hit them from the browser. I have another project (an Orchard Core Theme) and it doesn't have any issues serving css and js files. I am 100% certain this is related to my devops yml. I am able to point my IIS from the UAT site (broken) to the drop for local, and it works, so I know it's not an IIS config issue.
Not sure I am even using the correct task objects VSBuild, MSBuild, DotNetCoreCLI?
Here is my current yml file:
parameters:
#this yml is used as a template, the pipeline script passes in the path to the csproj
- name: solution
type: string
default: ''
steps:
- script: echo ${{ parameters.solution }}
echo $(System.DefaultWorkingDirectory)
- task: NuGetToolInstaller@1
inputs:
versionSpec: 5.8.x
- task: UseDotNet@2
displayName: 'Use .NET Core SDK 5.0.x'
inputs:
packageType: 'sdk'
version: '5.0.x'
- task: DotNetCoreCLI@2
displayName: 'Restore NuGet Packages'
inputs:
command: restore
projects: '**/*.csproj'
includeNugetOrg: true
- task: DotNetCoreCLI@2
displayName: 'Build Project'
inputs:
command: publish
zipAfterPublish: true
publishWebProjects: false
projects: '${{ parameters.solution }}'
arguments: '-c $(buildConfiguration) -o $(build.artifactStagingDirectory)'
#arguments: '-c $(buildConfiguration) -o $(build.artifactStagingDirectory) -f net5.0 --no-restore'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifacts (drop)'
inputs:
PathToPublish: '$(build.artifactstagingdirectory)'
ArtifactName: 'drop'