System.IO.FileLoadException: 'Could not load file or assembly 'System.Data, Version = 4.0.0.0, Culture = neutral,. The media is write protected

0

I use one C++ application, and it loads a clr c++ dll which loads C# dll. This C# dll belongs to a C# application. The C++ application calls an interface which will finally enter the C# dll (this interface will be called multiple times during PC is running). When PC is running normally, the C++ application won't crash when call the interface, but it may crash while my PC is shutting down.

PC: Win 10 C#: .Net 4.8

The C++ application crash dump shows as below: System.IO.FileLoadException: 'Could not load file or assembly 'System.Data, Version = 4.0.0.0, Culture = neutral, PublicKeyToken=b77a5c61934e089' or one of its dependencies. The media is write protected.(Exception from HRESULT : 0x80070013)'

The first letter of C++ application is lower than that of C# application. I wonder if it has something to do with the order of application exit when shutting down?Any suggestions? Thanks.

c#
c++
asked on Stack Overflow Jan 7, 2021 by Shirley • edited Jan 7, 2021 by Shirley

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0