Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2018.4.18f1
2019.4
2020.3
Issue ID
1328000
Regression
No
WebGL build renames referenced DLL file to .exe and then cannot find it with the old .dll name
Reproduction steps:
1. Open the user's attached project "Edgar-Repro.zip"
2. Build the project for the WebGL platform
Expected result: The project is successfully built
Actual result: The project is not built and an error is displayed
Reproducible with: 2018.4.36f1, 2019.4.26f1, 2020.3.10f1, 2021.1.7f1, 2021.2.0a18
Notes:
-The error messages are different with newer Unity versions
-The error says that Unity cannot find the EdgarSingleFile.dll in the StagingArea folder and it should be like that, however, there's a file called EdgarSingleFile.exe. It might be that Unity evaluated that the ILMerged EdgarSingleFile.dll is actually an EXE file and copied the file with a wrong extension to the StagingArea.
-There are no issues when building for PC
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (2020.3.X):
This behavior is by design: IL2CPP writes a file with a main() function because the "EdgarSingleFile.dll" is actually marked as an executable in its metadata.
Since this DLL was created with ILMerge, it was probably created with the wrong "TargetKind". In order to work with IL2CPP correctly, the DLL should be created as a ILMerge.Kind.Dll with the command line option for ILMerge: "/target:library"
https://github.com/dotnet/ILMerge/blob/master/ilmerge-manual.md#223-targetkind