Open janvanhelvoort opened 7 years ago
Hey Jan, What version of libsass are you running?
Hi,
We use version 3.3.7
from libsassnet.
Hi,
Can you reproduce the problem?
I'm sure I could reproduce this problem if I tried as this happens with basically all native interop and I have encountered this issue before with the sql server binaries we use. I'm not sure if there's a real solution here though since there's no shadow copying of binaries for native interop. I'd have to do some research before I would know for sure.
Hi,
Do you have a update?
can you please try updating to latest version and see if you can reproduce it ?
yes, with 3.3.7-alpha-2
the files are locked within w3p.exe
The stable version should be the one to use, not the alpha, can you try that ? P.S. we are using alpha 2 in production with foundation 5.x (not the latest) as the scss compiler is not the latest.
yes, every version of the package has the same problem.
We're having the same problem; we had to inject a PowerShell script into our deployment process to get around it.
Is there a working solution for this? We are also using Azure and even on my Desktop it gets locked.
You can do an exit hook in your application and unload the DLL on exit in the Global.asax.cs
[DllImport("kernel32", SetLastError = true)]
private static extern bool FreeLibrary(IntPtr hModule);
public static void UnloadImportedDll(string moduleName)
{
var modules = System.Diagnostics.Process.GetCurrentProcess().Modules;
foreach (System.Diagnostics.ProcessModule mod in modules)
{
if (mod.ModuleName == moduleName)
{
FreeLibrary(mod.BaseAddress);
}
}
}
void Application_End(object sender, EventArgs e)
{
UnloadImportedDll("libsass32.DLL");
}
Hi
After running the following code:
The dll
libsass*
is locked, until we kill w3wp.exeHow can we release the resources?
With kind regards,
Jan van Helvoort