please fix
please fix
"referenced assemblies" only searches for dlls beside the application, please search GAC also before giving error
please fix
Searching of dlls required for run of .Net Applications is out of our control.
.Net Framework searches always in the GAC and only after that scans folder with the Application.
P.S. Sometimes GAC contains required dlls for application with correct name but version of dlls is different from version which was used in Visual Studio. In such cases no dlls will be found and you'll receive an error about missing dlls.
Thank you.
.Net Framework searches always in the GAC and only after that scans folder with the Application.
P.S. Sometimes GAC contains required dlls for application with correct name but version of dlls is different from version which was used in Visual Studio. In such cases no dlls will be found and you'll receive an error about missing dlls.
Thank you.
please fix
thank you Edward,
but i beg to differ, attached if the reflector code from stimulsoft.base.dll , as you can see you are using Assembly.Load and not Assembly.LoadWithPartialName which checks the GAC.
public static Assembly GetAssembly(string assemblyName)
{
Assembly assembly2;
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(assemblyName);
if ((fileNameWithoutExtension != null) && (fileNameWithoutExtension.Length > 0))
{
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
if (fileNameWithoutExtension == name.Name)
{
return assembly;
}
}
}
try
{
assembly2 = Assembly.Load(fileNameWithoutExtension);
}
catch (FileNotFoundException)
{
}
return assembly2;
try
{
if (!fileNameWithoutExtension.ToLower(CultureInfo.InvariantCulture).StartsWith("stimulsoft"))
{
try
{
if (!File.Exists(assemblyName))
{
return null;
}
assembly2 = Assembly.LoadFrom(assemblyName);
}
catch (FileNotFoundException)
{
}
return assembly2;
}
string assemblyQualifiedName = typeof(StiAssemblyFinder).AssemblyQualifiedName;
int index = assemblyQualifiedName.IndexOf(",");
assembly2 = Assembly.Load(assemblyQualifiedName.Substring(index + 1).Replace("Stimulsoft.Base", fileNameWithoutExtension));
}
catch (FileNotFoundException)
{
}
return assembly2;
}
but i beg to differ, attached if the reflector code from stimulsoft.base.dll , as you can see you are using Assembly.Load and not Assembly.LoadWithPartialName which checks the GAC.
public static Assembly GetAssembly(string assemblyName)
{
Assembly assembly2;
string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(assemblyName);
if ((fileNameWithoutExtension != null) && (fileNameWithoutExtension.Length > 0))
{
foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
{
AssemblyName name = assembly.GetName();
if (fileNameWithoutExtension == name.Name)
{
return assembly;
}
}
}
try
{
assembly2 = Assembly.Load(fileNameWithoutExtension);
}
catch (FileNotFoundException)
{
}
return assembly2;
try
{
if (!fileNameWithoutExtension.ToLower(CultureInfo.InvariantCulture).StartsWith("stimulsoft"))
{
try
{
if (!File.Exists(assemblyName))
{
return null;
}
assembly2 = Assembly.LoadFrom(assemblyName);
}
catch (FileNotFoundException)
{
}
return assembly2;
}
string assemblyQualifiedName = typeof(StiAssemblyFinder).AssemblyQualifiedName;
int index = assemblyQualifiedName.IndexOf(",");
assembly2 = Assembly.Load(assemblyQualifiedName.Substring(index + 1).Replace("Stimulsoft.Base", fileNameWithoutExtension));
}
catch (FileNotFoundException)
{
}
return assembly2;
}