Every time i open a existing project or new project it shows 2 error message-The 'RoslynPackage' package did not load correctly., -The 'CSharpPackage' package did not load correctly.,

Shanmugavel Manickam 55 Reputation points
2023-05-18T05:51:58.53+00:00

User's image

User's image

Every time i open a existing project or new project it shows 2 error message

-The 'RoslynPackage' package did not load correctly.,

-The 'CSharpPackage' package did not load correctly.,

How to solve this ?

i am using Visual studio community 2022 17.6

Developer technologies | Visual Studio | Other
{count} votes

5 answers

Sort by: Most helpful
  1. Mikael Syska 61 Reputation points
    2023-05-22T15:41:36.4966667+00:00

    After I had been trying all the fixed in this thread I found thread which fixed it for other versions of VS.
    Start "Developer Command Prompt for VS 2022".
    Then run the following in the prompt.

    devenv.exe /clearcache

    devenv.exe /updateconfiguration

    This fixed it for me.

    Found is this answer on SO: https://stackoverflow.com/a/51076810/196872

    1 person found this answer helpful.

  2. Shanmugavel Manickam 55 Reputation points
    2023-05-23T05:00:03.15+00:00
    1 person found this answer helpful.

  3. Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
    2023-05-18T09:16:41.1366667+00:00

    Hello @Shanmugavel Manickam ,

    Welcome to Microsoft Q&A forum.

    Please close Visual Studio, go to C:\Users\username\AppData\Local\Microsoft\VisualStudio\17.0_XXXXXXXX folder and rename/remove ComponentModelCache folder. Open VS and check again.

    Please also try to reset(run devenv /ResetSettings in Developer Command Prompt for Visual Studio 2022 Community) and repair VS(VS Installer > More > Repair).

    Feel free to let us know the results.


    Update 1:

    This issue is fixed in Visual Studio 2022 version 17.6.2, please try to update VS 2022 to the latest version.

    See this thread: RoslynPackage fails to initialize due to SettingsEditorFactory dependency error and release note for details.

    Sincerely,

    Tianyu


    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.


  4. Paul Jensen 0 Reputation points
    2023-05-22T00:57:02.1466667+00:00

    I have tried deleting the folder below to no avail.

    %localappdata%\Microsoft\VisualStudio\17_xxxx\ComponentModelCache
    
    

    I tried reinstalling VS 2022 also without success.

    Temporary solution to get it running was to downgrade my VS 2022 to version 17.5.5.


  5. Richard Adams 15 Reputation points
    2023-05-22T08:18:14.2533333+00:00

    Similar issue here - https://learn.microsoft.com/en-us/answers/questions/1286664/the-project-system-components-package-did-not-corr

    Looks like issues caused by the last update. No answer as of yet

    I have the same issue too following the last update (VS 2022 Professional 17.6.0)

    • Cleared cache
    • Deleted User folders
    • Repaired installation
    • Removed and did a clean install
    • All extensions disabled and still not working

    Concerned I'm going to have to reinstall my machine just to get VS working again


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.