"An unexpected error occurred" while opening solution file.
Open
@StellaHuang95 is already working on this.
Since Jul 10, 2025.
needs repro
- Dominant language
- C#
- Stars
- 2.6k
- Forks
- 680
- Avg merge
- 39m
- Merged PRs (30d)
- 1
Description
Describe the bug
I reliably get a pop up dialog with the text "An unexpected error occurred" when opening a solution file that suggests reporting the error here.
Steps to Reproduce
- Open solution file
2.Wait for pop up dialog
Expected behavior
No error dialogs when opening a solution file.
Additional context and screenshots
[Window Title]
devenv.exe
[Main Instruction]
An unexpected error occurred
[Content]
Please press Ctrl+C to copy the contents of this dialog and report this error to our issue tracker.
[^] Hide details [Close]
[Expanded Information]
Build: 17.0.25037.1
Microsoft.VisualStudio.CommonIDE.Solutions.HResultExtensions+WrapperCOMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) [FindActiveProjectCfg @ SolutionBuildManager.cs:2282] ---> System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) [FindActiveProjectCfg @ SolutionBuildManager.cs:2282]
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudioTools.Project.ProjectNode.SetCurrentConfiguration()
at Microsoft.PythonTools.Project.PythonProjectNode.SetCurrentConfiguration()
at Microsoft.VisualStudioTools.Project.ProjectNode.GetMsBuildProperty(String propertyName, Boolean resetCache)
at Microsoft.VisualStudioTools.Project.ProjectNode.GetProjectProperty(String propertyName, Boolean resetCache)
at Microsoft.PythonTools.Project.CondaEnvCreateProjectInfoBar.<CheckAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.PythonTools.Infrastructure.VSTaskExtensions.<HandleAllExceptions>d__5.MoveNext()
```[Add any other information such as screenshots, error message, or stack trace]
**Configuration information (If you are providing a diagnostics file (see below), skip this section)**
VS Version: 17.13.4
PTVS version: 17.0.25037.1
Python version: 3.7
Debugger Type (if applicable): N/A
[VS4366E550.Microsoft.PythonTools.YTRU.log](https://github.com/user-attachments/files/21168274/VS4366E550.Microsoft.PythonTools.YTRU.log)
**Diagnostics file**
There was no file named PythonToolsDiagnostics_*.log, present.
I did find a *PythonTools*.svclog file and attached it using a .log extension as .svclog was rejected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.