Can't start performance profiler in Visual Studio 2015 - visual-studio

My version is 14.0.25431.01 Update 3 (Windows 7 Pro x64).
When I try and run the performance profiler I get the following errors:
Performance Session File does not exist or is invalid.
When I click on OK I get a
Object reference not set to an instance of an object.
Things I did:
Choose Release configuration (always)
Run VS as Admin (always)
/ResetSettings
/SafeMode
Repair VS
Delete *.psess files
No reference to diagnostics in *.sln file to delete
Added C:\Program Files (x86)\Microsoft Visual Studio 14.0\Team
Tools\Performance Tools to system and user path environment variable
and rebooted.
I'm running out of options here.....

Related

microsoft.service.hub error after installing Visual Studio Community edition

After re-installing Visual Studio Community edition I've been getting this error.
I get the error right after the splashscreen shows
Could not load file or assembly 'Microsoft.ServiceHub.Client'
Please open File Explorer and search this file name to verify this file is existing on your computer or not.
Meanwhile, you can have a try with the following to troubleshoot this issue:
Clear all folders and files under the folder: %LocalAppData%\Microsoft\VisualStudio\15.0_xxx\ and restart the VS 2017 to check it again.
Open cmd and navigate to the VS 2017 installation folder like C:\Program Files(x86)\Microsoft Visual Studio\2017\xxx\Common7\IDE and run the command: devenv /safemode to run it as safe mode, then check if the installed extensions caused this issue.
Re-run the VS 2017 installer as administrator and choose Repair to repair it

Visual Studio 2017 hangs at "initializing templates..."

This is a brand new installation of VS2017 (latest version at the time of writing - 15.1 (26403.0)) on a fresh installation of Windows (Windows 10 Enterprise 64-bit) with no extensions or addons included yet. When going to File New Project VS simply sits at 'initializing templates...'. I've waited for twenty minutes before having to force quit the application.
I have tried the command line argument for devenv /installvstemplates which does not help.
Any help is appreciated, let me know if you need any additional info.
Update
I continued troubleshooting the issue. I ran VS as administrator with logging and noticed that these are the final logged entries when attempting to load templates:
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\1033\SharedProject\SharedProject.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\CSharp\Windows\1033\SharedProject\SharedProject.vstemplate"
Found templates with duplicate template ids at "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows\1033\ClassLibrary_WorkerRole.vstemplate" and "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\ProjectTemplates\VisualBasic\Windows\1033\ClassLibrary\classlibrary.vstemplate"
Error! Unable to access file (%USER%\AppData\Roaming\Microsoft\VisualStudio\15.0_ea1722b9\ProjectTemplatesCache\cache.bin)
Even though this was a fresh install on a clean system I did attempt an uninstall and reinstall of VS2017 which did not work. I even selected less options in an attempt to mitigate the duplicate template ID warnings.
I ended up having to uninstall VS 2017 again. Uninstall Windows 10 SDK (of which I had two versions for some reason). Run VS 2017 installer as administrator.
This time it installed and completed with warnings, the warning was that it did not install the .Net Core SDK because it says I already have a version, though I don't see it. It's possible I'll have to deal with this later as there may be a hung registry key.
Still, I loaded up VS 2017 and the templates initialized immediately. So this problem is resolved.

Visual Studio 2017 RC installation failure "product ... cannot be found"

I am trying to install Visual Studio Professional 2017 RC on Windows 10 but the installer reports:
A product matching the following parameters cannot be found:
channelId: VisualStudio.15.Release
productId: Microsoft.VisualStudio.Product.Professional
Is this fixable?
I had the same issue and the following has helped me. A clean-up and removal of vs and installation folder was not enough in my case.
Here are the steps I've taken:
uninstalled Visual Studio (and other Visual Studio installations)
run C:\Program Files (x86)\Microsoft Visual Studio\Installer\InstallCleanup.exe -full"
removed all the "C:\Program Files (x86)\Microsoft Visual Studio" folders
removed "C:\Program Data\Microsoft\Visual Studio\ folder
restarted system
In the end I think removing of Program Data location did the final trick. I had to run a repair after the successful installation to make VS Extensions work.
I previously installed VS 15 Release and removed it. I had the same issue and fixed it by removing installer folder from here: C:\Program Files (x86)\Microsoft Visual Studio\ Installer
Please follow the cleanup steps and retry your VS install
See if you have this file on your machine: "%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe"
If so, please launch it from an admin command prompt with a -full param:
InstallCleanup.exe -full
If not, please manually delete the "%programfiles(x86)%\Microsoft Visual Studio\Installer” folder
Relaunch the newly downloaded vs_enterprise.exe (or vs_professional.exe or vs_community.exe…)
Allow the first step to install the installer
Once the installer comes up and you can see workload choices (.net desktop and the like), close it
Go launch the same InstallCleanup.exe to clean up old build of VS
Then relaunch vs_enterprise.exe and install VS.
The problem that I had was because I had a Visual Studio 2017 layout and I wanted to make a Visual Studio 2019 layout in the same directory.
If you are creating a new offline installation layout on top of an old offline installation layout, you need to delete every file inside the layout folder (And only the layout folder not sub-directories).
This way the new (channel) information will be replaced and installation goes without errors.

Visual Studio 2015 Installation corruption

I installed Visual Studio 2015 and shortly after selecting a TFS server started to experience issues:
missing package errors
new project had no project types
Team explorer has an error tag (Page '312e8a59-2712-48a1-863e-0ef4e67961fc' not found.)
If I go to Team and click manage connections I get an error (Team Foundation Error Page '3185ed96-1cbcd-4381-a439-636973542e50' not found.)
If I try to re-open the solution I pulled down I get:
(The 'ErrorListPackage' package did not load correctly)
(The 'CSharpPackage' package did not load correctly)
(The 'FileIndicatorPackage' package did not load correctly) and fails to open
Then I get an 'object reference not set to an instance of an object) when I try to close VS.
I tried running the devenv.exe commands to rest everything to no avail:
devenv.exe /debug
devenv.exe /resetsettings
devenv.exe /instalvstemplates
devenv.exe /resetskippings
devenv.exe /resetuserdata
devenv.exe /setup
devenv.exe /safemode
I tried repair: still broken
I uninstalled and reinstalled: still broken
The Fix
Uninstall Visual Studio 2015 from Programs and Features
Reboot machine if prompted.
Rename or delete folders-
C:\Program Files (x86)\Microsoft Visual Studio 14.0
C:\Program Files\Microsoft Visual Studio 14.0
<user>\Documents\Visual Studio 2015
<user>\AppData\Roaming\Microsoft\VisualStudio\14.0
<user>\AppData\Local\Microsoft\VisualStudio\14.0
<user>\AppData\Local\Microsoft\VSCommon\14.0
Go to the registry editor (start >> run >> regedit) and remove/rename the following registries-
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0
HKEY_CURRENT_USER\Software\Microsoft\VSCommon\14.0
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Config
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0_Remote
Install Visual Studio 2015

visual studio cannot open new project

Whenever I try to create a new project in VS 2010 I get the error:
New project/item dialog could not be initialized due to error:
Exception of type 'Microsoft.VisualStudio.Dialogs.DialogInitializationException' was thrown.
And when try to open existing project visual studio 2010 restarts.
I had the same problem on my computer. After a long time searching I solved it by the following steps:
Close all instances of Visual Studio
Go to "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE" (or whatever is your VS installation directory)
Run command devenv.exe /resetuserdata and wait until finished
Run Visual Studio
I can't find the former case. As you met an exception
Microsoft.VisualStudio.Dialogs.DialogInitializationException
I am suggesting you try the way below:
Run devenv /resetuserdata.
Delete the file:
%LOCALAPPDATA%\Microsoft\VisualStudio\11.0\ComponentModelCache
and restart Visual Studio.
Close all VS instances and try the solution mentioned here:
Launch Developer Command Prompt for VS 2017 as Administrator
Go to VS 2017 installation folder, for example: pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll
Open your control panel
Change
Regional -> Formats tab -> Format: English(United States)
https://connect.microsoft.com/VisualStudio/feedback/details/727578/vs-do-not-work-with-finnish-number-format-on-w8-64-bit
It works for me :)
This problem can cause when you install an older version of Visual Studio nearby the current version. For example VS 2017 is installed on your system and you do force install of VS 2008.
I faced this problem many years ago by installing VS 2008 after VS 2010;
and today again I had this problem. Because I installed SolidWorks 2015 after VS 2017. SolidWorks had a Visual Studio 2008 inside its package that interferes my installation.
Just uninstalled VS 2008 and I'm done.
I found this to still be an issue in Visual Studio Community 2017, Microsoft released a work around that fixed my problem:
The work-around for this issue would be:
-Launch “Developer Command Prompt for VS 2017” as Administrator
-Go to VS 2017 installation folder, for example: pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
-gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll

Resources