Visual Studio
Visual Studio is an integrated development environment (IDE) from Microsoft.
Index
General
Add manifest file.
- Right click on
Solution Explorer → Project → Add → New Item → Application Manifest File. - The file
app.manifestwill be created.
Editor
Fix inconsistent line endings.
- Go to
Edit → Find and Replace → Quick Replace. - Check
Use Regular Expressions. - Replace
(?<!\r)\nfor\r\n.
Hide reference counts.
- Go to
Tools → Options → Text Editor → All Languages → CodeLens. - Uncheck
Enable CodeLensorShow C# and Visual Basic References.
Hide vertical dotted indentation.
- Go to
Tools → Options → Text Editor. - Uncheck
Show structure guide lines.
C/C++
Add include directories.
- Go to
Project → Properties → C/C++ → General. - Add to
Additional Include Directoriesthe path$(ProjectDir)path\to\include.
Add library directories.
- Go to
Project → Properties → Linker → General. - Add to
Additional Library Directoriesthe path$(ProjectDir)path\to\lib.
Add library.
- Go to
Project → Properties → Linker → Input. - Add to
Additional Dependenciesthe.libfile.
Set UTF-8 source character set.
- Go to
Project → Properties → C/C++ → Command Line. - Add to
Additional Optionsthe flag/utf-8.
OR - Go to
Project → Properties → C/C++ → Advanced. - Set
Source File Character SettoUse Unicode UTF-8.
Build
Change build directory.
- Go to
Project → Properties → General. - Change
Output Directoryto$(SolutionDir)build\$(Platform)\$(Configuration)\. - Change
Intermediate Directoryto$(SolutionDir)build\intermediate\$(Platform)\$(Configuration)\.
Copy files on post-build.
- Go to
Project → Properties → Build Events → Post-Build Event. - Add to
Command linethe instructioncopy /Y $(ProjectDir)path\to\files\*.ext $(OutDir).
Debug
Automatically close console when debug stops.
- Go to
Tools → Options → Debugging. - Check
Automatically close the console when debugging stops.
Run debug as administrator.
- Go to
app.manifest→<requestedPrivileges>and add the execution level requirement:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>
- When trying to debug, the editor will warn about the admin right and restart itself with admin rights.
- The executable will be marked as requiring admin rights, therefore when deploying is not necessary to configure admin rights in the file properties.