I'm trying to use FilterReader in console application and it fails to read docx, pptx files. It fails on this line: var registryKey = Registry.LocalMachine.OpenSubKey(key);
I suppose it may be something with static main method.
Some of the code:
public class Test
{
private readonly Job _job = new Job();
public Test()
{
_job.AddProcess(Process.GetCurrentProcess().Handle);
}
public void Search()
{
using (var reader = new FilterReader("D:\\test2.docx",string.Empty))
{
Console.WriteLine(reader.ReadToEnd());
}
}
And the main:
static void Main(string[] args)
{
new Test().Search();
}
Is it something wrong with my code or it is a bug?
P.S. The windows application is reading everything.
I'm trying to use FilterReader in console application and it fails to read docx, pptx files. It fails on this line: var registryKey = Registry.LocalMachine.OpenSubKey(key); I suppose it may be something with static main method. Some of the code: public class Test { private readonly Job _job = new Job(); public Test() { _job.AddProcess(Process.GetCurrentProcess().Handle); }
And the main: static void Main(string[] args) { new Test().Search(); }
Is it something wrong with my code or it is a bug? P.S. The windows application is reading everything.