Search Issue Tracker

Won't Fix

Votes

0

Found in

2017.4.0f1

2018.4.0f1

2019.2.0a1

2019.3.0a1

2020.1.0a1

Issue ID

1183654

Regression

No

System.Configuration.dll fails to load when running a built project

Scripting

-

How to reproduce:
1. Open the SampleScene in the attached "case_1183654-ioc" project
2. Enter play mode
3. Notice the working GUI Label
4. Build a project with "Development Build" setting enabled
5. Run the built project

Expected results: GUI Label is shown in both cases
Actual results: GUI Label is missing in a build, NullReferenceExceptions are spammed in the build log

Reproducible with: 2017.4.32f1, 2018.4.8f1, 2019.2.6f1, 2019.3.0b3, 2020.1.0a4

Additional notes:
1. Full error message:
UnloadTime: 1.562800 ms
FileNotFoundException: Could not load file or assembly 'System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies.
2. It is possible that error "Loading assembly failed: "Assets/Plugins/System.Configuration.dll" will be thrown in the Editor Console Window, however, this error can be cleared, and it does not cause NullReferenceExceptions during play mode

  1. Resolution Note:

    .NET System .dlls should not be added to the Unity project. Both in the editor and player the following error is emitted, indicating that this is not supported.

    Failed loading assembly 'Managed/System.Configuration.dll'
    Loading assembly failed: "Managed/System.Configuration.dll"

Comments (1)

  1. fmarianacci

    Sep 13, 2019 13:52

    Thank for answer.

    Is it possible to bypass this limitation with something like [DllImport("my .NET System.dll")] ?

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.