icsharpcode / ILSpy

.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform!
21.45k stars 3.35k forks source link

Error CS0518 - Predefined type 'System.<Boolean|String|Object|..etc>' is not defined or imported #1543

Closed SharkFourSix closed 5 years ago

SharkFourSix commented 5 years ago

Error CS0518 - Predefined type 'System.<Boolean|String|Object|..etc>' is not defined or imported

I get the above message when I hit recompile after editing a class.

I did some research and it seems it would have to do with the misconfiguration of the runtime assembly reference. I tried adding the relevant mscorlib from all the .NET installations I could find on my machine but I couldn't get the errors to disappear.

Is there somewhere that I could edit the compilation command line and arguments?

--

.NET 4.7.2 / Core 3.0 VS installed 2010 (I think this is unrelated) OS: Windows 10 Home, Creators Update 1803

sgkoishi commented 5 years ago

Try remove following folders and restart your IDE

bin
obj
.vs
siegfriedpammer commented 5 years ago

This issue is not directly related to the decompiler engine, if you have a concrete example were ILSpy generates wrong code or a wrong project file, please open a new issue.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.