How do I wrap a selection with an HTML tag in Visual Studio?

Visual Studio 2015 comes with a new shortcut, Shift+Alt+W, that wraps the current selection with a div. This shortcut leaves the text “div” selected, making it seamlessly changeable to any desired tag. This coupled with the automatic end tag replacement makes for a quick solution. UPDATE This shortcut is available in Visual Studio 2017 as … Read more

Should a .sln be committed to source control?

I think it’s clear from the other answers that solution files are useful and should be committed, even if they’re not used for official builds. They’re handy to have for anyone using Visual Studio features like Go To Definition/Declaration. By default, they don’t contain absolute paths or any other machine-specific artifacts. (Unfortunately, some add-in tools … Read more

Visual Studio 2015 Update 1 spamming localhost

Another option for preventing fiddler from chewing up your CPU is write a rule in fiddler to ignore those requests. Goto Rules > Customize Rules… find the function OnBeforeRequest and add if(oSession.oRequest.headers[“host”]==”localhost:49155″){ oSession[“ui-hide”] = “true”; } so mine looks like this: static function OnBeforeRequest(oSession: Session) { if(oSession.oRequest.headers[“host”]==”localhost:49155″){ oSession[“ui-hide”] = “true”; } } as @matrixugly pointed … Read more

Visual Studio immediate window command for Clear All

To clear the immediate window, you can use >cls, which is a predefined command alias to >Edit.ClearAll. The MSDN article lists all predefined aliases and you can define your own, too. (For VS 2010 and earlier, custom aliases are described in a separate article, though.) Scanning through, there’s a whole slew of them, some of … Read more

How to set standard encoding in Visual Studio

Do you want the files to save as UTF-8 because you are using special characters that would be lost in ASCII encoding? If that’s the case, then there is a VS2008 global setting in Tools > Options > Environment > Documents, named Save documents as Unicode when data cannot be saved in codepage. When this … Read more

How to make Visual Studio copy a DLL file to the output directory?

Use a post-build action in your project, and add the commands to copy the offending DLL. The post-build action are written as a batch script. The output directory can be referenced as $(OutDir). The project directory is available as $(ProjDir). Try to use relative pathes where applicable, so that you can copy or move your … Read more

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