Taritsyn / LibSassHost

.NET wrapper around the LibSass library with the ability to support a virtual file system.
Apache License 2.0
82 stars 11 forks source link

Reduce the depencies #32

Closed kbaexpandit closed 5 years ago

kbaexpandit commented 5 years ago

Hi

This is just a suggest/feature request. My company is using this library for our website. We are using webhotels and azure website. In this situation we can't install redistributable c++ 2017 as we don't have access to the machine.

So what I suggest is that the dependency be compiled into the libsass.dll as this will make the solution more portable. Perhaps as another set of dll's if people don't want the static linking.

The only change that needs to happen is set

  <RuntimeLibrary>MultiThreaded</RuntimeLibrary>

in libsass.vcxproj:

  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <ClCompile>
      <WarningLevel>Level3</WarningLevel>
      <PrecompiledHeader>
      </PrecompiledHeader>
      <Optimization>MaxSpeed</Optimization>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;$(PreprocessorDefinitions);</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    </ClCompile>

Thanks in advance

Taritsyn commented 5 years ago

Hello, Kim!

I did not dare to add this feature for a long time (even conducted a poll), but today I released a new version of the library that contains this functionality.

kbaexpandit commented 5 years ago

Hi

We have executed with our own compiled version since the creation of the post. It has worked great for us. The only problem we have is that the IIS locks the dll because it a c++ dll, so we can't do hot deployment on those dll. But that is also the only problem we have been seeing. WE have changed our deployment so these dll's aren't part of the ho deployment package and then we are able to archive all that we wanted.

Taritsyn commented 5 years ago

The only problem we have is that the IIS locks the dll because it a c++ dll, so we can't do hot deployment on those dll.

This is a known problem and it has been discussed many times (and it is typical not only for the LibSass Host library): “File lock on LibSassHost.Native-64.dll”, “w3wp.exe locks 'libsass*.dll'” and “libsass.dll locked by IIS Worker Process”.