How do I change the line spacing in Visual Studio 2012?

I’ve found a workaround which works pretty well, partly alread described in this comment. You need to download and install TypeLight (free for personal use), and open the Consolas.ttf file inside. To adjust the line spacing, go to Font -> Metrics -> Advanced and change the “Line Gap” to your desire (I changed “Type Line … Read more

Folders or Projects in a Visual Studio Solution? [closed]

By default, always just create new folder within the same project You will get single assembly (without additional ILMerge gymnastic) Easier to obfuscate (because you will have less public types and methods, ideally none at all) Separating your source code into multiple projects makes only sense if you… Have some portions of the source code … Read more

Why does the extract method command in visual studio create static methods?

Why does Visual Studio by default create a private static method when refactoring code and selecting extract method? It does this only if your method doesn’t access any member variables/methods/properties. This is good because it basically operates on the principle of least assumptions: since you don’t access instance-specific data, might as well make the method … Read more

Is there a way to automatically avoiding stepping into certain functions in Visual Studio?

I found this blog entry which has a solution. Although I’d prefer to be able to say “don’t step into anything that isn’t part of this project”, this looks workable. EDIT: After looking at a few blogs and newsgroups, the method is to add an entry for each function that you don’t want to step … Read more

How do I get the ClickOnce Publish version to match the AssemblyInfo.cs File version?

We use Team Foundation Server Team Build and have added a block to the TFSBuild.proj’s AfterCompile target to trigger the ClickOnce publish with our preferred version number: <MSBuild Projects=”$(SolutionRoot)\MyProject\Myproject.csproj” Properties=”PublishDir=$(OutDir)\myProjectPublish\; ApplicationVersion=$(PublishApplicationVersion); Configuration=$(Configuration);Platform=$(Platform)” Targets=”Publish” /> The PublishApplicationVersion variable is generated by a custom MSBuild task to use the TFS Changeset number, but you could use your … Read more

VS Project References Broken On Case Sensitivity of GUID

TL;DR Visual Studio isn’t entirely consistent about how it assigns GUIDs to projects or how it specifies those GUIDs in project references. I was able to resolve the problem by using upper case GUIDs with braces for ProjectGuid elements and lower case with braces for Project elements (in references). Background We have a large solution … Read more

Automating Visual Studio with EnvDTE

As a solution to this issue you can register to an event that notifies when the solution load is done. This is a sample of class that lets you listen to events on solution loading: public class SolutionEventsListener : IVsSolutionEvents, IDisposable { private IVsSolution solution; private uint solutionEventsCookie; public event Action AfterSolutionLoaded; public event Action … Read more

Import Visual Studio syntax highlighting in Notepad++

Close Notepad++ Download Notepad++ Visual Studio Theme Extract the files to C:\Program Files\Notepad++\themes then start Notepad++ (create themes folder if it does not exist) In the menu bar, open Settings→Style Configurator… Click the Select theme dropdown and select the Visual Studio theme. Click Save & Close button. Information about theme can be found on archived … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)