Category : .net-assembly

I’m trying to find the status of .NET system assemblies regarding the nullable reference types feature of C# 8. Non-annotated code, or code written with earlier language versions will be treated as "null-oblivious", meaning the compiler won’t generate any warning regarding nullability. This is really annoying when it comes to using system assemblies from a ..

Read more

I want to have DLL’s acting like plugins for my project So, i have my main c# program, and it loads all DLL’s found at a plugins folder using Assembly.LoadFile Main Program var DLL = Assembly.LoadFile("test.dll"); foreach (Type type in DLL.GetExportedTypes()) { dynamic C = Activator.CreateInstance(type); C.Initialize(); } so, calling Initialize from test.dll works… but ..

Read more

Why CSharp.dll gets loaded into DefaultDomain and how to avoid this? Console::WriteLine(AppDomain::CurrentDomain->FriendlyName); auto assemblies = AppDomain::CurrentDomain->GetAssemblies(); for (int i = 0; i < assemblies->Length; ++i) Console::WriteLine(assemblies[i]->GetName()); AppDomain^ domain = AppDomain::CreateDomain(ToMngd(L"MyDomain")); ObjectHandle^ handle = domain->CreateInstance(ToMngd(L"CSharpDll"), ToMngd(L"CSharpDll.Class1")); Console::WriteLine(domain->FriendlyName); assemblies = domain->GetAssemblies(); for (int i = 0; i < assemblies->Length; ++i) Console::WriteLine(assemblies[i]->GetName()); AppDomain::Unload(domain); Console::WriteLine(AppDomain::CurrentDomain->FriendlyName); assemblies = AppDomain::CurrentDomain->GetAssemblies(); for ..

Read more