How do I connect to an .mdf (Microsoft SQL Server Database File) in a simple web project?

A great resource I always keep around is connectionstrings.com. It’s really handy for finding these connection strings when you can’t find an example. Particularly this page applied to your problem Attach a database file on connect to a local SQL Server Express instance Driver={SQL Native Client};Server=.\SQLExpress;AttachDbFilename=c:\asd\qwe\mydbfile.mdf; Database=dbname;Trusted_Connection=Yes;

How should I detect unnecessary #include files in a large C++ project?

While it won’t reveal unneeded include files, Visual studio has a setting /showIncludes (right click on a .cpp file, Properties->C/C++->Advanced) that will output a tree of all included files at compile time. This can help in identifying files that shouldn’t need to be included. You can also take a look at the pimpl idiom to … Read more

Difference between Rebuild and Clean + Build in Visual Studio

Rebuild = Clean + Build (usually) Notable details: For a multi-project solution, “rebuild solution” does a “clean” followed by a “build” for each project (possibly in parallel). Whereas a “clean solution” followed by a “build solution” first cleans all projects (possibly in parallel) and then builds all projects (possibly in parallel). This difference in sequencing … Read more

The name ‘ConfigurationManager’ does not exist in the current context

It’s not only necessary to use the namespace System.Configuration. You have also to add the reference to the assembly System.Configuration.dll , by Right-click on the References / Dependencies Choose Add Reference Find and add System.Configuration. This will work for sure. Also for the NameValueCollection you have to write: using System.Collections.Specialized;