.Net debug or release
A description: -
"See this http://weblogs.asp.net/jkey/archive/2003/11/23/39383.aspx
His method is wrong, of course, but that should put you on the right track.
The tricky part was not being able to unload the assemblies and not being able to read the assemblies without loading them into the App domain in .Net 1.1
I believe this problem has been solved in 2.0 (ReflectionOnlyLoad and ReflectionOnlyLoadFrom)
Another link
This is why I have to re-load the app whenever it reads the Dlls, to release the assemblies."
The code for telling the difference: -
foreach (FileInfo FileInfoEach in DiScripts.GetFiles("*.dll"))
{
OneAssembly = Assembly.LoadFile(FileInfoEach.FullName);
Object[] CustomAttributes = OneAssembly.GetCustomAttributes(false);
bool IsDebuggable = false;
foreach (Object CustomAttributein CustomAttributes)
{
if (CustomAttribute is DebuggableAttribute)
if(((DebuggableAttribute)CustomAttribute).IsJITTrackingEnabled )
{
IsDebuggable = true;
break;
}
}
DtDlls.Rows.Add(new object[] {FileInfoEach.Name, IsDebuggable?"Debug":"Release"});
}
DtDlls.AcceptChanges();
"See this http://weblogs.asp.net/jkey/archive/2003/11/23/39383.aspx
His method is wrong, of course, but that should put you on the right track.
The tricky part was not being able to unload the assemblies and not being able to read the assemblies without loading them into the App domain in .Net 1.1
I believe this problem has been solved in 2.0 (ReflectionOnlyLoad and ReflectionOnlyLoadFrom)
Another link
This is why I have to re-load the app whenever it reads the Dlls, to release the assemblies."
The code for telling the difference: -
foreach (FileInfo FileInfoEach in DiScripts.GetFiles("*.dll"))
{
OneAssembly = Assembly.LoadFile(FileInfoEach.FullName);
Object[] CustomAttributes = OneAssembly.GetCustomAttributes(false);
bool IsDebuggable = false;
foreach (Object CustomAttributein CustomAttributes)
{
if (CustomAttribute is DebuggableAttribute)
if(((DebuggableAttribute)CustomAttribute).IsJITTrackingEnabled )
{
IsDebuggable = true;
break;
}
}
DtDlls.Rows.Add(new object[] {FileInfoEach.Name, IsDebuggable?"Debug":"Release"});
}
DtDlls.AcceptChanges();
Comments
Post a Comment