System.AggregateException: One or more errors occurred. (End of Central Directory record could not be found.)
Reinstalling the crank
and crank-agent
packages resolved this error.
Another error that I faced when trying to uninstall the package was it was saying I do not have permission to access the location where the package file was. And the reason being crank-agent
was running in one of the PowerShell terminal windows. After stopping the crank-agent and I could run the uninstalling command.
To uninstall run below commands:
dotnet tool uninstall microsoft.crank.controller -g
dotnet tool uninstall microsoft.crank.agent -g
ZipArchive generated zip file not extracted
Using statement braces matter here.
You have to flush out any buffered data and finish the zip archive, by closing it, which is what writes the central directory record into the zip file, before you read back the bytes written to the MemoryStream.
Related Topics
How to Parse Very Huge Xml Files in C#
Measure a String Without Using a Graphics Object
Writing Memorystream to Response Object
C#: Convert Byte Array into a Float
Hot Unload/Reload of a Dll Used by an Application
Invalidoperationexception - Object Is Currently in Use Elsewhere
Adding Images into Excel Using Epplus
Using Datetime in a SQLparameter for Stored Procedure, Format Error
Return/Consume Dynamic Anonymous Type Across Assembly Boundaries
Badimageformatexception When Loading 32 Bit Dll, Target Is X86
Using Prepared Statement in C# with MySQL
Token Based Authentication in ASP.NET Core (Refreshed)
Best Way to Convert Callback-Based Async Method to Awaitable Task
Add Separator to String at Every N Characters
Visual Studio One Project with Several Dlls as Output