icsharpcode / ILSpy

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

Please enable type name with namespace as default or an option #579

Closed MRYingLEE closed 7 years ago

MRYingLEE commented 9 years ago

ILSpy is great.

But, the generated source code sometimes is not ready for compiling.

for example ILSpy generates: Configuration OpenWebConfiguration(bool isReadOnly); , which fails to be compiled for VS thinks Configuration is a namespace name of System.Configuration.

If the type with namespace is used, System.Configuration.Configuration OpenWebConfiguration(bool isReadOnly);

everything is ready for compiling.

Please enable type with namespace as default or an option.

Thank you.

DerpMcDerp commented 9 years ago

As a workaround, if you view the WebConfigurationManager class instead of the WebConfigurationManager.OpenWebConfiguration method, it has a collapsed using ... which lists all the namespaces the class depends on.

MRYingLEE commented 9 years ago

Thank you for your prompt reply. I personally can read the code, but the VS doesn't realize it. When I tried to compile and then to trace into the generated code, the compiler stopped me. So please add type with namespace as an decompiler option.

siegfriedpammer commented 7 years ago

This was likely fixed in the new decompiler engine (which just landed on the master branch).