.NET Framework 4.8 Class Library compatibility issue with Azure.Storage.Blob package #93177
Labels
needs-area-label
An area label is needed to ensure this gets routed to the appropriate area owners
question
Answer questions and provide assistance, not an issue with source code or documentation.
tracking-external-issue
The issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly
Description
I have built a .NET Framework 4.8 Class Library project to run on top of Autodesk Revit (building information modeling tool).
I added only 3 packages:
I want to be able to list files from a storage account container. However, there seems to be some incompatibilities between .NET Framework 4.8 Class Library and the Azure.Storage.Blob package.
Reproduction Steps
Pls refer to the test-azure-revitapi repo where I made a minimal .NET Framework 4.8 Class Library project. You need Autodesk Revit 2023 to run this plugin.
Expected behavior
The expected behavior is to be able to initialize an instance of BlobServiceClient class (Azure.Storage.Blob).
Actual behavior
In the minimal project, this is the error obtained:
The project that I'm working on and that I cannot share here has the same 3 packages plus many others. The error I get is:
Regression?
I have not found a previous release where this works. However, I built a minimal project with .NET Framework 4.8 Console App with the same packages that works as expected.
Known Workarounds
No workarounds I have found.
However, I built a minimal project with both a .NET Framework 4.8 Class Library and a .NET Framework 4.8 Console App.
The .NET Framework 4.8 Class Library project results in the problem mentioned above.
The .NET Framework 4.8 Console App project with the same packages works as expected.
Upgrading the project to .NET 5 or .NET 6 is not really an option given that the RevitAPI might not behave as expected.
Configuration
.NET Framework 4.8 Class Library
Windows 11
Any CPU
Other information
I believe there must be some package using the System.Diagnostics.DiagnosticSource, it could potentially be the Revit API packages, however, I built a Console App that includes those packages despite not being in use, and it behaves as expected, this is, I'm able to list the files in the container. Azure Storage Blob package seems to use the System.Diagnostics.DiagnosticSource version 7.0.2.0. However, the error I'm getting on the main project I'm working on is that is it looking for the System.Diagnostics.DiagnosticSource version 4.0.1.0.
The text was updated successfully, but these errors were encountered: