PTVS
PTVS copied to clipboard
An error "Cannot access a disposed object..." pops up when save Python Project File.
Environment
Steps to Reproduce
- Create a new Python project
- Create a virtual environment
- Close the VS
- Click “Save” to save some changes
- And then click "Yes"
Expected behavior The changes can be saved without any error.
Additional context and screenshots
An error pops up.
I'm able to repro this, but it has nothing to do with my previous bug like I thought it did.
This only seems to happen when you try to exit visual studio immediately after modifying the pyproj (by adding a new environment). You'll know you did it right because it opens the Save File As
dialog, when it really should just be saving the file over the existing one without opening that dialog.
I don't think this is a PTVS problem, I think this is a race condition in Visual Studio itself, since we don't own the process of saving files, nor do we have anything called FileChangeService
.
I will reach out to the Visual Studio team about this, I don't think its ours.
I can repro in today's build 17.2.0 Preview 3.0 [32328.412.main]. when a project add reference from another project, then close VS
This issue still reproduced on today's build.
@linette-zyy Does this still repro?
@AdamYoblick I can not repro this in today's latest build:17.6.0 Preview 1.0 [33402.156.main],Python Packages:17.0.23033.1
Closing since this no longer repros. Please re-open if this comes up again 😄