We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
MSBuild helper useEnv option causes missing include paths in some casess
In using MSBuild helper for the first time, I received a number of errors about headers that could not be found. After spending significant time validating that the project works normally when running msbuild manually, I determined that the breaking flag was `/useEnv:True`.  

I briefly looked at the implementation and it was not immediately obvious to me where the problem might be.  I have worked around it by using the `get_command` method from the MSBuild helper, which returns a command where the default of `useEnv` is  `False`. 

It's mysterious why it causes this problem, but if everything is correct, then the requested change would be to simply expose `useEnv` as a parameter in the `build` method of the `MSBuild` helper rather than forcing it to `True`.

I will try to provide a way to reproduce the error, but it's a private project and I don't know if I have time to isolate the problem any time soon. I spent to much time just identifying it. 

- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md).
- [x] I've specified the Conan version, operating system version and any tool that can be relevant.
- [] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conans/client/build/msbuild.py`
Content:
```
1 import re
2 
3 from conans import tools
4 from conans.client.build.visual_environment import (VisualStudioBuildEnvironment,
5                                                     vs_build_type_flags, vs_std_cpp)
6 from conans.client.tools.oss import cpu_count
7 from conans.client.tools.win import vcvars_command
8 from conans.errors import ConanException
9 from conans.util.env_reader import get_env
10 from conans.util.files import tmp_file
11 from conans.model.conan_file import ConanFile
12 
13 
14 class MSBuild(object):
15 
16     def __init__(self, conanfile):
17         if isinstance(conanfile, ConanFile):
18             self._conanfile = conanfile
19             self._settings = self._conanfile.settings
20             self._output = self._conanfile.output
21             self.build_env = VisualStudioBuildEnvironment(self._conanfile)
22         else:  # backwards compatible with build_sln_command
23             self._settings = conanfile
24             self.build_env = None
25 
26     def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,
27               parallel=True, force_vcvars=False, toolset=None, platforms=None):
28         with tools.environment_append(self.build_env.vars):
29             # Path for custom properties file
30             props_file_contents = self._get_props_file_contents()
31             with tmp_file(props_file_contents) as props_file_path:
32                 vcvars = vcvars_command(self._conanfile.settings, force=force_vcvars)
33                 command = self.get_command(project_file, props_file_path,
34                                            targets=targets, upgrade_project=upgrade_project,
35                                            build_type=build_type, arch=arch, parallel=parallel,
36                                            toolset=toolset, platforms=platforms,
37                                            use_env=True)
38                 command = "%s && %s" % (vcvars, command)
39                 return self._conanfile.run(command)
40 
41     def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,
42                     build_type=None, arch=None, parallel=True, toolset=None, platforms=None,
43                     use_env=False):
44 
45         targets = targets or []
46         command = ""
47 
48         if upgrade_project and not get_env("CONAN_SKIP_VS_PROJECTS_UPGRADE", False):
49             command += "devenv %s /upgrade && " % project_file
50         else:
51             self._output.info("Skipped sln project upgrade")
52 
53         build_type = build_type or self._settings.get_safe("build_type")
54         arch = arch or self._settings.get_safe("arch")
55         if not build_type:
56             raise ConanException("Cannot build_sln_command, build_type not defined")
57         if not arch:
58             raise ConanException("Cannot build_sln_command, arch not defined")
59 
60 
61 
62         command += "msbuild %s /p:Configuration=%s" % (project_file, build_type)
63         msvc_arch = {'x86': 'x86',
64                      'x86_64': 'x64',
65                      'armv7': 'ARM',
66                      'armv8': 'ARM64'}
67         if platforms:
68             msvc_arch.update(platforms)
69         msvc_arch = msvc_arch.get(str(arch))
70         try:
71             sln = tools.load(project_file)
72             pattern = re.compile(r"GlobalSection\(SolutionConfigurationPlatforms\)"
73                                  r"(.*?)EndGlobalSection", re.DOTALL)
74             solution_global = pattern.search(sln).group(1)
75             lines = solution_global.splitlines()
76             lines = [s.split("=")[0].strip() for s in lines]
77         except Exception:
78             pass
79         else:
80             config = "%s|%s" % (build_type, msvc_arch)
81             if config not in "".join(lines):
82                 self._output.warn("***** The configuration %s does not exist in this solution *****" % config)
83                 self._output.warn("Use 'platforms' argument to define your architectures")
84 
85         if use_env:
86             command += ' /p:UseEnv=true'
87 
88         if msvc_arch:
89             command += ' /p:Platform="%s"' % msvc_arch
90 
91         if parallel:
92             command += ' /m:%s' % cpu_count()
93 
94         if targets:
95             command += " /target:%s" % ";".join(targets)
96 
97         if toolset:
98             command += " /p:PlatformToolset=%s" % toolset
99 
100         if props_file_path:
101             command += ' /p:ForceImportBeforeCppTargets="%s"' % props_file_path
102 
103         return command
104 
105     def _get_props_file_contents(self):
106         # how to specify runtime in command line:
107         # https://stackoverflow.com/questions/38840332/msbuild-overrides-properties-while-building-vc-project
108         runtime_library = {"MT": "MultiThreaded",
109                            "MTd": "MultiThreadedDebug",
110                            "MD": "MultiThreadedDLL",
111                            "MDd": "MultiThreadedDebugDLL"}.get(self._settings.get_safe("compiler.runtime"), "")
112 
113         if self.build_env:
114             # Take the flags from the build env, the user was able to alter them if needed
115             flags = self.build_env.flags
116             flags.append(self.build_env.std)
117         else:  # To be removed when build_sln_command is deprecated
118             flags = vs_build_type_flags(self._settings)
119             flags.append(vs_std_cpp(self._settings))
120 
121         template = """<?xml version="1.0" encoding="utf-8"?>
122     <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
123       <ItemDefinitionGroup>
124         <ClCompile>
125           <RuntimeLibrary>{runtime}</RuntimeLibrary>
126           <AdditionalOptions>{compiler_flags} %(AdditionalOptions)</AdditionalOptions>
127         </ClCompile>
128       </ItemDefinitionGroup>
129     </Project>""".format(**{"runtime": runtime_library,
130                             "compiler_flags": " ".join([flag for flag in flags if flag])})
131         return template
132
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conans/client/build/msbuild.py b/conans/client/build/msbuild.py
--- a/conans/client/build/msbuild.py
+++ b/conans/client/build/msbuild.py
@@ -24,7 +24,7 @@
             self.build_env = None
 
     def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,
-              parallel=True, force_vcvars=False, toolset=None, platforms=None):
+              parallel=True, force_vcvars=False, toolset=None, platforms=None, use_env=True):
         with tools.environment_append(self.build_env.vars):
             # Path for custom properties file
             props_file_contents = self._get_props_file_contents()
@@ -34,7 +34,7 @@
                                            targets=targets, upgrade_project=upgrade_project,
                                            build_type=build_type, arch=arch, parallel=parallel,
                                            toolset=toolset, platforms=platforms,
-                                           use_env=True)
+                                           use_env=use_env)
                 command = "%s && %s" % (vcvars, command)
                 return self._conanfile.run(command)
 
@@ -43,10 +43,10 @@
                     use_env=False):
 
         targets = targets or []
-        command = ""
+        command = []
 
         if upgrade_project and not get_env("CONAN_SKIP_VS_PROJECTS_UPGRADE", False):
-            command += "devenv %s /upgrade && " % project_file
+            command.append("devenv %s /upgrade &&" % project_file)
         else:
             self._output.info("Skipped sln project upgrade")
 
@@ -57,9 +57,7 @@
         if not arch:
             raise ConanException("Cannot build_sln_command, arch not defined")
 
-
-
-        command += "msbuild %s /p:Configuration=%s" % (project_file, build_type)
+        command.append("msbuild %s /p:Configuration=%s" % (project_file, build_type))
         msvc_arch = {'x86': 'x86',
                      'x86_64': 'x64',
                      'armv7': 'ARM',
@@ -83,24 +81,24 @@
                 self._output.warn("Use 'platforms' argument to define your architectures")
 
         if use_env:
-            command += ' /p:UseEnv=true'
+            command.append('/p:UseEnv=true')
 
         if msvc_arch:
-            command += ' /p:Platform="%s"' % msvc_arch
+            command.append('/p:Platform="%s"' % msvc_arch)
 
         if parallel:
-            command += ' /m:%s' % cpu_count()
+            command.append('/m:%s' % cpu_count())
 
         if targets:
-            command += " /target:%s" % ";".join(targets)
+            command.append("/target:%s" % ";".join(targets))
 
         if toolset:
-            command += " /p:PlatformToolset=%s" % toolset
+            command.append("/p:PlatformToolset=%s" % toolset)
 
         if props_file_path:
-            command += ' /p:ForceImportBeforeCppTargets="%s"' % props_file_path
+            command.append('/p:ForceImportBeforeCppTargets="%s"' % props_file_path)
 
-        return command
+        return " ".join(command)
 
     def _get_props_file_contents(self):
         # how to specify runtime in command line:

{"golden_diff": "diff --git a/conans/client/build/msbuild.py b/conans/client/build/msbuild.py\n--- a/conans/client/build/msbuild.py\n+++ b/conans/client/build/msbuild.py\n@@ -24,7 +24,7 @@\n             self.build_env = None\n \n     def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,\n-              parallel=True, force_vcvars=False, toolset=None, platforms=None):\n+              parallel=True, force_vcvars=False, toolset=None, platforms=None, use_env=True):\n         with tools.environment_append(self.build_env.vars):\n             # Path for custom properties file\n             props_file_contents = self._get_props_file_contents()\n@@ -34,7 +34,7 @@\n                                            targets=targets, upgrade_project=upgrade_project,\n                                            build_type=build_type, arch=arch, parallel=parallel,\n                                            toolset=toolset, platforms=platforms,\n-                                           use_env=True)\n+                                           use_env=use_env)\n                 command = \"%s && %s\" % (vcvars, command)\n                 return self._conanfile.run(command)\n \n@@ -43,10 +43,10 @@\n                     use_env=False):\n \n         targets = targets or []\n-        command = \"\"\n+        command = []\n \n         if upgrade_project and not get_env(\"CONAN_SKIP_VS_PROJECTS_UPGRADE\", False):\n-            command += \"devenv %s /upgrade && \" % project_file\n+            command.append(\"devenv %s /upgrade &&\" % project_file)\n         else:\n             self._output.info(\"Skipped sln project upgrade\")\n \n@@ -57,9 +57,7 @@\n         if not arch:\n             raise ConanException(\"Cannot build_sln_command, arch not defined\")\n \n-\n-\n-        command += \"msbuild %s /p:Configuration=%s\" % (project_file, build_type)\n+        command.append(\"msbuild %s /p:Configuration=%s\" % (project_file, build_type))\n         msvc_arch = {'x86': 'x86',\n                      'x86_64': 'x64',\n                      'armv7': 'ARM',\n@@ -83,24 +81,24 @@\n                 self._output.warn(\"Use 'platforms' argument to define your architectures\")\n \n         if use_env:\n-            command += ' /p:UseEnv=true'\n+            command.append('/p:UseEnv=true')\n \n         if msvc_arch:\n-            command += ' /p:Platform=\"%s\"' % msvc_arch\n+            command.append('/p:Platform=\"%s\"' % msvc_arch)\n \n         if parallel:\n-            command += ' /m:%s' % cpu_count()\n+            command.append('/m:%s' % cpu_count())\n \n         if targets:\n-            command += \" /target:%s\" % \";\".join(targets)\n+            command.append(\"/target:%s\" % \";\".join(targets))\n \n         if toolset:\n-            command += \" /p:PlatformToolset=%s\" % toolset\n+            command.append(\"/p:PlatformToolset=%s\" % toolset)\n \n         if props_file_path:\n-            command += ' /p:ForceImportBeforeCppTargets=\"%s\"' % props_file_path\n+            command.append('/p:ForceImportBeforeCppTargets=\"%s\"' % props_file_path)\n \n-        return command\n+        return \" \".join(command)\n \n     def _get_props_file_contents(self):\n         # how to specify runtime in command line:\n", "issue": "MSBuild helper useEnv option causes missing include paths in some casess\nIn using MSBuild helper for the first time, I received a number of errors about headers that could not be found. After spending significant time validating that the project works normally when running msbuild manually, I determined that the breaking flag was `/useEnv:True`.  \r\n\r\nI briefly looked at the implementation and it was not immediately obvious to me where the problem might be.  I have worked around it by using the `get_command` method from the MSBuild helper, which returns a command where the default of `useEnv` is  `False`. \r\n\r\nIt's mysterious why it causes this problem, but if everything is correct, then the requested change would be to simply expose `useEnv` as a parameter in the `build` method of the `MSBuild` helper rather than forcing it to `True`.\r\n\r\nI will try to provide a way to reproduce the error, but it's a private project and I don't know if I have time to isolate the problem any time soon. I spent to much time just identifying it. \r\n\r\n- [x] I've read the [CONTRIBUTING guide](https://raw.githubusercontent.com/conan-io/conan/develop/.github/CONTRIBUTING.md).\r\n- [x] I've specified the Conan version, operating system version and any tool that can be relevant.\r\n- [] I've explained the steps to reproduce the error or the motivation/use case of the question/suggestion.\r\n\r\n\n", "before_files": [{"content": "import re\n\nfrom conans import tools\nfrom conans.client.build.visual_environment import (VisualStudioBuildEnvironment,\n                                                    vs_build_type_flags, vs_std_cpp)\nfrom conans.client.tools.oss import cpu_count\nfrom conans.client.tools.win import vcvars_command\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\nfrom conans.util.files import tmp_file\nfrom conans.model.conan_file import ConanFile\n\n\nclass MSBuild(object):\n\n    def __init__(self, conanfile):\n        if isinstance(conanfile, ConanFile):\n            self._conanfile = conanfile\n            self._settings = self._conanfile.settings\n            self._output = self._conanfile.output\n            self.build_env = VisualStudioBuildEnvironment(self._conanfile)\n        else:  # backwards compatible with build_sln_command\n            self._settings = conanfile\n            self.build_env = None\n\n    def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,\n              parallel=True, force_vcvars=False, toolset=None, platforms=None):\n        with tools.environment_append(self.build_env.vars):\n            # Path for custom properties file\n            props_file_contents = self._get_props_file_contents()\n            with tmp_file(props_file_contents) as props_file_path:\n                vcvars = vcvars_command(self._conanfile.settings, force=force_vcvars)\n                command = self.get_command(project_file, props_file_path,\n                                           targets=targets, upgrade_project=upgrade_project,\n                                           build_type=build_type, arch=arch, parallel=parallel,\n                                           toolset=toolset, platforms=platforms,\n                                           use_env=True)\n                command = \"%s && %s\" % (vcvars, command)\n                return self._conanfile.run(command)\n\n    def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,\n                    build_type=None, arch=None, parallel=True, toolset=None, platforms=None,\n                    use_env=False):\n\n        targets = targets or []\n        command = \"\"\n\n        if upgrade_project and not get_env(\"CONAN_SKIP_VS_PROJECTS_UPGRADE\", False):\n            command += \"devenv %s /upgrade && \" % project_file\n        else:\n            self._output.info(\"Skipped sln project upgrade\")\n\n        build_type = build_type or self._settings.get_safe(\"build_type\")\n        arch = arch or self._settings.get_safe(\"arch\")\n        if not build_type:\n            raise ConanException(\"Cannot build_sln_command, build_type not defined\")\n        if not arch:\n            raise ConanException(\"Cannot build_sln_command, arch not defined\")\n\n\n\n        command += \"msbuild %s /p:Configuration=%s\" % (project_file, build_type)\n        msvc_arch = {'x86': 'x86',\n                     'x86_64': 'x64',\n                     'armv7': 'ARM',\n                     'armv8': 'ARM64'}\n        if platforms:\n            msvc_arch.update(platforms)\n        msvc_arch = msvc_arch.get(str(arch))\n        try:\n            sln = tools.load(project_file)\n            pattern = re.compile(r\"GlobalSection\\(SolutionConfigurationPlatforms\\)\"\n                                 r\"(.*?)EndGlobalSection\", re.DOTALL)\n            solution_global = pattern.search(sln).group(1)\n            lines = solution_global.splitlines()\n            lines = [s.split(\"=\")[0].strip() for s in lines]\n        except Exception:\n            pass\n        else:\n            config = \"%s|%s\" % (build_type, msvc_arch)\n            if config not in \"\".join(lines):\n                self._output.warn(\"***** The configuration %s does not exist in this solution *****\" % config)\n                self._output.warn(\"Use 'platforms' argument to define your architectures\")\n\n        if use_env:\n            command += ' /p:UseEnv=true'\n\n        if msvc_arch:\n            command += ' /p:Platform=\"%s\"' % msvc_arch\n\n        if parallel:\n            command += ' /m:%s' % cpu_count()\n\n        if targets:\n            command += \" /target:%s\" % \";\".join(targets)\n\n        if toolset:\n            command += \" /p:PlatformToolset=%s\" % toolset\n\n        if props_file_path:\n            command += ' /p:ForceImportBeforeCppTargets=\"%s\"' % props_file_path\n\n        return command\n\n    def _get_props_file_contents(self):\n        # how to specify runtime in command line:\n        # https://stackoverflow.com/questions/38840332/msbuild-overrides-properties-while-building-vc-project\n        runtime_library = {\"MT\": \"MultiThreaded\",\n                           \"MTd\": \"MultiThreadedDebug\",\n                           \"MD\": \"MultiThreadedDLL\",\n                           \"MDd\": \"MultiThreadedDebugDLL\"}.get(self._settings.get_safe(\"compiler.runtime\"), \"\")\n\n        if self.build_env:\n            # Take the flags from the build env, the user was able to alter them if needed\n            flags = self.build_env.flags\n            flags.append(self.build_env.std)\n        else:  # To be removed when build_sln_command is deprecated\n            flags = vs_build_type_flags(self._settings)\n            flags.append(vs_std_cpp(self._settings))\n\n        template = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n    <Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n      <ItemDefinitionGroup>\n        <ClCompile>\n          <RuntimeLibrary>{runtime}</RuntimeLibrary>\n          <AdditionalOptions>{compiler_flags} %(AdditionalOptions)</AdditionalOptions>\n        </ClCompile>\n      </ItemDefinitionGroup>\n    </Project>\"\"\".format(**{\"runtime\": runtime_library,\n                            \"compiler_flags\": \" \".join([flag for flag in flags if flag])})\n        return template\n", "path": "conans/client/build/msbuild.py"}], "after_files": [{"content": "import re\n\nfrom conans import tools\nfrom conans.client.build.visual_environment import (VisualStudioBuildEnvironment,\n                                                    vs_build_type_flags, vs_std_cpp)\nfrom conans.client.tools.oss import cpu_count\nfrom conans.client.tools.win import vcvars_command\nfrom conans.errors import ConanException\nfrom conans.util.env_reader import get_env\nfrom conans.util.files import tmp_file\nfrom conans.model.conan_file import ConanFile\n\n\nclass MSBuild(object):\n\n    def __init__(self, conanfile):\n        if isinstance(conanfile, ConanFile):\n            self._conanfile = conanfile\n            self._settings = self._conanfile.settings\n            self._output = self._conanfile.output\n            self.build_env = VisualStudioBuildEnvironment(self._conanfile)\n        else:  # backwards compatible with build_sln_command\n            self._settings = conanfile\n            self.build_env = None\n\n    def build(self, project_file, targets=None, upgrade_project=True, build_type=None, arch=None,\n              parallel=True, force_vcvars=False, toolset=None, platforms=None, use_env=True):\n        with tools.environment_append(self.build_env.vars):\n            # Path for custom properties file\n            props_file_contents = self._get_props_file_contents()\n            with tmp_file(props_file_contents) as props_file_path:\n                vcvars = vcvars_command(self._conanfile.settings, force=force_vcvars)\n                command = self.get_command(project_file, props_file_path,\n                                           targets=targets, upgrade_project=upgrade_project,\n                                           build_type=build_type, arch=arch, parallel=parallel,\n                                           toolset=toolset, platforms=platforms,\n                                           use_env=use_env)\n                command = \"%s && %s\" % (vcvars, command)\n                return self._conanfile.run(command)\n\n    def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,\n                    build_type=None, arch=None, parallel=True, toolset=None, platforms=None,\n                    use_env=False):\n\n        targets = targets or []\n        command = []\n\n        if upgrade_project and not get_env(\"CONAN_SKIP_VS_PROJECTS_UPGRADE\", False):\n            command.append(\"devenv %s /upgrade &&\" % project_file)\n        else:\n            self._output.info(\"Skipped sln project upgrade\")\n\n        build_type = build_type or self._settings.get_safe(\"build_type\")\n        arch = arch or self._settings.get_safe(\"arch\")\n        if not build_type:\n            raise ConanException(\"Cannot build_sln_command, build_type not defined\")\n        if not arch:\n            raise ConanException(\"Cannot build_sln_command, arch not defined\")\n\n        command.append(\"msbuild %s /p:Configuration=%s\" % (project_file, build_type))\n        msvc_arch = {'x86': 'x86',\n                     'x86_64': 'x64',\n                     'armv7': 'ARM',\n                     'armv8': 'ARM64'}\n        if platforms:\n            msvc_arch.update(platforms)\n        msvc_arch = msvc_arch.get(str(arch))\n        try:\n            sln = tools.load(project_file)\n            pattern = re.compile(r\"GlobalSection\\(SolutionConfigurationPlatforms\\)\"\n                                 r\"(.*?)EndGlobalSection\", re.DOTALL)\n            solution_global = pattern.search(sln).group(1)\n            lines = solution_global.splitlines()\n            lines = [s.split(\"=\")[0].strip() for s in lines]\n        except Exception:\n            pass\n        else:\n            config = \"%s|%s\" % (build_type, msvc_arch)\n            if config not in \"\".join(lines):\n                self._output.warn(\"***** The configuration %s does not exist in this solution *****\" % config)\n                self._output.warn(\"Use 'platforms' argument to define your architectures\")\n\n        if use_env:\n            command.append('/p:UseEnv=true')\n\n        if msvc_arch:\n            command.append('/p:Platform=\"%s\"' % msvc_arch)\n\n        if parallel:\n            command.append('/m:%s' % cpu_count())\n\n        if targets:\n            command.append(\"/target:%s\" % \";\".join(targets))\n\n        if toolset:\n            command.append(\"/p:PlatformToolset=%s\" % toolset)\n\n        if props_file_path:\n            command.append('/p:ForceImportBeforeCppTargets=\"%s\"' % props_file_path)\n\n        return \" \".join(command)\n\n    def _get_props_file_contents(self):\n        # how to specify runtime in command line:\n        # https://stackoverflow.com/questions/38840332/msbuild-overrides-properties-while-building-vc-project\n        runtime_library = {\"MT\": \"MultiThreaded\",\n                           \"MTd\": \"MultiThreadedDebug\",\n                           \"MD\": \"MultiThreadedDLL\",\n                           \"MDd\": \"MultiThreadedDebugDLL\"}.get(self._settings.get_safe(\"compiler.runtime\"), \"\")\n\n        if self.build_env:\n            # Take the flags from the build env, the user was able to alter them if needed\n            flags = self.build_env.flags\n            flags.append(self.build_env.std)\n        else:  # To be removed when build_sln_command is deprecated\n            flags = vs_build_type_flags(self._settings)\n            flags.append(vs_std_cpp(self._settings))\n\n        template = \"\"\"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n    <Project xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n      <ItemDefinitionGroup>\n        <ClCompile>\n          <RuntimeLibrary>{runtime}</RuntimeLibrary>\n          <AdditionalOptions>{compiler_flags} %(AdditionalOptions)</AdditionalOptions>\n        </ClCompile>\n      </ItemDefinitionGroup>\n    </Project>\"\"\".format(**{\"runtime\": runtime_library,\n                            \"compiler_flags\": \" \".join([flag for flag in flags if flag])})\n        return template\n", "path": "conans/client/build/msbuild.py"}]}