Giter Site home page Giter Site logo

Comments (17)

johan-v-r avatar johan-v-r commented on August 14, 2024 3

Hi All - there's a new release v2.0.0 that targets .NET 6
Please update and let us know... 👍

from libsassbuilder.

louisoftokyo avatar louisoftokyo commented on August 14, 2024

Having the same problem.

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

I had this issue too... seems that there is a change after installing VS2022.
libsassbuilder now tries to load the wrong libsass.dll (x86 instead of x64).

On my machine I noticed dotnet build was also not working, I uninstalled my dotnet (32 bit from program files (x86)). And then all worked again.

I think a possible solution would be to force libsassbuilder.exe to run only as x86 or x64. But I don't have time to investigate further, and it seems my problem is solved by uninstalling the dotnet-sdk from x86 mode.

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

"C:\Program Files (x86)\dotnet\dotnet.exe" --info
vs
"C:\Program Files\dotnet\dotnet.exe" --info

X64 has an sdk, the x86 does not have an sdk registered on my machine after I uninstalled VS2019 and installed VS2022.

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

This is actually where the problem originates... for some it cannot find dotnet.exe, or no registered runtime.
The call to dotnet libsassbuilder.dll causes the dll to be loaded in context of the x86 or x64 executable, and on my machine it is missing the native sass library.

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

If you want this fix now before Johan can release a new version, you might want to look at the changes I made in the files.

It is easy to do on your own machine to get going again:
%APPDATA%.nuget\packages\libsassbuilder\1.6.4\build\LibSassBuilder.targets

  • remove dotnet here

%APPDATA%.nuget\packages\libsassbuilder\1.6.4\build\LibSassBuilder.props

  • change .dll into .exe

See: https://github.com/johan-v-r/LibSassBuilder/pull/41/files

from libsassbuilder.

adamhathcock avatar adamhathcock commented on August 14, 2024

thanks for the info. I don't think that temporary fix is workable in a dockerized CI environment though

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

@adamhathcock I know it does not work for all situations. But for me at least it enabled me to continue working locally. And in a linux environment the whole x86/x64 issue might not be a factor.

from libsassbuilder.

adamhathcock avatar adamhathcock commented on August 14, 2024

The exact error I get is:

 /home/runner/.nuget/packages/libsassbuilder/1.6.4/build/LibSassBuilder.targets(90,5): error MSB3073: The command "dotnet "/home/runner/.nuget/packages/libsassbuilder/1.6.4/build/../tool/LibSassBuilder.dll" files "/home/runner/work/case-sites/case-sites/CaseFunnel.CaseToAnswer/wwwroot/css/caseStyle.scss" --outputstyle compressed --level default " exited with code 150. [/home/runner/work/case-sites/case-sites/CaseFunnel.CaseToAnswer/CaseFunnel.CaseToAnswer.csproj]
  It was not possible to find any compatible framework version
  The framework 'Microsoft.NETCore.App', version '5.0.0' (x64) was not found.
    - The following frameworks were found:
        6.0.0 at [/home/runner/.dotnet/shared/Microsoft.NETCore.App]
  
  You can resolve the problem by installing the specified framework and/or SDK.
  
  The specified framework can be found at:
    - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=5.0.0&arch=x64&rid=ubuntu.20.04-x64

if you had to rename the file from dll to exe that would explain it for me. Though, not sure how the build artifact changed

from libsassbuilder.

adamhathcock avatar adamhathcock commented on August 14, 2024

Maybe it's as simple as having to multi-target the exe for .net6? I guess I thought it would just work on the new runtime. Not sure why it wants net5 specifically

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

The problem starts with half of the people having this issue that they have a x86 version of dotnet.exe without an x86 sdk or runtime, this is counter intuitive and a strange requirement.

Other half of the problem could be solved with having the .dll run in both x86 and x64 environments. But before even getting to that point dotnet.exe already fails to start.

from libsassbuilder.

adamhathcock avatar adamhathcock commented on August 14, 2024

Appears to work for me. Thanks for the quick update!

from libsassbuilder.

enricobenedos avatar enricobenedos commented on August 14, 2024

It newly build on our CI with .NET 6! Thanks

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

I finally came to upgrading my project, at my end this still fails:

10>Sass compile files
10>Unhandled exception. LibSassHost.SassCompilerLoadException: During loading of Sass compiler error has occurred. Most likely it happened, because the 'libsass.dll' assembly or one of its dependencies was not found. Try to install the LibSassHost.Native.win-x86 package via NuGet. ---> System.DllNotFoundException: Unable to load DLL 'libsass' or one of its dependencies: The specified module could not be found. (0x8007007E)
10>   at LibSassHost.Internal.Native.Sass_Api.libsass_version()
10>   at LibSassHost.Internal.SassCompilerProxy.GetVersion()
10>   at LibSassHost.SassCompiler.Initialize()
10>   at LibSassHost.SassCompiler.Initialize()
10>   at LibSassHost.SassCompiler.CompileFile(String inputPath, String outputPath, String sourceMapPath, CompilationOptions options)
10>   at LibSassBuilder.Program.CompileFilesAsync(IEnumerable`1 sassFiles) in D:\a\LibSassBuilder\LibSassBuilder\src\LibSassBuilder\Program.cs:line 0
10>   at LibSassBuilder.Program.<>c.<<Main>b__0_2>d.MoveNext() in D:\a\LibSassBuilder\LibSassBuilder\src\LibSassBuilder\Program.cs:line 44
10>--- End of stack trace from previous location ---
10>   at CommandLine.ParserResultExtensions.WithParsedAsync[T](ParserResult`1 result, Func`2 action)
10>   at LibSassBuilder.Program.Main(String[] args) in D:\a\LibSassBuilder\LibSassBuilder\src\LibSassBuilder\Program.cs:line 22
10>   at LibSassBuilder.Program.<Main>(String[] args)
10>
10>C:\Users\JelleJHissink\.nuget\packages\libsassbuilder\2.0.0\build\LibSassBuilder.targets(90,5): error MSB3073: The command "dotnet "C:\Users\JelleJHissink\.nuget\packages\libsassbuilder\2.0.0\build\../tool/LibSassBuilder.dll" files "C:\Work\TEWC\TestUpgrade\Source\MijnPlannen\wwwroot\styling\site.scss" --outputstyle compressed --level default " exited with code -532462766.

On my machine I have both the 6.0 x86 and x64 installed now... however my dotnet.exe that is on my PATH first is the x86 version, not the x64. So it still fails when calling dotnet.exe like this.
The tool should not depend on randomness like the order of the PATH environment. I still think calling the tool without dotnet and just call the .exe (at least on windows machines). Or otherwise include both x86 and x64 versions of the dependencies.

from libsassbuilder.

JelleHissink avatar JelleHissink commented on August 14, 2024

I know this issue is closed, but on my end this still depends on the order in the PATH of dotnet.exe.
I ran into this issue once more on a different laptop.
If the x86 version comes first, the tool is run in x86 mode on windows. The PR that I made fixes this, the same issue exists in the dart version. However all pull requests are stale on both projects. What is the status? Should I fork, because I want to make some more changes with regards to hot reloading.
But I don't know if it is worth investing the time?

from libsassbuilder.

johan-v-r avatar johan-v-r commented on August 14, 2024

Hi @JelleHissink - I left a comment on that PR asking if that works for Linux as well?

I think we might need to add the LibSassHost.Native.win-x86 dependency.

Apologies I wasn't aware this was still an issue, will reopen.

from libsassbuilder.

johan-v-r avatar johan-v-r commented on August 14, 2024

New version 2.0.3 includes #41 to resolve the x86 issue, thanks @JelleHissink 👍

from libsassbuilder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.