Closed RitaAguiar closed 11 months ago
@RitaAguiar Visual Studio developer community is the best place for .NET Framework questions.
https://developercommunity.visualstudio.com/home
Once you have filed feedback there, please post it back here to connect them. I can help route to the appropriate team.
once a VS developer community issue has been filed, please let us know
Same problem an I found a workaround for that, tested on Revit 2024 Api. Install the version 12.17.0 of Azure.Storage.Blobs from Nuget and don't update anything !
@RitaAguiar there's a discussion about this in the azure-sdk-for-net repo in this issue: https://github.com/Azure/azure-sdk-for-net/issues/39798
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.