You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Was editing something in this code, I'm not sure what caused it:
using System;using System.Collections.Generic;using Microsoft.VisualStudio.Setup;using WillowDepends.Lib;usingstatic System.Console;namespace WillowDepends.Console
{classProgram{staticvoidMain(string[]args){varmanifest= Manifest.FromManifestFile(@"\\cpvsbuild\Drops\VS\d15.6\products\27420.00\VisualStudio.vsman");foreach(var workload in manifest.Workloads){if(!Contains461(manifest, workload)){
PrintPackageDependencies(manifest, workload);}}}privatestaticboolContains461(Manifestmanifest,IPackageworkload){varalreadySeenPackages=newList<string>();boolPringPackage(IPackagepackage,intv){if(alreadySeenPackages.Contains(package.Id.ToLower())){returnfalse;}
alreadySeenPackages.Add(package.Id.ToLower());for(inti=0;i<v;i++){if(package.Id =="Microsoft.Net.PackageGroup.4.6.1.Redist")returntrue;}foreach(var dependency in package.Dependencies){if(PringPackage(manifest[dependency.Id],v+2))returntrue;}returnfalse;}
alreadySeenPackages.Add(workload.Id.ToLower());foreach(var dependency in workload.Dependencies){if(PringPackage(manifest[dependency.Id],4))returntrue;}returnfalse;}staticvoidPrintPackageDependencies(Manifestmanifest,IPackageworkload){varalreadySeenPackages=newList<string>();voidPringPackage(IPackagepackage,intv){if(alreadySeenPackages.Contains(package.Id.ToLower())){return;}
alreadySeenPackages.Add(package.Id.ToLower());for(inti=0;i<v;i++){
Write("");}
Write(package.Id);
Write(Environment.NewLine);foreach(var dependency in package.Dependencies){
PringPackage(manifest[dependency.Id],v+2);}}
alreadySeenPackages.Add(workload.Id.ToLower());
WriteLine(workload.Id);//foreach (var dependency in workload.Dependencies)//{// PringPackage(manifest[dependency.Id], 4);//}}}}
Resulted in:
System.InvalidOperationException : Failed to compare two elements in the array. ---> System.InvalidOperationException : Shouldn't reach here
at Roslyn.Utilities.Contract.FailWithReturn[T](String message)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.ParameterVariableSymbol.CompareTo(IMethodSymbol left,IMethodSymbol right)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.ParameterVariableSymbol.CompareTo(ParameterVariableSymbol other)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.ParameterVariableSymbol.CompareTo(VariableSymbol right)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.VariableSymbol.Compare(VariableSymbol left,VariableSymbol right,INamedTypeSymbol cancellationTokenType)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.VariableInfo.<>c__DisplayClass24_0.<SortVariables>b__0(VariableInfo v1,VariableInfo v2)
at System.Array.FunctorComparer`1.Compare(T x,T y)
at System.Collections.Generic.ArraySortHelper`1.InsertionSort(T[] keys,Int32 lo,Int32 hi,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.IntroSort(T[] keys,Int32 lo,Int32 hi,Int32 depthLimit,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(T[] keys,Int32 left,Int32 length,IComparer`1 comparer)
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys,Int32 index,Int32 length,IComparer`1 comparer)
--- End of inner exception stack trace ---
at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys,Int32 index,Int32 length,IComparer`1 comparer)
at System.Array.Sort[T](T[] array,Int32 index,Int32 length,IComparer`1 comparer)
at System.Collections.Generic.List`1.Sort(Comparison`1 comparison)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.VariableInfo.SortVariables(Compilation compilation,List`1 list)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.GetMethodParameters(ICollection`1 variableInfo)
at Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.GetSignatureInformation(DataFlowAnalysis dataFlowAnalysisData,IDictionary`2 variableInfoMap,Boolean isInExpressionOrHasReturnStatement)
at async Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.Analyzer.AnalyzeAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.ExtractMethodAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.ExtractMethod.AbstractExtractMethodService`3.ExtractMethodAsync[TValidator,TExtractor,TResult](<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.GetCodeActionAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
I do not know what the repro is.
The text was updated successfully, but these errors were encountered:
Was editing something in this code, I'm not sure what caused it:
Resulted in:
I do not know what the repro is.
The text was updated successfully, but these errors were encountered: