Skip to content

SassCompiler not working in Azure Devops Build on Ubuntu #227

@LucGosso

Description

@LucGosso

Describe the bug
SassCompiler not working in Azure Devops Build on Ubuntu, Path error?

ubuntu-latest, ubuntu-22.04, ubuntu-20.04

Version
<PackageVersion Include="AspNetCore.SassCompiler" Version="1.83.4" />

Work around

Use "windows-latest" #in yml

To Reproduce

install sasscompiler nuget
config appsettings:

"SassCompiler": { "Source": "wwwroot/scss", "Target": "wwwroot/css", }

add scss files in wwwroot/scss

Setup yml dev.azure.com

Yaml example

`trigger:

  • master
  • develop

pool:
vmImage: 'ubuntu-latest'

variables:
buildConfiguration: 'Release'
coreFramework: 'net8.0'
projects: '**/My.Web.csproj'
projectJsonFileDir: './'
nodeWorkingDir: '$(System.DefaultWorkingDirectory)/My.Web'

steps:

  • task: UseNode@1
    displayName: 'Use Node 22.13.1'
    inputs:
    version: '22.13.1'
    checkLatest: true
  • task: Npm@1
    displayName: 'npm install'
    inputs:
    command: 'install'
    verbose: true
    workingDir: $(nodeWorkingDir)
  • task: NuGetAuthenticate@1
    displayName: 'Authenticate with NuGet'
  • task: PowerShell@2
    displayName: 'dotnet restore'
    inputs:
    targetType: 'inline'
    script: 'dotnet restore --nologo'
  • task: DotNetCoreCLI@2
    displayName: Build
    inputs:
    projects: '$(projects)'
    arguments: '--configuration $(BuildConfiguration) --framework $(coreFramework)'`

Expected behavior
build works

Screenshots

ERROR: /home/vsts/.nuget/packages/aspnetcore.sasscompiler/1.83.4/build/AspNetCore.SassCompiler.targets(18,5): Error : Could not compile sass for source wwwroot/scss, because it does not exist.

Additional context
Files do exist in wwwroot/scss

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions