PTVS
PTVS copied to clipboard
After adding the file as a link first, the file will not be added to the project.
Describe the bug
Steps to Reproduce
- Create a Python Application.
- Right click on the project and select Add > Existing Item …
- In the prompts dialog, select the item you want to add.( PythonApplication10 )
- Click the Add drop-down and select "Add As Link".
- Right click on the project and select Add > Existing Item …
- Select PythonApplication10 that you chose before, and select "Add". (You can repeat step 5 and step 6)
Expected behavior
After selecting an item "Add As Link" , the item PythonApplication10 should be "Add" in project.
Additional context and screenshots
More than one appeared in SE.( PythonApplication10 Status is "Add As Link" ) And the file PythonApplication10 is not in the directory.
Restart VS, you can see that there is only one. Then, repeat step 5 and step 6, it can repro this.
Output info
Info: Info: Pylance language server 2021.4.1 (pyright 6410a8a2) startingServer root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist
Error: Warning: Info: Info: Info: Info: Error reading settings: TypeError: Cannot read property '0' of nullstubPath typings is not a valid directory.Assuming Python platform WindowsSearching for source filesNo source files found.Background analysis(1) root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\dist
Info: Background analysis(1) started
Info: Info: Warning: Info: Info: Info: Info: Info: Info: No configuration file found.Setting pythonPath for service "PythonApplication12": "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64\python.exe"stubPath C:\Users\vting\source\repos\PythonApplication12\PythonApplication12\typings is not a valid directory.Assuming Python version 3.9Assuming Python platform WindowsSearching for source filesFound 1 source fileBackground analysis(2) root directory: c:\program files\microsoft visual studio\2022\preview\common7\ide\extensions\microsoft\python\core\pylance\distBackground analysis(2) started
In today's build 17.1.0 Preview 3.0 [32029.61.main]
, I can repro this.
@ttSpace Does this still repro? I can't add duplicate projects.
@StellaHuang95 I can repro in today's build 17.6.0 Preview 2.0 [33423.321.main]
, Python Package: 17.0.23047.1
.
This will be fixed once the pr is finished here: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/455205