Zoom the View in Visual Studio

No Comments »

I was using Visual Studio on my laptop when suddenly the font in the code editor got so small I could barely read it.  I figured I must have engaged some obscure key sequence, so I did a little research and discovered there are many ways to change the zoom level in Visual Studio:

Keyboard Shortcuts

  • To make the font larger, press CTRL+SHIFT+PERIOD
  • To make the font smaller, press CTRL+SHIFT+COMMA

Keyboard+Mouse Shortcuts

  • To make the font larger, press & hold the CTRL key while scrolling the mouse wheel up one click
  • To make the font smaller, press & hold the CTRL key while scrolling the mouse wheel down one click

Note this also works with the trackpad on most laptops.  Sliding your finger up or down along the right edge of the trackpad is the same as scrolling the mouse wheel.  By the way, I had the CTRL key pressed while I slid my finger down along the right edge of the trackpad, and this is how I accidentally made the font really small.  Also note that each click increases or decreases the font size by 10%.

Read the rest of this entry »

Microsoft.CSharp.targets was not found

1 Comment »

If you receive the following Visual Studio compiler error:

Error MSB4019: The imported project "C:Microsoft.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Read the rest of this entry »

Visual Studio 2010 Service Pack 1

No Comments »

Microsoft Visual Studio. Copyright © Microsoft Corp.

Microsoft has released Service Pack 1 for its Visual Studio 2010 flagship integrated development environment (IDE).  Visual Studio SP1 provides many new features, performance improvements, and bug fixes including:

  • Stand-alone Help Viewer 1.1
  • Silverlight 4 support
  • Basic Unit Testing support for .NET 3.5
  • .NET Framework 4 improvements
  • Performance Wizard for Silverlight
  • Visual Basic Runtime embedding
  • IntelliTrace for 64-bit and SharePoint
  • Fix for partial or mixed Visual Studio installations
  • IIS 7.5 Express support
  • SQL Server CE 4 support
  • Razor support for ASP.NET Web Pages and MVC 3
  • Web Platform Installer integration
  • HTML5 and CSS3 preliminary support
  • WCF RIA Services localized and supported
  • XAML Editor/Designer improvements
  • XAML Style IntelliSense
  • C++ MFC-based GPU-accelerated graphics and animations
  • New AMD and Intel instruction set support

Download Visual Studio 2010 SP1
Full Description of VS 2010 SP1
Tips on Installing VS 2010 SP1

Visual Studio Productivity Power Tools Update

No Comments »

Visual Studio Productivity Power Tools.  Copyright © Microsoft Corp.

Microsoft has updated the free Productivity Power Tools for Visual Studio 2010.  These are add-ins that provide very useful additional functionality for Visual Studio.  New in this release:

  • No More Extension Resets – This version of the Productivity Power Tools will be the last which resets the extensions.
  • Find – Quick find & incremental search now pops up at top right-hand corner of the editor.
  • Enhanced Scrollbar – Icons overlay the scrollbar to show edits, breakpoints, bookmarks, errors, warnings, etc.
  • Middle-Click Scrolling – Use your scroll wheel to quickly scroll through your document.
  • Organize Imports for Visual Basic – Sort the imports logically and remove the ones that aren’t being used.

Productivity Power Tools for Visual Studio 2010

See more .NET News like this!

Project is not selected for building in solution configuration


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 »

Visual Studio 2010 Service Pack 1 Beta

No Comments »

The beta version of Visual Studio 2010 Service Pack 1 (SP1) is now available for download.  SP1 Beta includes:

  • Many bug fixes
  • Performance improvements
  • Better platform support
  • Unit Testing on .NET 3.5
  • VB Compiler runtime switch
  • Other new features

Download VS2010 SP1 Beta
What’s New in VS2010 SP1 Beta

Step into: Stepping over method without symbols


When debugging a project line-by-line in Visual Studio, you may receive this error:

Step into: Stepping over method without symbols ‘namespace’

This error occurs when you attempt to debug a DLL or EXE that is lacking a symbols (.pdb) file. 

Check the project’s binDebug folder to ensure the DLL/EXE in question has a corresponding pdb file.  If not, be sure to build the DLL/EXE with its project configuration set to “Debug” so that it will generate a pdb file. 

If the problem occurs with a third-party library, you may be out of luck because most third-party libraries do not include a pdb file, and therefore you cannot debug into them.

A StackOverflow article says this error may also occur if you attempt to debug a yield expression in a method that returns an IEnumerable, though I have not confirmed this.

Visual Studio Startup Project Not Saved in Solution File

No Comments »

If you have multiple Projects in a Visual Studio Solution, you can specify the “Startup Project,” which is the project that runs when you “Start Debugging” or “Start Without Debugging”.  The Startup Project appears bold in the Visual Studio Solution Explorer.  Step-by-step instructions to set the Startup Project can be found here.

If you use a source repository, perform automated builds, or do any Visual Studio solution file hacking, you may be disappointed to discover that the Startup Project is not saved in the Solution file (.sln), but rather in the Solution User Options file (.suo). 

The Solution User Options file contains settings — such as breakpoints, open files and views — that are specific to the current user.  Therefore the User Options file is not usually saved in a source repository, so it’s difficult to share the Startup Project across a team.

In addition, while the Solution File is an easy-to-modify XML file, the Solution User Options file is a hard-to-modify binary file, so it’s nearly impossible to programmatically set the Startup Project.

Which means that each developer must manually set the Startup Project for each Visual Studio Solution.

Where to Find SN.exe

1 Comment »

SN.exe is a Strong Name tool that can sign assemblies, manage strong name keys, and generate and verify signatures.  You will typically find it here:

C:Program Files (x86)Microsoft Visual Studio 8SDKv2.0Bin

If you cannot find it there, check “C:Program Files” on 32-bit systems.  Also check the folders corresponding to other versions of Microsoft Visual Studio, such as “Microsoft Visual Studio 9.0” etc.  If you still cannot find it, run a search on your C: drive. 

If SN.exe is not installed on your hard drive, you can download it here:

.NET Framework 2.0 Software Development Kit (SDK)
x86   x64

According to Microsoft, since .NET Framework versions 3.0 and 3.5 are built incrementally on the .NET Framework version 2.0, many of the tools included in the .NET Framework 2.0 SDK are the latest versions available.  But just in case, you can download the newest version of .NET:

.NET Framework 4 redistributable package

Where to Find MSBuild.exe

No Comments »

MSBuild is the build tool for Microsoft Visual Studio.  Developers use MSBuild to build a Visual Studio project or solution file from a command line, batch file, build tool, or automated script. 

A new version of MSBuild.exe is included with each version of the .NET Framework stored in “%WinDir%Microsoft.NETFramework” on your Windows PC.  The MSBuild.exe path depends on the .NET Framework version used to build your project.  Typically you will want to call the most recent version of MSBuild.exe installed on your computer:

.NET v2.0:

.NET v3.5:

.NET v4.0:

MSBuild Command Line Reference

keep looking »