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
XINSTALL BY CLICKING THE DOWNLOAD FILE
A message from our partner

For fixing DLL errors, we recommend Fortect:

Fortect will search for an intitial version of your missing, corrupted or damaged DLL files that cause problems to your Windows OS and will replace it. Here is how to find them in 3 easy steps:

  • Download Fortect and install it on your PC
  • Launch the tool and Start scanning to find DLL files that could be causing PC problems
  • Right-click on Start Repair to replace all broken DLLs or fix them one by one from the console
Download Now Fortect has been downloaded by 0 readers this month, rated 4.6 on TrustPilot

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