Unity errors related to "CompilerResults"

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
Alth
Posts: 28
Joined: Wed Feb 20, 2019 9:59 pm
Location: New Zealand

Unity errors related to "CompilerResults"

Post by Alth »

I get a long list of errors like this:

Assets\Game\Addons\CSharpCompiler\CustomReportPrinter.cs(18,36): error CS1069: The type name 'CompilerResults' could not be found in the namespace 'System.CodeDom.Compiler'. This type has been forwarded to assembly 'System.CodeDom, Version=4.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' Consider adding a reference to that assembly.

Anyone know what is wrong?

EDIT:
Seemed to have fixed enough to get it running. iTween was giving me issues so I just commented out the parts that were throwing errors and I had to just download mcs.dll from Github and put it in the folder it was looking for (had to create the folder structure).
Last edited by Alth on Sat Feb 23, 2019 9:36 am, edited 1 time in total.

User avatar
Interkarma
Posts: 7242
Joined: Sun Mar 22, 2015 1:51 am

Re: Unity errors related to "CompilerResults"

Post by Interkarma »

Welcome to the forums. :)

This is most likely .NET compatibility. After loading project into Unity, go to Edit > Project Settings > Player, expand Other Settings, then set "API compatibility level to ".NET 2.0" (not subset). This is required for the integrated C# compiler.

And if possible, it's best to open project with Unity 2018.2.11f1. This is the current version used by devs and modders. Building the game with a later Unity version is likely to break any modded materials built against the 2018.2.11f1 version.

Alth
Posts: 28
Joined: Wed Feb 20, 2019 9:59 pm
Location: New Zealand

Re: Unity errors related to "CompilerResults"

Post by Alth »

Thanks for the welcome,

I tried what you suggested and now I get these.

Unity:
error CS0006: Metadata file `Assets/Vendor/CSharpCompiler/Plugins/mcs.dll' could not be found

VS:
CSC : error CS0006: Metadata file 'C:\Daggerfall\bin\x86\Debug\Assembly-CSharp.dll' could not be found

User avatar
Interkarma
Posts: 7242
Joined: Sun Mar 22, 2015 1:51 am

Re: Unity errors related to "CompilerResults"

Post by Interkarma »

Please try using Unity 2018.2.11f1 and create a fresh clone of the project. I have a video showing how to clone from github here. When opening project in Unity, be sure you're selecting the parent folder (which contains the Assets and ProjectSettings folders). Besides setting the .NET compatibility, the project can be opened directly from Unity 2018.2.11f1 without any further dependencies.

Alth wrote: Sat Feb 23, 2019 8:02 am VS:
CSC : error CS0006: Metadata file 'C:\Daggerfall\bin\x86\Debug\Assembly-CSharp.dll' could not be found
The above path isn't part of the "daggerfall-unity" project hierarchy, I'm not sure why you're seeing this. You shouldn't need to do much more than clone the repo and open in Unity, then set the .NET 2.0 API compatibility.

Alth
Posts: 28
Joined: Wed Feb 20, 2019 9:59 pm
Location: New Zealand

Re: Unity errors related to "CompilerResults"

Post by Alth »

Thanks, though I managed to get things working at least which is good enough for me.

Post Reply