Skip to content

[MongoDB.Driver] some methods throw exception after native compiler #70400

@Jaafar-abusair

Description

@Jaafar-abusair

Hi,

some methods throw exception after native compiler [MongoDB.Driver] and some of them are working fine
The ones listed below are not working when calling them

using "dotnet publish -c Release -r win-x64", i get this errors on build

Not sure which label i should add to the ticket

ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+d__107<System.__Canon>.MoveNext()' will always throw bec
ause: Invalid IL or CLR metadata
ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+<UpdateManyAsync>d__101<System.__Canon>.MoveNext()' will always throw be cause: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+d__95<System.__Canon>.MoveNext()' will always throw bec
ause: Invalid IL or CLR metadata
ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+<InsertOneAsync>d__74<System.__Canon>.MoveNext()' will always throw beca use: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+d__45<System.__Canon>.MoveNext()' will always throw beca
use: Invalid IL or CLR metadata
ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1+<DeleteManyAsync>d__37<System.__Canon>.MoveNext()' will always throw bec ause: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.UpdateOne(FilterDefinition1<__Canon>,UpdateDefinition1
<__Canon>,UpdateOptions,Func3<IEnumerable1<WriteModel1<__Canon>>,BulkWriteOptions,BulkWriteResult1<__Canon>>)' will always throw becau
se: Invalid IL or CLR metadata
ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.UpdateMany(FilterDefinition1<__Canon>,UpdateDefinition 1<__Canon>,UpdateOptions,Func3<IEnumerable1<WriteModel1<__Canon>>,BulkWriteOptions,BulkWriteResult1<__Canon>>)' will always throw beca use: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.ReplaceOne(FilterDefinition1<__Canon>,__Canon,ReplaceOp tions,Func3<IEnumerable1<WriteModel1<__Canon>>,BulkWriteOptions,BulkWriteResult1<__Canon>>)' will always throw because: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.InsertOne(__Canon,InsertOneOptions,Action2<IEnumerable
1<WriteModel1<__Canon>>,BulkWriteOptions>)' will always throw because: Invalid IL or CLR metadata ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.DeleteOne(FilterDefinition1<__Canon>,DeleteOptions,Func 3<IEnumerable1<WriteModel1<__Canon>>,BulkWriteOptions,BulkWriteResult>)' will always throw because: Invalid IL or CLR metadata
ILC: Method '[MongoDB.Driver]MongoDB.Driver.MongoCollectionBase1<System.__Canon>.DeleteMany(FilterDefinition1<__Canon>,DeleteOptions,Fun
c3<IEnumerable1<WriteModel1<__Canon>>,BulkWriteOptions,BulkWriteResult>)' will always throw because: Invalid IL or CLR metadata Creating library bin\x64\Release\net6.0\win-x64\native\test-native.lib and object bin\x64\Release\net6.0\win-x64\native\test-native.exp Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-ill ink test-native -> E:\test-native2\test-native\bin\x64\Release\net6.0\win-x64\publish\

Metadata

Metadata

Assignees

Labels

Priority:2Work that is important, but not critical for the releasearea-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions