I have been trying to fix the issue where the drops created by my pipelines do not contain the {Assembly}.styles.css of the different .csproj. When I publish locally, it works as expected, but not on Azure pipelines.
I haven't found many information about this. There is this Stackoverflow answer about doing a build command, but I was hoping there was something easier / better / built-in.
Details of the Yaml (Seems very straight forward...I left out test and symbols steps)
steps:
- task: NuGetToolInstaller@1
displayName: 'Use NuGet 5.11.0'
inputs:
versionSpec: 5.11.0
checkLatest: true
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
inputs:
solution: '$(Parameters.solution)'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)\Blazor*************'
inputs:
SourceFolder: '$(system.defaultworkingdirectory)\'
TargetFolder: '$(build.artifactstagingdirectory)\Blazor**************'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()
In logs I can find information that I can't really understand like:
Skipping asset 'D:\a\41\s\Blazor******\obj\Release\net6.0\scopedcss\bundle\Blazor******.styles.css' since copy to output directory option is 'Never'
Accepted candidate asset 'D:\a\41\s\Blazor******\obj\Release\net6.0\scopedcss\bundle\Blazor******.styles.css' because project mode is 'Root' and asset mode is 'CurrentProject' Skipping asset 'D:\a\41\s\Blazor******\obj\Release\net6.0\scopedcss\bundle\Blazor******.styles.css' since source type is 'Project'
Anyone has an idea?
Thanks :)