Assembly-csharp.dll Error in Unity: 4 Ways to Fix it

Importing the scripts can sometimes help

Reading time icon 2 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

assembly-csharp.dll

Many users reported issues with assembly-csharp.dll and most often these errors appear in Unity. However, there are ways to solve these problems, and today we’re going to show you how to do it.

How can I fix assembly-csharp.dll errors?

Before we start, try updating Unity Version Control. You can also try restarting Unity and check if that helps. Scan your PC for malware, as many reported that hidden miners can cause this problem.

1. Reimport the scripts

  1. In Unity, right-click on the script folder.
  2. Next, choose Reimport.
    reimport unity
  3. Wait for the process to finish.

2. Add project file to the list of exclusions

  1. Open Kaspersky and click the Settings icon.
  2. Go to Security settings and select Threats and Exclusions.
  3. Click on Manage exclusions.
    manage-exclussions-kaspersky
  4. Now select the Unity project file.
  5. Save changes.

While Kaspersky has been reported as the cause of this problem, other antiviruses might cause it as well.

3. Disable your antivirus

  1. Right-click the Webroot icon in the system tray.
  2. Choose Shut down Protection.
    shut down secure anywhere
  3. Wait for it to shut down.

Keep in mind that disabling your antivirus isn’t safe, and it shouldn’t be used as a permanent solution.

4. Remove the affected file

  1. Remove the following file: Library/ScriptAssemblies/com.unity.multiplayer-hlapi.Runtime.dll
  2. Now try to build the project again.
  3. The build process should be able to complete.

These are several methods you can use to fix assembly-csharp.dll issues in your code editor. Unfortunately, this isn’t the only error with Unity, and we covered unityplayer.dll was not found error not that long ago.

We also have a great guide on what to do if api-ms-win-crt-string-|1-1-0.dll is missing, so don’t hesitate to check it out.

More about the topics: DLL errors, Windows 11 Fix

User forum

0 messages