BAD IL Format when referencing a project that uses Microsoft.Azure.Cosmos nuget.
See original GitHub issueDescribe the issue
BAD IL Format when referencing a project that uses CosmosDb nuget.
To Reproduce Steps to reproduce the behavior:
- Created an Out of Process as described in the sample projects. (https://github.com/Azure/azure-functions-openapi-extension/tree/4ab23d7e144370f9f2d7eb9d7e2b2daea1878a2d/samples/Microsoft.Azure.Functions.Worker.Extensions.OpenApi.FunctionApp.OutOfProc)
- Reference another project that references CosmosDB library (Microsoft.Azure.Cosmos v3.25.0)
- Run the project
- See error:
Bad IL format. The format of the file '.../bin/Debug/net6.0/Microsoft.Azure.Cosmos.ServiceInterop.dll' is invalid.
Expected behavior Swagger UI run without errors.
Screenshots
Environment (please complete the following information, if applicable):
- OS: MacOs
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
c# - Bad IL format - Strange .NET error
NET Framework. Make sure that the file image is a valid managed assembly or module.
Read more >Troubleshooting NuGet Package Restore in Visual Studio
This error occurs when you attempt to build a project that contains references to one or more NuGet packages, but those packages are...
Read more >BadImageFormatException (Bad IL format) after detatching ...
Create a C# ASP.NET Core 2.1 Web (Razor) application. 2. Publish it to an Azure App Service. 3. Using Cloud Explorer, attach the...
Read more >Azure Cosmos DB Change Feed
In this lab you will use the Change Feed Processor Library and Azure Functions to implement three use cases for the Azure Cosmos...
Read more >Apps and Services With . NET 7
Using an emulator on Windows to create Azure Cosmos DB resources • 120 ... In the CodeAnalyzing project, add a package reference for...
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
This has been released to v1.3.0. Thanks for waiting!
Running into similar issue on Windows and when deployed up into azure linux consumption plan.
Issue shows up in version 1.2.0.
1.0.0 and 1.1.0 both do not have the issue.
Error in my case is:
Bad IL format. The format of the file '...\bin\Debug\net6.0\Cosmos.CRTCompat.dll' is invalid.