Top ".net" questions

Do NOT use for questions about .NET Core - use [.net-core] instead.

How do I force my .NET application to run as administrator?

Once my program is installed on a client machine, how do I force my program to run as an administrator …

c# .net windows-7 administrator elevated-privileges
How to insert newline in string literal?

In .NET I can provide both \r or \n string literals, but there is a way to insert something like "…

c# .net line-breaks
How can I get the assembly file version

In AssemblyInfo there are two assembly versions: AssemblyVersion: Specify the version of the assembly being attributed. AssemblyFileVersion: Instructs a compiler …

c# .net assemblies version
Reading Excel files from C#

Is there a free or open source library to read Excel files (.xls) directly from a C# program? It does …

c# .net excel ms-office
MetadataException: Unable to load the specified metadata resource

All of a sudden I keep getting a MetadataException on instantiating my generated ObjectContext class. The connection string in App.…

c# .net entity-framework ado.net
Could not find a part of the path ... bin\roslyn\csc.exe

I am trying to run Asp.net MVC project retrieved from TFS source control. I have added all assembly references …

c# asp.net .net asp.net-mvc roslyn
How do you do a deep copy of an object in .NET?

I want a true deep copy. In Java, this was easy, but how do you do it in C#?

c# .net serialization clone
What's the fastest way to read a text file line-by-line?

I want to read a text file line by line. I wanted to know if I'm doing it as efficiently …

c# .net performance file-io text-files
Sending email through Gmail SMTP server with C#

For some reason neither the accepted answer nor any others work for me for "Sending email in .NET through Gmail". …

c# .net email smtp gmail
Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

I created a windows application developed in .NET 3.5 in a 32 bit Windows 2008 server. When deployed the application in a 64 bit …

c# .net oledb 32bit-64bit jet