Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBuild::build - Take into account 'useEnv' argument from user input #5609

Merged
merged 3 commits into from Aug 29, 2019

Conversation

@jgsogo
Copy link
Member

@jgsogo jgsogo commented Aug 12, 2019

Changelog: Fix: Use the value of argument useEnv provided by the user to the MSBuild helper also to adjust /p:UseEnv=false when the arg is False.
Docs: omit

VisualStudioBuildEnvironment defaults useEnv=True, then if the user calls with MSBuild.build(...., use_env=False,...) the input was not taken into account. This PR complements the functionality introduced in #4655

@tags: slow

@jgsogo jgsogo changed the title use argument from user input MSBuild::build - Take into account 'useEnv' argument from user input Aug 12, 2019
@@ -154,6 +154,8 @@ def get_command(self, project_file, props_file_path=None, targets=None, upgrade_

if use_env:
command.append('/p:UseEnv=true')
else:
command.append('/p:UseEnv=false')
Copy link
Contributor

@lasote lasote Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mhhh, so the default of the msbuild is /p:UseEnv=true?

Loading

Copy link
Contributor

@lasote lasote Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the default is not true, why we need to put it to false then?

UseEnv property
By default, the platform-specific settings for the current project override the PATH, INCLUDE, LIB, LIBPATH, CONFIGURATION, and PLATFORM environment variables. Set the UseEnv property to true to guarantee that the environment variables are not overridden.

msbuild myProject.vcxproj /p:UseEnv=true

Loading

Copy link
Contributor

@lasote lasote Aug 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get it now. It takes it from the VisualStudioBuildEnvironment

Loading

@lasote lasote added this to the 1.18.2 milestone Aug 19, 2019
Copy link
Contributor

@lasote lasote left a comment

Update the changelog line.

Loading

@jgsogo
Copy link
Member Author

@jgsogo jgsogo commented Aug 19, 2019

Done

Loading

@lasote lasote merged commit ee1c621 into conan-io:release/1.18.2 Aug 29, 2019
2 checks passed
Loading
@jgsogo jgsogo deleted the feat/vs-use_env branch Aug 29, 2019
AKhranovskiy pushed a commit to AKhranovskiy/conan that referenced this issue Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants