I have a class library dll
with an file embedded as a resource that is referenced in Resources.resx
.
internal class Resources {
internal static byte[] LicenseFile {
get {
object obj = ResourceManager.GetObject("LicenseFile", resourceCulture);
return ((byte[])(obj));
}
}
}
This library is referenced by multiple applications such as a windows service.
This works without problems on local windows 7 machine or older windows server 2008.
But the service does not starts in windows server 2012 since it does not finds the file.
System.IO.FileNotFoundException
is thrown as the system event log shows.
Update
I printed out stacktrace and it seems it cannot find the required dll. Its not the resource file at all.
Could not load file or assembly 'LeadTools.dll' or one of its dependencies. Module not found.
Dateiname: 'Leadtools.dll'
at MyClassLibrary.Utils.InitLeadTools()
at MyService.Logic.Program.Main(String[] args)
LEADTOOLS binaries for .NET 4.0 require redistributing Microsoft Visual C++ 2010 runtime files.