I am a relative newbie to C# programming (Visual Studio 2010). I am looking at some sample code and getting a compile error that seems fundamental, but the solution has so far eluded me.
In the main method, this is the first line of code:
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
Then, there is a private method that starts like this:
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
When I attempt to compile the code, the only error that occurs, presumably because it is the first one encountered and is fatal, is this:
"The type or namespace name 'Assembly' could not be found (are you missing a using directive or an assembly reference?)"
The using statements are:
I believe those are the default references added when I started a new project, into which I pasted the sample code.
I think the issue with the 'not found' Assembly reference must be some basic error with my Visual Studio configuration or perhaps I need some additional using statements. I have searched quite a bit for some kind of clue or answer, but have not been able to figure it out. Does anyone have an idea of what might be causing this issue?