1

For a school project, I am writing a program that uses very large (hundreds of GB) text files. I've used bash split to split them into manageable (2GB) chunks then compressed them through bash with Bzip2. I need to extract them one at a time to disk then open them as an array for parsing. The issue I'm running into is using SharpZipLib. I'm not using an IDE per se, and am running a single source file solution which is compiled through Mono's mcs and/or .NET's csc.exe. I installed Nuget's command line variant and bash variant and then nuget install SharpZipLib which said it installed successfully on both systems. I tried a using ICSharpCode.SharpZipLib.Core; but that threw an error saying that ICSharpCode doesn't exist. The only documentation I can find involves Visual Studio or Xamarin Projects, neither of which I am using. How can I use the SharpZipLib in this file? Maybe more accurately, how can I "inform the compiler" of the library? Alternatively, is there a better solution for my use case?

  • 1
    Can you provide your project folder hierarchy? Typically Nuget installs to a project. Somehow you are missing the reference to SharpZib. According to this, Command line Nuget doesn't inform the compiler or project of the new dependency. You will need to do this yourself. https://docs.nuget.org/ndocs/tools/nuget.exe-cli-reference#install – Joshua Leonard Jan 03 '17 at 19:01
  • @JoshuaLeonard I have a single file approach for this project. In the folder I have processing.cs and processing.exe, as well as the .bz2 files. – Hunter Robertson Jan 03 '17 at 21:53
  • 1
    I think this may help you add the references. Does this work for you? http://stackoverflow.com/questions/10559125/how-to-use-references-when-compiling-c-sharp-code-via-command-line – Joshua Leonard Jan 04 '17 at 13:56

1 Answers1

1

Ok. For Mono (mcs) the way to have it work is as follows: mcs file.cs -r:ICSharpCode.SharpZipLib.dll after moving the correct .dll into the project folder. For .NET (csc.exe), it seems to be the same steps but csc.exe filename.cs /t:ICSharpCode.SharpZipLib.dll