New versions of GenAPI consistently crashes with InvalidCastException
See original GitHub issueGenAPI started breaking for aspnet in what appears to be the result of https://github.com/dotnet/arcade/pull/2517. This is blocking aspnetcore’s ability to consume an update to Arcade.
Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'WhereEnumerableIterator`1[Microsoft.Cci.ITypeDefinitionMember]' to type 'System.Linq.IOrderedEnumerable`1[Microsoft.Cci.ITypeDefinitionMember]'.
at Microsoft.Cci.Traversers.SimpleTypeMemberTraverser.Visit(IEnumerable`1 members) in /_/src/Microsoft.Cci.Extensions/Traversers/SimpleTypeMemberTraverser.cs:line 91
at Microsoft.Cci.Writers.CSharpWriter.Visit(IEnumerable`1 members) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 141
at Microsoft.Cci.Writers.CSharpWriter.Visit(ITypeDefinition parentType, IEnumerable`1 fields) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 205
at Microsoft.Cci.Traversers.SimpleTypeMemberTraverser.Visit(ITypeDefinition type) in /_/src/Microsoft.Cci.Extensions/Traversers/SimpleTypeMemberTraverser.cs:line 74
at Microsoft.Cci.Writers.CSharpWriter.Visit(ITypeDefinition type) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 131
at Microsoft.Cci.Traversers.SimpleTypeMemberTraverser.Visit(IEnumerable`1 types) in /_/src/Microsoft.Cci.Extensions/Traversers/SimpleTypeMemberTraverser.cs:line 62
at Microsoft.Cci.Writers.CSharpWriter.Visit(IEnumerable`1 types) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 110
at Microsoft.Cci.Writers.CSharpWriter.Visit(INamespaceDefinition ns) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 99
at Microsoft.Cci.Traversers.SimpleTypeMemberTraverser.Visit(IEnumerable`1 namespaces) in /_/src/Microsoft.Cci.Extensions/Traversers/SimpleTypeMemberTraverser.cs:line 43
at Microsoft.Cci.Writers.CSharpWriter.WriteAssemblies(IEnumerable`1 assemblies) in /_/src/Microsoft.Cci.Extensions/Writers/CSharp/CSharpWriter.cs:line 73
at Microsoft.DotNet.GenAPI.Program.<>c__DisplayClass0_0.<Main>b__0() in /_/src/Microsoft.DotNet.GenAPI/Program.cs:line 95
at Microsoft.DotNet.GenAPI.Program.Main(String[] args) in /_/src/Microsoft.DotNet.GenAPI/Program.cs:line 52
D:\a\1\s\eng\targets\ReferenceAssembly.targets(67,5): error MSB3073: The command "dotnet --roll-forward-on-no-candidate-fx 2 "D:\a\1\s\.packages\microsoft.dotnet.genapi\1.0.0-beta.19218.1\build\\..\tools\netcoreapp2.1\Microsoft.DotNet.GenAPI.dll" "D:\a\1\s\artifacts\bin\Microsoft.Extensions.Caching.Abstractions\Debug\netstandard2.0\Microsoft.Extensions.Caching.Abstractions.dll" --lib-path "D:\a\1\s\artifacts\bin\Microsoft.Extensions.Primitives\Debug\netstandard2.0;D:\a\1\s\.packages\netstandard.library\2.0.3\build\netstandard2.0\ref;D:\a\1\s\.packages\system.buffers\4.4.0\ref\netstandard2.0;D:\a\1\s\.packages\system.memory\4.5.2\lib\netstandard2.0;D:\a\1\s\.packages\system.numerics.vectors\4.4.0\ref\netstandard2.0;D:\a\1\s\.packages\system.runtime.compilerservices.unsafe\4.6.0-preview5.19217.11\ref\netstandard2.0" --out "D:\a\1\s\src\Caching\Abstractions/ref/Microsoft.Extensions.Caching.Abstractions.netstandard2.0.cs" --header-file "D:\a\1\s\/eng/LicenseHeader.txt"" exited with code -532462766. [D:\a\1\s\src\Caching\Abstractions\src\Microsoft.Extensions.Caching.Abstractions.csproj]
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (18 by maintainers)
Top Results From Across the Web
Call to ManagementObjectSearchert.Get() crashes with ...
The interesting part is that I get an InvalidCastException on the Get() function, without any further info on the inner exception. System.
Read more >New connection crashes VS when generating a new EF ...
I am seeing silent crashes when generating EF model from database as well. VS 2017(15.9.17) .NET Framework version installed 4.8.03752 (Project ...
Read more >Crashes with new Version
The program always crashes when i try to open old cosessions from the Sony version C1 22. I Tryed to deactivate all licenses...
Read more >Crashing in the latest version of HF Express? Read this.
It crashes constantly and when I manage to actually complete a project from saving and reopening each time it crashes, I can't export....
Read more >BSOD crash consistently on new PC build when playing ...
BSOD crash consistently on new PC build when playing games. ... with every version of driver) and windows always updated to latest version....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 to tests. Just having something set up so you can excercise the code goes a long way for making folks more productive. It wouldn’t need to be exhaustive, just a start. Something like run GenAPI against some of the dependencies and then make sure they can be recompiled.
You can validate by updating the version of GenAPI referenced in aspnet/Extensions and run ./eng/scripts/CodeCheck.ps1. Here is the PR that caught this problem https://github.com/aspnet/Extensions/pull/1458 and the steps that failed: https://github.com/aspnet/Extensions/blob/master/azure-pipelines.yml#L26-L34