Disable experience
Disable useless Codelens
Disable Sourcecontrol
Set the common shortcut for un/comment
Disable Downloading IntelliSense index for nuget, add this to your registry :
1
2
3
4
5
//src - https://developercommunity.visualstudio.com/content/problem/754438/downloading-intellisense-index-for-nugetorg-visual.html
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\16.0_879e2b99\Roslyn\Features\SymbolSearch]
"Enabled"=dword:00000000
add the following to hosts (you will not able to renew your license on community editions)
1
127.0.0.1 go.microsoft.com aka.ms download.visualstudio.microsoft.com download.microsoft.com download.visualstudio.com dl.xamarin.com xamarin-downloads.azureedge.net marketplace.visualstudio.com gallerycdn.vsassets.io visualstudio.microsoft.com docs.microsoft.com msdn.microsoft.com www.microsoft.com windows.net microsoftonline.com live.com web.vortex.data.microsoft.com vortex.data.microsoft
no tested - Disable telemetry in Visual Studio 2019 https://gist.github.com/zeffy/f0fe4be391a2f1a4246d0482bbf57c1a
Tips
VS - must have
Build from explorer context menu without open VS2019
1
2
3
4
5
//for other versions check - https://stackoverflow.com/a/744449
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build (Debug)\command]
@="\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.com\" %1 /Build Debug"
NuGet
1
2
3
4
Update-Package –reinstall
//nuget sources
C:\Users\%username%\AppData\Roaming\NuGet\NuGet.Config
nuget.exe doesnt exist to VS, is integrated into MSBuild, cmd example :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//https://social.msdn.microsoft.com/Forums/vstudio/en-US/2021d22c-2d81-4e40-9791-39c34567b19a/restore-nuget-packages-using-devenv?forum=msbuild
//cd /d C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin
msbuild.exe /t:restore /t:build urpath2sln```
**Git**
```js
//reset hard
git reset --hard
//clean files
git clean -xdf
//ignore last local commit. Editor will open > close it. more https://www.pipiscrew.com/2020/05/git-undo-pushed-commits-local-and-remote/
git commit --amend
VS - add reference is broken fix
1
2
3
4
5
6
7
8
9
//src - https://stackoverflow.com/a/57810776/1320686
-goto VS cmd
-change dir to
cd /d C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\PublicAssemblies
-run
gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll
gacutil -i Microsoft.VisualStudio.Shell.Interop.12.0.dll
VS - won’t find references
1
2
3
//https://stackoverflow.com/a/37986888
make sure your projects target the same framework
disable scrollbar circus
disable updates
on slow pc
Disable ‘Enable Just My Code’ (ref)
Debug inside DLL - Reflector Visual Studio Extension or Generate a PDB with dotPeek
Load symbols you need only. Options > Debug > Sumbols > Load only specified modules write DLL filename as Test.dll
SQL Server 2018 - Disable updates Tools > Check for updates > on the new form there is a checkbox “Automatically check for updates”
batch script to delete bin/obj folders for all projects are near SLN
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@echo off
for /f "delims=" %%D in ('dir /a:d /b') do (
if exist %%~fD (
if exist %%~fD\bin (
rmdir /s /q "%%~fD\bin\"
echo [deleted] %%~fD\bin\
)
if exist %%~fD\obj (
rmdir /s /q "%%~fD\obj\"
echo [deleted] %%~fD\obj\
)
)
)
pause
Remove VS2019 TaskRunnerExplorer extension
Currently tested with VS ASP.NET flavor.
Close VS.
Go C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\Web Tools
backup (copy) the
TaskRunnerExplorer (folder) extension.vsixmanifest
–
on source
1-open to text editor the
2-delete folder
TaskRunnerExplorer
3-edit
4-a key needed to removed from the registry
ref - https://www.docdroid.net/ph44FgW
Visual log w/ modded xsl
start VS with ‘/log’, goto : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE
1
devenv.exe /log
ActivityLog.xml will generated at : C:\Users\%username%\AppData\Roaming\Microsoft\VisualStudio\16.0_83f6bcec
To see the loading duration/times, copy&overwrite the modded ActivityLog.xsl (by default named ActivityLogProfiler.xsl, rename it to ActivityLog.xsl) near ActivityLog.xml (dont worry, every time VS writes also the xsl)
to read the XML properly drop it to InteretExplorer, example :
Delete some things for speed
Private registry
dont remove it, IDE not working properly
successfully removed the following :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Keys [-HKEY_USERS\test\Software\Microsoft\VisualStudio\16.0_83f6bcec_Config\Packages\{xx} contains
"Class"="Microsoft.VisualStudio.Data.Tools.DataCompare.VSPackage"
"Class"="Microsoft.VisualStudio.Services.ServiceBroker.GlobalHubClientPackage"
"Class"="Microsoft.VisualStudio.TeamFoundation.PCW.PcwPackage"
"Class"="Microsoft.VisualStudio.TeamFoundation.VersionControl.SccPcwPluginPackage"
"Class"="Microsoft.VisualStudio.WindowsAzure.CommonAzureTools.CommonAzureToolsPackage"
"Class"="Microsoft.VisualStudio.Docker.DotNetFramework.DockerDotNetFrameworkPackage"
"Class"="Microsoft.VisualStudio.Docker.Compose.DockerComposePackage"
"Class"="Microsoft.VisualStudio.DevOps.DevOpsPackage"
"Class"="Microsoft.Kofe.DebugPackage.KofePackagePackage"
"Class"="MS.Internal.Package.XamlDesignerPackage"
"Class"="Microsoft.VisualStudio.Linux.Package.LinuxConnectionManagerPackage"
"Class"="Microsoft.VisualStudio.Docker.LanguageService.DockerLanguageServicePackage"
"Class"="Microsoft.VisualStudio.PlatformUI.CloudEnvironmentsPackage"
"Class"="Microsoft.TeamFoundation.Git.Provider.SccProviderPackage"
"Class"="Microsoft.VisualStudio.DesignTools.Diagnostics.XamlDiagnosticsPackage"
"Class"="Microsoft.VisualStudio.FSharp.Editor.FSharpPackage"
"Class"="Microsoft.VisualStudio.Docker.DotNetCore.DockerDotNetCorePackage"
"Class"="Microsoft.WebTools.BrowserLink.Package.EurekaPackage"
"Class"="Microsoft.VisualStudio.PowerShellTools.PowerShellToolsPackage"
"Class"="Microsoft.VisualStudio.FSharp.ProjectSystem.FSharpProjectPackage"
"Class"="Microsoft.VisualStudio.Shell.Connected.CloudEnvironments.CloudEnvironmentsPackage"
"Class"="Microsoft.VisualStudio.TeamFoundation.TeamFoundationHost"
"Class"="Microsoft.VisualStudio.Data.Tools.SqlPdwExtensions.SqlPdwExtensionsPackage"
"Class"="Microsoft.WebTools.TaskRunnerExplorer.Extensions.TaskRunnerExplorerExtensionsVsPackage"
"Class"="Microsoft.VisualStudio.Data.Tools.SqlLanguageServices.Package"
"Class"="Microsoft.VisualStudio.Docker.Compose.Tools.DockerVsSettingsPackage"
"Class"="Microsoft.VisualStudio.Data.Tools.SqlEditor.VSIntegration.SqlEditorPackage"
File
- delete CompatibilityList.xml
C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\16.0_83f6bcec\Extensions\CompatibilityList.xml
Disable unwanted services to run - delete or rename the ServiceHub folder : C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7 dont do it, find all references and Project Filename search will not work
10 Visual Studio Navigation Productivity Tips
IIS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//disable Attach security warning when debugging IIS
// https://www.pipiscrew.com/2020/05/disable-visual-studio-attach-security-warning-when-debugging-iis/
//restart
iisreset /restart
//start-stop manually
iisreset /stop
iisreset /start
//start-stop HTTP driver (IIS depends on this)
net stop http
net start http
exe lives in C:\Windows\System32\inetsrv
server configuration (applicationhost.config)
%windir%\system32\inetsrv\config\
cache (dont delete) C:\Users\%username%\AppData\Local\Microsoft\WebsiteCache
//recycle the pool via cmd
cd /d %systemroot%\System32\inetsrv
appcmd recycle apppool /apppool.name:"app pool"
//more - https://www.pipiscrew.com/2020/05/iis-symbols-not-loaded/
//Backup and Restore IIS
//src - https://chrislazari.com/backup-and-restore-iis-on-windows-server-2016/
source pc:
C:\Windows\System32\inetsrv
appcmd add backup "<backup name="">"
then backup will made to C:\Windows\System32\inetsrv\backup
destination pc:
C:\Windows\System32\inetsrv
create the backup folder, type
appcmd list backup
appcmd restore backup "<backup name="">"
IIS connections, number of concurrent connections
IIS depends on HTTP windows driver
read more..
IIS - Pending request for ever
read more..
Jexus Manager can replace IIS Manager and adjust settings also on IIS Express
https://github.com/jexuswebserver/JexusManager https://docs.jexusmanager.com/
1
2
3
4
Portable Installation
In certain cases, you might not be able to execute the MSI installer on some machines.
-Install Jexus Manager from the MSI installer on a spare machine.
-Copy all files in the installation folder to the target machine.
src - https://docs.jexusmanager.com/getting-started/install.html
apart from Manager, you can use (for linux only) Jexus Server or here. Alternatively Host ASP.NET Core on Linux with Nginx
Nartac.IIS Crypto
Gives the ability to enable or disable protocols, ciphers, hashes and key exchange algorithms on Windows Server 2008, 2012, 2016 and 2019. It also lets you reorder SSL/TLS cipher suites offered by IIS, change advanced settings.
https://www.nartac.com/Products/IISCrypto/
On SQLServer , enable the line numbers
Enable - Show pinned tabs in a separate row
Query Optimization Once you write your query > rclick > Display Estimated Execution Plan when the cost is high you can rclick the specific > Properties find where stack probably at ‘Seek Predicates’
or
Once you write your query > rclick > Analyze Query in Dbase Engine Tuning Advisor > on hte next form press the toolbar Play button.
#tweak #lite</backup></backup>
origin - https://www.pipiscrew.com/?p=18415 vs2019-tweaks