Hey there,
I have a program that uses a sql express local DB. I want to be able to update that DB using the program to run the necessary scripts. A text files has been added as an embedded resource to the project (VS2010), and the file contains text. It fails to open the file though. I get an "ArgumentNullException was unhandled" "Value cannot be null. Parametername: stream" here's the code...
Assembly assem;
StreamReader textReader;
assem = Assembly.GetExecutingAssembly();
//fails at this line below.
textReader = new StreamReader(assem.GetManifestResourceStream("projectName.sqlUpdates.txt"));
tReader.Peek() != -1)
script = textReader.ReadToEnd();