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
Conversation
@@ -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') |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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.
Done |
…onan-io#5609) * use argument from user input * fix tests * fix tests
Changelog: Fix: Use the value of argument
useEnv
provided by the user to theMSBuild
helper also to adjust/p:UseEnv=false
when the arg isFalse
.Docs: omit
VisualStudioBuildEnvironment
defaultsuseEnv=True
, then if the user calls withMSBuild.build(...., use_env=False,...)
the input was not taken into account. This PR complements the functionality introduced in #4655@tags: slow