提交 3c9b1450 编写于 作者: J Jason Malinowski

Merge pull request #8176 from jasonmalinowski/fix-finding-of-default.win32manifest

Pass Version46 to ToolLocationHelper to find default.win32manifest
...@@ -984,7 +984,18 @@ string win32Manifest ...@@ -984,7 +984,18 @@ string win32Manifest
string pathToDefaultManifest = ToolLocationHelper.GetPathToDotNetFrameworkFile string pathToDefaultManifest = ToolLocationHelper.GetPathToDotNetFrameworkFile
( (
"default.win32manifest", "default.win32manifest",
TargetDotNetFrameworkVersion.VersionLatest
// We are choosing to pass Version46 instead of VersionLatest. TargetDotNetFrameworkVersion
// is an enum, and VersionLatest is not some sentinel value but rather a constant that is
// equal to the highest version defined in the enum. Enum values, being constants, are baked
// into consuming assembly, so specifying VersionLatest means not the latest version wherever
// this code is running, but rather the latest version of the framework according to the
// reference assembly with which this assembly was built. As of this writing, we are building
// our bits on machines with Visual Studio 2015 that know about 4.6.1, so specifying
// VersionLatest would bake in the enum value for 4.6.1. But we need to run on machines with
// MSBuild that only know about Version46 (and no higher), so VersionLatest will fail there.
// Explicitly passing Version46 prevents this problem.
TargetDotNetFrameworkVersion.Version46
); );
if (null == pathToDefaultManifest) if (null == pathToDefaultManifest)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册