I need help on properly adding assembly to C # code.
I am starting an empty project and trying to run the simple code below. but has links to errors. I know that by default, system.dll is included in the help folder.
so why is he still complaining that "System.Configuration is not referencing"? Are there any manual steps missing? If so, how to do it?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Configuration;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
HttpWebRequestElement ae = new HttpWebRequestElement();
ae.UseUnsafeHeaderParsing = false;
}
}
}
The type "System.Configuration.ConfigurationElement" is defined in an assembly that is not referenced. You must add a reference to the assembly "System.Configuration, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a".
thanks for the help
source
share