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 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 declare a friend assembly?

You need to sign both assemblies, because effectively both assemblies reference each other. You have to put the public key in the InternalsVisibleTo attribute. For example, in Protocol Buffers I use: [assembly:InternalsVisibleTo(“Google.ProtocolBuffers.Test,PublicKey=”+ “00240000048000009400000006020000002400005253413100040000010001008179f2dd31a648″+ “2a2359dbe33e53701167a888e7c369a9ae3210b64f93861d8a7d286447e58bc167e3d99483beda”+ “72f738140072bb69990bc4f98a21365de2c105e848974a3d210e938b0a56103c0662901efd6b78″+ “0ee6dbe977923d46a8fda18fb25c65dd73b149a5cd9f3100668b56649932dadd8cf5be52eb1dce”+ “ad5cedbf”)] The public key is retrieved by running sn -Tp path\to\test\assembly.dll Alternatively, get it from the .snk file: sn … Read more

64-bit version of Boost for 64-bit windows

As a short answer: bjam –toolset=msvc-9.0 address-model=64 –build-type=complete As a longer answer, here are my build notes for having VS .NET 2008 32-bit and 64-bit boost libraries in the same hierarchy (which is I suspect a common use case): Build the win32 binaries bjam –toolset=msvc-9.0 –build-type=complete stage Create the directory lib\win32 Move the contents of … Read more

How do I start a program with arguments when debugging?

Go to Project-><Projectname> Properties. Then, click on the Debug tab. Then: If you’re using Visual Studio 2022 Continue by clicking Open debug launch profiles UI. Fill in your arguments in the textbox labeled Command line arguments. If you’re using a version before Visual Studio 2022 The Command Line Arguments textbox is available on the Debug … Read more

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