Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICSharpCode.ILSpy.AssertionFailedException: Should not insert using declaration for namespace that is missing from the superset: System.Globalization #2842

Closed
greenozon opened this issue Nov 19, 2022 · 0 comments · Fixed by #2843
Labels
Bug Decompiler The decompiler engine itself

Comments

@greenozon
Copy link

greenozon commented Nov 19, 2022

Input code

https://www.sendspace.com/file/zzqmm4

File - Save Code

Erroneous output

 ---> ICSharpCode.ILSpy.AssertionFailedException: Should not insert using declaration for namespace that is missing from the superset: System.Globalization
   at ICSharpCode.ILSpy.ILSpyTraceListener.Fail(String message, String detailMessage) in offset 379
   at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage) in offset 48
   at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage) in offset 0
   at System.Diagnostics.Debug.Fail(String message, String detailMessage) in offset 0
   at ICSharpCode.Decompiler.CSharp.Transforms.IntroduceUsingDeclarations.Run(AstNode rootNode, TransformContext context) in IntroduceUsingDeclarations.cs:line 57
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.RunTransforms(AstNode rootNode, DecompileRun decompileRun, ITypeResolveContext decompilationContext) in CSharpDecompiler.cs:line 542
   at ICSharpCode.Decompiler.CSharp.CSharpDecompiler.DecompileTypes(IEnumerable`1 types) in CSharpDecompiler.cs:line 928
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 275
-- continuing with outer exception (ICSharpCode.Decompiler.DecompilerException) --
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in WholeProjectDecompiler.cs:line 299
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 719
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in offset 17
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw(Exception source) in offset 0
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) in offset 719
   at System.Threading.Tasks.TaskReplicator.Replica.Execute() in offset 205

Details

  • Product in use: ILSpy version 8.0.0.7205-preview2
    .NET version 6.0.11-servicing.22523.4+943474ca16db7c65ba6cff4a89c3ebd219dde3e5
@greenozon greenozon added Bug Decompiler The decompiler engine itself labels Nov 19, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant