Visual studio app won't open after 17.7.0 update.

cokalyoncu 30 Reputation points
2023-08-09T15:51:37.9133333+00:00

MyVSLog.xml

On the splash screen after installing 17.7.0 update to visual studio it throws an error with the text.

"Could not start visual studio due to an error.

Microsoft.ServiceHub.Client.ControllerConnectionException:

Controller terminated before accepting connections. Exit code: -532462766."

When I look at the event viewer, I see an error description as follows.

Application: Microsoft.ServiceHub.Controller.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.BadImageFormatException

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

at System.Reflection.Assembly.LoadFrom(String assemblyFile, Evidence securityEvidence)

at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)

at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)

at System.AppDomain.CreateInstanceFromAndUnwrap(String assemblyName, String typeName)

at System.AppDomain.CreateInstanceFromAndUnwrap(System.String, System.String)

at Microsoft.ServiceHub.AppDomain.IsolationManager`3[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetAppDomainEntryPoint(System.String, System.String, System.LoaderOptimization, System.__Canon)

at Microsoft.ServiceHub.Controller.Program.Main(System.String[])

I deleted the application many times and reinstalled it and the problem did not go away.

When I run it in safe mode, it shows an error as follows.

Could not start visual studio due to an error.

System.IO.FileNotFoundException:

Could not load file or assembly 'Microsoft.Developer.IdentityService.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

Developer technologies | Visual Studio | Setup
Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-08-10T06:59:13.4633333+00:00

    Hi @Caner Olgun Kalyoncu, 

    Welcome to Microsoft Q&A! 

    Can you find the ‘Microsoft.Developer.IdentityService.Core.dll’ file under the following path? 

    C:\Program Files\Microsoft Visual Studio\2022<version>\Common7\ServiceHub\Services\Microsoft.Developer.IdentityService  

    Please try to rename it and repair your VS. 

    If it doesn’t work, please rename the folder: C:\Program Files\Microsoft Visual Studio\2022<version>\Common7\IDE\CommonExtensions\Microsoft and repair the VS again. 

    After this, please re-launch your VS and check that it works properly. 

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Jones, Tim 0 Reputation points
    2023-08-15T12:02:42.75+00:00

    I was able to make this work by uninstalling and reinstalling in a different directory that does not require admin permissions. Specifically I installed in a directory I created c:\dev\Visual Studio.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.