System.IO.Abstractions
System.IO.Abstractions copied to clipboard
Azure Functions in .NET 6. Failed to load System.IO.Abstractions.
Cannot run with System.IO.Abstractions latest version
To Reproduce
Create an Azure Functions project for .NET 6. Run it. Note the runtime error:
[2021-11-19T02:33:26.035Z] Could not load file or assembly 'System.IO.Abstractions, Version=13.0.0.0, Culture=neutral, PublicKeyToken=96bf224d23c43e59'. The system cannot find the file specified.
Expected behavior It properly loads
Would be great if there was a way to get System.IO.Abstractions to load regardless of what version is expected. How?
I got past it! THIS fixed it for me. Add this to a <PropertyGroup> in your .csproj.
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
I got past it! THIS fixed it for me. Add this to a
<PropertyGroup>in your .csproj.
<_FunctionsSkipCleanOutput>true</_FunctionsSkipCleanOutput>
OK, this is really weird. Any idea why this is necessary?
Not sure. Maybe @davidfowl knows?
I really have questions here 😅...
- How did you people figure out that that Property value would fix the issue?
- why would any build step involving the function host in fact remove assemblies that are referenced by the functions project?
- Why is this issue closed?
Apart from that, yes, after adding that property, my .NET6 / Function Tools v4 project starts again with System.IO.Abstractions usage
@fabiocav I see you have last touched the clean-up list https://github.com/Azure/azure-functions-host/blob/dev/tools/ExtensionsMetadataGenerator/test/ExtensionsMetadataGeneratorTests/ExistingRuntimeAssemblies.txt.
Should the third-party-library System.IO.Abstractions.dll (from this repository) really be there?