Crystal icon indicating copy to clipboard operation
Crystal copied to clipboard

CMain: Could not load type 'System.Runtime.Serialization.Formatters.Binary.BinaryFormatter' from assembly 'System.Runtime.Serialization.Formatters'.

Open only-ctrlCV opened this issue 1 year ago • 6 comments

此错误的实例(1)

1。 隐藏调用堆栈

at System.RuntimeTypeHandle.g____PInvoke|78_0(UInt16* name, Int32 throwOnError, Int32 ignoreCase, StackCrawlMarkHandle stackMark, ObjectHandleOnStack assemblyLoadContext, ObjectHandleOnStack type, ObjectHandleOnStack keepalive) at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, StackCrawlMark& stackMark, AssemblyLoadContext assemblyLoadContext) at System.Type.GetType(String typeName, Boolean throwOnError) at System.Resources.ResourceReader.InitializeBinaryFormatter() at System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex) at System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode) at System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode) at System.Resources.RuntimeResourceSet.ReadValue(ResourceReader reader, Int32 dataPos, Boolean isString, ResourceLocator& locator) at System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString) at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream) at SlimDX.Resources.get_BlackIcon() at SlimDX.Windows.RenderForm.Construct(String text) at SlimDX.Windows.RenderForm..ctor() at InvokeStub_RenderForm..ctor(Object, Object, IntPtr*) at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

有关此错误的帮助

未能找到与此错误相关的帮助主题。 检查 Windows 窗体设计时错误列表

有关此错误的论坛帖子

在 MSDN 论坛中搜索与此错误相关的帖子

only-ctrlCV avatar Jan 03 '24 14:01 only-ctrlCV

I had the same problem

cosocc avatar Feb 26 '24 18:02 cosocc

I had the same problem

need vpn download something from cloud,but i gave up

only-ctrlCV avatar Feb 27 '24 06:02 only-ctrlCV

I had the same problem

need vpn download something from cloud,but i gave up

What do you need? I can download it The project requires Version=4.0.1.0, but the existing version in the .NET Framework is 8.0.224.6711.

cosocc avatar Feb 27 '24 11:02 cosocc

Trying to open CMain.s in Designer Mode is the only thing I see that causes this. My best guess is that Visual Studio cant open that in designer because it loads all the MirScenes (i think?) so it doesnt work. AMain.cs does open because all the required resources are referenced as a resource inside the application(?).

Anyway, I think "right-click > view code" on CMain.cs is the solution? (Rather than trying to add that "System.Runtime.Serialization.Formatters.Binary.BinaryFormatter" from NuGet)

meacher0 avatar May 30 '24 15:05 meacher0