Project is not selected for building in solution configuration

3 Comments »

When building a Visual Studio project, you may encounter the following error:

The project "MyProject" is not selected for building in solution configuration "Debug|Any CPU".

This error occurs because the project has not been configured to build in your Visual Studio solution.  The solution is simple:

Read the rest of this entry »

Error CS0016: Could not write to output file

No Comments »

If you attempt to run an ASP.NET application hosted on IIS running on Windows Home Basic or Premium, you may receive the following error:

error CS0016: Could not write to output file ‘c:WindowsMicrosoft.NETFramework…

More information >

Solution file error MSB5014

1 Comment »

The following error may occur when building a Visual Studio solution with the MSBuild program:

Solution file error MSB5014: File format version is not recognized.  MSBuild can only read solution files between versions 7.0 and 9.0, inclusive.

This error may occur when compiling a solution for Visual 2008 or 2010 with the MSBuild program that came with Visual Studio 2005.  The problem is that VS 2005 does not understand the newer solution file formats.  To eliminate this error, use the newest version of MSBuild available (check your system):

C:WindowsMicrosoft.NETFrameworkv3.5msbuild.exe
C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe

ComboBox Exception: “Too many items in the combo box”

1 Comment »

The .NET ComboBox may throw a cryptic OutOfMemoryException with the following message:

Too many items in the combo box.

This poorly-worded exception results when you Add an object to the ComboBox whose ToString() method returns a null or empty string. 

To fix this error, make sure that for every object that you add to the ComboBox, the ToString() method returns a non-empty string.

Exceptions are for Exceptions

4 Comments »

Most programmers know that throwing exceptions takes a relatively long time to execute versus normal processing.  Some say throwing exceptions is as much as two orders of magnitude slower than passing arguments (that’s 100 times slower for non-geeks).  However, another article claims there’s almost no impact to throwing exceptions, unless you are running your software in a debugger.

Story at DevTopics >>