PTVS icon indicating copy to clipboard operation
PTVS copied to clipboard

The active environment doesn't change with the Cookiecutter Explorer is open

Open linette-zyy opened this issue 2 years ago • 4 comments

Environment image

Steps to Reproduce 1.Launch VS and open a local folder image 2.Select View > Cookiecutter Explorer 3.Add a python file 4.Add a virtual environment 'env' in toolbar combo box, check the 'Set current environment' image 5.Check if a tip pops up and select 'Always trust' image 6.Make sure the active environment is changed as 'env'

Expected behavior A tip pops up and the active environment changes as 'env' after selecting 'Always trust' image Cookiecutter Explorer_sucessful

Actual behavior No tip pops up and the active environment doesn't change as 'env' Cookiecutter Explorer_fail

Note The active environment doesn't change with the Cookiecutter Explorer is open, the active environment changes with the Cookiecutter Explorer is closed

linette-zyy avatar Nov 01 '22 09:11 linette-zyy

image I can repro this in other steps: 1.Launch VS and 'Continue without code' 2.Select View > Cookiecutter Explorer 3.Load a template from the "Recommended" section 4.Add a virtual environment 'env' in toolbar combo box, check the 'Set current environment' cookiecutter_withoutcode

linette-zyy avatar Nov 14 '22 08:11 linette-zyy

On the latest build 17.6.0 Preview 1.0 [33319.311.main], Python Package: 17.0.23005.2, this issue still occurred. image No tip pops up and the active environment doesn't change as 'env'

linette-zyy avatar Jan 20 '23 07:01 linette-zyy

@linette-zyy Does this still repro? I can't repro it and I don't see the "Python was found" error either.

StellaHuang95 avatar Feb 24 '23 01:02 StellaHuang95

@StellaHuang95 In today's latest build:17.6.0 Preview 2.0 [33423.321.main],Python package:17.0.23047.1, I can repro in two scenarios, the active environment doesn't change as 'env'

Scenarios 1 1.Launch VS and open a local folder 2.Select View > Cookiecutter Explorer 3.Add a python file 4.Add a virtual environment 'env' in toolbar combo box, check the 'Set current environment' 5.Check the active environment if is 'env' active_env_03

Scenarios 2 1.Launch VS and open cookiecutter explorer 2.Load the following template: https://github.com/brettcannon/python-azure-web-app-cookiecutter 3.Keep default values and click Create and Open Folder 4.Open webapp.py and add a virtual environment 'env' in toolbar combo box, check the 'Set current environment' 5.Check the active environment if is 'env' active_env_02

Note: Only when this tip pops up and select ''Always trust'' or 'Trust this time', the active environment will changes as 'env' image

linette-zyy avatar Feb 24 '23 06:02 linette-zyy