When using System.IO.Compression.ZipFile.Open on a rar file I got theInvalidDataException.
System.IO.InvalidDataException: End of Central Directory record could not be found.
I started recreating the rar files, but no luck. Instead of digging further I got on nuget.org and found another library for extracting rar files. I settled on sharpcompress, installed it, got code from the wiki and a few minutes later everything was running smooth. Only thing I had to change was to write the entry to a specific file instead of a folder.
Some Links:
sharpcompress on github
sharpcompress on nuget.org
wiki with code