deanwiseman / DartSassBuilder

Sass builder (dart compiler) for .NET projects
MIT License
30 stars 10 forks source link

add support for dotnet 7 #24

Open paule96 opened 1 year ago

paule96 commented 1 year ago

It would be nice, if this build tool works also if you only have dotnet 7 installed. Right now you need two sdks installed to run the build successfully for a dotnet 7 project.

hmih commented 1 year ago

Same here, I'm getting bit by the dotnet version as well.

mesies commented 1 year ago

Same here, we are using it inside a docker image build and adding a second sdk is not an option

pwysocki-cares commented 1 year ago

Same here, we are using it inside a docker image build and adding a second sdk is not an option

@mesies , I am able to blend dotnet7.0 blazor wasm and dartsassbuilder by installing the second SDK within the 'build' image in my docker file.

Here's the pre-amble in my dockerfile:

See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base WORKDIR /app EXPOSE 80 EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build WORKDIR /src

RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh RUN curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -Channel 6.0 -Runtime dotnet -InstallDir /usr/share/dotnet

(These are linux commands, but there are Windows commands that can install a runtime - I recall seeing instructions using powershell to download the installer as part of the docker build command, but don't have them handy, I'll try to track them down lateR).

pwysocki-cares commented 1 year ago

Here's the Windows version of the above install script: # escape=`

FROM mcr.microsoft.com/windows/servercore:ltsc2022 RUN powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest -UseBasicParsing -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1; ./dotnet-install.ps1 -InstallDir '/Program Files/dotnet' -Channel 6.0 -Runtime dotnet; Remove-Item -Force dotnet-install.ps1 && setx /M PATH "%PATH%;C:\Program Files\dotnet"

These instructions are from https://github.com/dotnet/dotnet-docker/blob/main/documentation/scenarios/installing-dotnet.md

vladimir-angelov-1337 commented 1 year ago

Fucking do it bro it's been 8 months now

kovianyo commented 11 months ago

It seems like there is a Pull request now for this: #34. Until that, setting the environment variable DOTNET_ROLL_FORWARD to LatestMajor solved this for me. https://learn.microsoft.com/en-us/dotnet/core/versions/selection

benharrison commented 10 months ago

Can the pull request #34 get some attention? It has been open for 5 weeks and seems to be a natural fit for DartSassBuilder 1.0.1.

XavierInversive commented 9 months ago

needed also for .net 8

lonix1 commented 9 months ago

What are people using instead of this tool, for .NET 7 / 8?

mesies commented 9 months ago

It seems like there is a Pull request now for this: #34. Until that, setting the environment variable DOTNET_ROLL_FORWARD to LatestMajor solved this for me. https://learn.microsoft.com/en-us/dotnet/core/versions/selection

What are people using instead of this tool, for .NET 7 / 8?

@lonix1 We are doing what @kovianyo suggested

lonix1 commented 9 months ago

Thanks. That's a good option if you're allowed to do it; here we pin versions to patch so cannot pin to major.

Regardless, seems the repo owner has not been on github since March, so this library is probably abandoned. If I find an alternative I'll post here.

benharrison commented 9 months ago

I abandoned this project, because it appears to be dead. I replaced it with the Visual Studio Extension Web Compiler. It handles all of the compiling on your local machine, and generates a .css and .min.css that I check into source control. Now my build server has one less dependency to deal with. I have been very pleased with this solution.