MS Q and A has a Visual Studio General tag that you can post to for help.
I got error "The 'CSharpPackage' package did not load correctly" when I open sln and I can not debug cs file
To day I upgrade visual studio 2019 to the lastest version.
and I always got error "The 'CSharpPackage' package did not load correctly" when I open sln and I can not debug cs file ( cannot add breakpoint in any way )
like this
and this is my log
I try to fixed this by delete all file in ComponentModelCache and restart program, repair , uninstall and then install again
but it won't work.
Does anyone have any idea for this error ?
Developer technologies | Visual Studio | Other
2 answers
Sort by: Most helpful
-
-
Tianyu Sun-MSFT 34,441 Reputation points Microsoft External Staff
2021-05-14T06:23:34.717+00:00 Hello @Wongsathorn Phorit ,
Welcome to Microsoft Q&A forum.
Did you install some extensions, NuGet packages in your solution(project)? Does this issue appear in a newly created project?
Please try following steps to troubleshoot:
1). Close all VS instances and delete the hidden
.vs
folder andbin
,obj
folders in your project/solution folder, after that restart VS and rebuild your project.2). If you didn’t delete all
ComponentModelCache
folders in everyC:\Users\[user name]\AppData\Local\Microsoft\VisualStudio\16.0_XXXXX
folders, please try to delete all otherComponentModelCache
folders.3). If you have installed some (third-party)extensions in VS, please try to disable them temporarily from VS > Extensions > Manage Extensions > Installed > Disable, then restart VS and check again. Or you can open
Developer Command Prompt for VS 2019
> typedevenv /safemode
to start VS under safe mode to see if the same issue appears(under safe mode, some components/extensions may not work).4). Try to reboot your machine and open VS as administrator.
5). If above suggestions don’t work, please kindly report this issue to VS Product Team in our Developer Community from VS > Help > Send Feedback > Report a Problem…
Best Regards,
Tianyu- If the answer is helpful, please click "Accept Answer" and upvote it.
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.
- If the answer is helpful, please click "Accept Answer" and upvote it.