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
Contributor

@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

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?

Copy link
Contributor

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

Copy link
Contributor

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

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

@lasote lasote left a comment

Choose a reason for hiding this comment

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

Update the changelog line.

@jgsogo
Copy link
Contributor Author

jgsogo commented Aug 19, 2019

Done

@lasote lasote merged commit ee1c621 into conan-io:release/1.18.2 Aug 29, 2019
@jgsogo jgsogo deleted the feat/vs-use_env branch August 29, 2019 06:49
AKhranovskiy pushed a commit to AKhranovskiy/conan that referenced this pull request 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
Development

Successfully merging this pull request may close these issues.

None yet

3 participants