From 7872c62cc9ba1111faeb197a6bd4ef6ea3ff2613 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 15 May 2020 09:37:40 -0700 Subject: [PATCH 1/5] Refactoring expander test assertions --- .../Evaluation/Expander_Tests.cs | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/src/Build.UnitTests/Evaluation/Expander_Tests.cs b/src/Build.UnitTests/Evaluation/Expander_Tests.cs index 3dfc11a9f97..0dc7e7229cf 100644 --- a/src/Build.UnitTests/Evaluation/Expander_Tests.cs +++ b/src/Build.UnitTests/Evaluation/Expander_Tests.cs @@ -2800,34 +2800,23 @@ public void PropertyFunctionVersionComparisonsFailsWithInvalidArguments(string b var expander = new Expander(pg, FileSystems.Default); string expectedMessage = ResourceUtilities.GetResourceString("InvalidVersionFormat"); - AssertThrows($"$([MSBuild]::VersionGreaterThan('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionGreaterThan('1.0.0', '{badVersion}'))"); + AssertThrows(expander, $"$([MSBuild]::VersionGreaterThan('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionGreaterThan('1.0.0', '{badVersion}'))", expectedMessage); - AssertThrows($"$([MSBuild]::VersionGreaterThanOrEquals('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionGreaterThanOrEquals('1.0.0', '{badVersion}'))"); + AssertThrows(expander, $"$([MSBuild]::VersionGreaterThanOrEquals('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionGreaterThanOrEquals('1.0.0', '{badVersion}'))", expectedMessage); - AssertThrows($"$([MSBuild]::VersionLessThan('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionLessThan('1.0.0', '{badVersion}'))"); + AssertThrows(expander, $"$([MSBuild]::VersionLessThan('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionLessThan('1.0.0', '{badVersion}'))", expectedMessage); - AssertThrows($"$([MSBuild]::VersionLessThanOrEquals('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionLessThanOrEquals('1.0.0', '{badVersion}'))"); + AssertThrows(expander, $"$([MSBuild]::VersionLessThanOrEquals('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionLessThanOrEquals('1.0.0', '{badVersion}'))", expectedMessage); - AssertThrows($"$([MSBuild]::VersionEquals('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionEquals('1.0.0', '{badVersion}'))"); + AssertThrows(expander, $"$([MSBuild]::VersionEquals('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionEquals('1.0.0', '{badVersion}'))", expectedMessage); - AssertThrows($"$([MSBuild]::VersionNotEquals('{badVersion}', '1.0.0'))"); - AssertThrows($"$([MSBuild]::VersionNotEquals('1.0.0', '{badVersion}'))"); - - void AssertThrows(string expression) - { - var ex = Assert.Throws( - () => expander.ExpandPropertiesLeaveTypedAndEscaped( - expression, - ExpanderOptions.ExpandProperties, - MockElementLocation.Instance)); - - Assert.Contains(expectedMessage, ex.Message); - } + AssertThrows(expander, $"$([MSBuild]::VersionNotEquals('{badVersion}', '1.0.0'))", expectedMessage); + AssertThrows(expander, $"$([MSBuild]::VersionNotEquals('1.0.0', '{badVersion}'))", expectedMessage); } [Theory] @@ -2843,22 +2832,33 @@ public void PropertyFunctionVersionComparisons(string a, string b, int expectedS var pg = new PropertyDictionary(); var expander = new Expander(pg, FileSystems.Default); - AssertSuccess(expectedSign > 0, $"$([MSBuild]::VersionGreaterThan('{a}', '{b}'))"); - AssertSuccess(expectedSign >= 0, $"$([MSBuild]::VersionGreaterThanOrEquals('{a}', '{b}'))"); - AssertSuccess(expectedSign < 0, $"$([MSBuild]::VersionLessThan('{a}', '{b}'))"); - AssertSuccess(expectedSign <= 0, $"$([MSBuild]::VersionLessThanOrEquals('{a}', '{b}'))"); - AssertSuccess(expectedSign == 0, $"$([MSBuild]::VersionEquals('{a}', '{b}'))"); - AssertSuccess(expectedSign != 0, $"$([MSBuild]::VersionNotEquals('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign > 0, $"$([MSBuild]::VersionGreaterThan('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign >= 0, $"$([MSBuild]::VersionGreaterThanOrEquals('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign < 0, $"$([MSBuild]::VersionLessThan('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign <= 0, $"$([MSBuild]::VersionLessThanOrEquals('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign == 0, $"$([MSBuild]::VersionEquals('{a}', '{b}'))"); + AssertSuccess(expander, expectedSign != 0, $"$([MSBuild]::VersionNotEquals('{a}', '{b}'))"); + } - void AssertSuccess(bool expected, string expression) - { - bool actual = (bool)expander.ExpandPropertiesLeaveTypedAndEscaped( + private void AssertThrows(Expander expander, string expression, string expectedMessage) + { + var ex = Assert.Throws( + () => expander.ExpandPropertiesLeaveTypedAndEscaped( expression, ExpanderOptions.ExpandProperties, - MockElementLocation.Instance); + MockElementLocation.Instance)); - Assert.Equal(expected, actual); - } + Assert.Contains(expectedMessage, ex.Message); + } + + private void AssertSuccess(Expander expander, object expected, string expression) + { + var actual = expander.ExpandPropertiesLeaveTypedAndEscaped( + expression, + ExpanderOptions.ExpandProperties, + MockElementLocation.Instance); + + Assert.Equal(expected, actual); } /// From 89578b609cb1b3f83fc48d26771f97c1aae1c992 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 15 May 2020 09:38:34 -0700 Subject: [PATCH 2/5] Adding target framework intrinsic functions --- eng/Packages.props | 1 + .../Evaluation/Expander_Tests.cs | 31 +++++++++++++++++++ src/Build/Evaluation/Expander.cs | 24 ++++++++++++++ src/Build/Evaluation/IntrinsicFunctions.cs | 16 ++++++++++ src/Build/Microsoft.Build.csproj | 1 + 5 files changed, 73 insertions(+) diff --git a/eng/Packages.props b/eng/Packages.props index baec54fee41..9e330c75068 100644 --- a/eng/Packages.props +++ b/eng/Packages.props @@ -18,6 +18,7 @@ + diff --git a/src/Build.UnitTests/Evaluation/Expander_Tests.cs b/src/Build.UnitTests/Evaluation/Expander_Tests.cs index 0dc7e7229cf..fefc44a0276 100644 --- a/src/Build.UnitTests/Evaluation/Expander_Tests.cs +++ b/src/Build.UnitTests/Evaluation/Expander_Tests.cs @@ -2840,6 +2840,37 @@ public void PropertyFunctionVersionComparisons(string a, string b, int expectedS AssertSuccess(expander, expectedSign != 0, $"$([MSBuild]::VersionNotEquals('{a}', '{b}'))"); } + [Theory] + [InlineData("net45", ".NETFramework", "4.5")] + [InlineData("netcoreapp3.1", ".NETCoreApp", "3.1")] + [InlineData("netstandard2.1", ".NETStandard", "2.1")] + [InlineData("foo", "Unsupported", "0.0")] + public void PropertyFunctionTargetFrameworkParsing(string tfm, string expectedIdentifier, string expectedVersion) + { + var pg = new PropertyDictionary(); + var expander = new Expander(pg, FileSystems.Default); + + AssertSuccess(expander, expectedIdentifier, $"$([MSBuild]::GetTargetFrameworkIdentifier('{tfm}'))"); + AssertSuccess(expander, expectedVersion, $"$([MSBuild]::GetTargetFrameworkVersion('{tfm}'))"); + } + + [Theory] + [InlineData("net5.0", "net5.0", true)] + [InlineData("net45", "net46", false)] + [InlineData("net46", "net45", true)] + [InlineData("netcoreapp3.1", "netcoreapp1.0", true)] + [InlineData("netstandard1.6", "netstandard2.1", false)] + [InlineData("netcoreapp3.0", "netstandard2.1", true)] + [InlineData("net461", "netstandard1.0", true)] + [InlineData("foo", "netstandard1.0", false)] + public void PropertyFunctionTargetFrameworkComparisons(string tfm1, string tfm2, bool expectedFrameworkCompatible) + { + var pg = new PropertyDictionary(); + var expander = new Expander(pg, FileSystems.Default); + + AssertSuccess(expander, expectedFrameworkCompatible, $"$([MSBuild]::IsTargetFrameworkCompatible('{tfm1}', '{tfm2}'))"); + } + private void AssertThrows(Expander expander, string expression, string expectedMessage) { var ex = Assert.Throws( diff --git a/src/Build/Evaluation/Expander.cs b/src/Build/Evaluation/Expander.cs index f242a066e03..ecbea81ad2e 100644 --- a/src/Build/Evaluation/Expander.cs +++ b/src/Build/Evaluation/Expander.cs @@ -3913,6 +3913,30 @@ private bool TryExecuteWellKnownFunction(out object returnVal, object objectInst return true; } } + else if (string.Equals(_methodMethodName, nameof(IntrinsicFunctions.GetTargetFrameworkIdentifier), StringComparison.OrdinalIgnoreCase)) + { + if (TryGetArg(args, out string arg0)) + { + returnVal = IntrinsicFunctions.GetTargetFrameworkIdentifier(arg0); + return true; + } + } + else if (string.Equals(_methodMethodName, nameof(IntrinsicFunctions.GetTargetFrameworkVersion), StringComparison.OrdinalIgnoreCase)) + { + if (TryGetArg(args, out string arg0)) + { + returnVal = IntrinsicFunctions.GetTargetFrameworkVersion(arg0); + return true; + } + } + else if (string.Equals(_methodMethodName, nameof(IntrinsicFunctions.IsTargetFrameworkCompatible), StringComparison.OrdinalIgnoreCase)) + { + if (TryGetArgs(args, out string arg0, out string arg1)) + { + returnVal = IntrinsicFunctions.IsTargetFrameworkCompatible(arg0, arg1); + return true; + } + } } else if (_receiverType == typeof(Path)) { diff --git a/src/Build/Evaluation/IntrinsicFunctions.cs b/src/Build/Evaluation/IntrinsicFunctions.cs index e532306e5c2..63e5b33b2a9 100644 --- a/src/Build/Evaluation/IntrinsicFunctions.cs +++ b/src/Build/Evaluation/IntrinsicFunctions.cs @@ -14,6 +14,7 @@ using Microsoft.Build.Shared.FileSystem; using Microsoft.Build.Utilities; using Microsoft.Win32; +using NuGet.Frameworks; // Needed for DoesTaskHostExistForParameters using NodeProviderOutOfProcTaskHost = Microsoft.Build.BackEnd.NodeProviderOutOfProcTaskHost; @@ -480,6 +481,21 @@ internal static bool VersionLessThanOrEquals(string a, string b) return SimpleVersion.Parse(a) <= SimpleVersion.Parse(b); } + internal static string GetTargetFrameworkIdentifier(string tfm) + { + return NuGetFramework.Parse(tfm).Framework; + } + + internal static string GetTargetFrameworkVersion(string tfm) + { + return NuGetFramework.Parse(tfm).Version.ToString(2); + } + + internal static bool IsTargetFrameworkCompatible(string tfm1, string tfm2) + { + return NuGetFrameworkUtility.IsCompatibleWithFallbackCheck(NuGetFramework.Parse(tfm1), NuGetFramework.Parse(tfm2)); + } + public static string GetCurrentToolsDirectory() { return BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory; diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index aa55562d5a5..5c06e38419a 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -34,6 +34,7 @@ + From 80abdc96c8c962bebc3c015df74c062d3980ea6f Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Thu, 16 Apr 2020 13:36:31 -0700 Subject: [PATCH 3/5] Updating NuGet.Frameworks reference to use reflection --- eng/Packages.props | 1 - eng/TestMSBuild.targets | 14 +++++++++ ...Microsoft.Build.Engine.OM.UnitTests.csproj | 3 ++ .../Microsoft.Build.Engine.UnitTests.csproj | 3 ++ src/Build/Evaluation/IntrinsicFunctions.cs | 29 ++++++++++++++++--- src/Build/Microsoft.Build.csproj | 1 - ...crosoft.Build.CommandLine.UnitTests.csproj | 2 ++ .../Microsoft.Build.Tasks.UnitTests.csproj | 3 ++ ...Microsoft.Build.Utilities.UnitTests.csproj | 2 ++ 9 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 eng/TestMSBuild.targets diff --git a/eng/Packages.props b/eng/Packages.props index 9e330c75068..baec54fee41 100644 --- a/eng/Packages.props +++ b/eng/Packages.props @@ -18,7 +18,6 @@ - diff --git a/eng/TestMSBuild.targets b/eng/TestMSBuild.targets new file mode 100644 index 00000000000..6aabfdcc808 --- /dev/null +++ b/eng/TestMSBuild.targets @@ -0,0 +1,14 @@ + + + + + <_NuGetDependencies Include="$(RepoRoot).dotnet\sdk\$(DotNetCliVersion)\Sdks\Microsoft.NET.Sdk\tools\net472\NuGet.Frameworks.dll" /> + + + + + + diff --git a/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj b/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj index 0dc21b3faf8..adc3d5f0317 100644 --- a/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj +++ b/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj @@ -115,4 +115,7 @@ + + + diff --git a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj index 5806db2d3e6..4f6809c1bb5 100644 --- a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj +++ b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj @@ -157,4 +157,7 @@ + + + diff --git a/src/Build/Evaluation/IntrinsicFunctions.cs b/src/Build/Evaluation/IntrinsicFunctions.cs index 63e5b33b2a9..eec8d939770 100644 --- a/src/Build/Evaluation/IntrinsicFunctions.cs +++ b/src/Build/Evaluation/IntrinsicFunctions.cs @@ -14,7 +14,6 @@ using Microsoft.Build.Shared.FileSystem; using Microsoft.Build.Utilities; using Microsoft.Win32; -using NuGet.Frameworks; // Needed for DoesTaskHostExistForParameters using NodeProviderOutOfProcTaskHost = Microsoft.Build.BackEnd.NodeProviderOutOfProcTaskHost; @@ -33,6 +32,23 @@ internal static class IntrinsicFunctions private static readonly Lazy RegistrySdkRegex = new Lazy(() => new Regex(@"^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v(\d+\.\d+)$", RegexOptions.IgnoreCase)); #endif // FEATURE_WIN32_REGISTRY + /// + /// Resolve the location of the NuGet.Frameworks assembly + /// + private static Assembly GetNuGetAssembly() + { + var assemblyDirectory = IsRunningFromVisualStudio() ? + Path.Combine(GetVsInstallRoot(), "Common7", "IDE", "CommonExtensions", "Microsoft", "NuGet") : + BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory; + return Assembly.LoadFile(Path.Combine(assemblyDirectory, "NuGet.Frameworks.dll")); + } + + /// + /// NuGet Types + /// + private static Type NuGetFramework = GetNuGetAssembly().GetType("NuGet.Frameworks.NuGetFramework"); + private static Type NuGetFrameworkUtility = GetNuGetAssembly().GetType("NuGet.Frameworks.NuGetFrameworkUtility"); + /// /// Add two doubles /// @@ -481,19 +497,24 @@ internal static bool VersionLessThanOrEquals(string a, string b) return SimpleVersion.Parse(a) <= SimpleVersion.Parse(b); } + private static object ParseNuGetFramework(string tfm) + { + return NuGetFramework.GetMethod("Parse", new Type[] { typeof(string) }).Invoke(null, new object[] { tfm }); + } + internal static string GetTargetFrameworkIdentifier(string tfm) { - return NuGetFramework.Parse(tfm).Framework; + return NuGetFramework.GetProperty("Framework").GetValue(ParseNuGetFramework(tfm)) as string; } internal static string GetTargetFrameworkVersion(string tfm) { - return NuGetFramework.Parse(tfm).Version.ToString(2); + return (NuGetFramework.GetProperty("Version").GetValue(ParseNuGetFramework(tfm)) as Version).ToString(2); } internal static bool IsTargetFrameworkCompatible(string tfm1, string tfm2) { - return NuGetFrameworkUtility.IsCompatibleWithFallbackCheck(NuGetFramework.Parse(tfm1), NuGetFramework.Parse(tfm2)); + return Convert.ToBoolean(NuGetFrameworkUtility.GetMethod("IsCompatibleWithFallbackCheck").Invoke(null, new object[] { ParseNuGetFramework(tfm1), ParseNuGetFramework(tfm2) })); } public static string GetCurrentToolsDirectory() diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index 5c06e38419a..aa55562d5a5 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -34,7 +34,6 @@ - diff --git a/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj b/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj index be9203b581a..263dc6997c5 100644 --- a/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj +++ b/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj @@ -74,4 +74,6 @@ + + diff --git a/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj b/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj index a19d99dc303..758ea544fb5 100644 --- a/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj +++ b/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj @@ -143,4 +143,7 @@ PreserveNewest + + + diff --git a/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj b/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj index b560f1b1455..261cd33ac51 100644 --- a/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj +++ b/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj @@ -59,4 +59,6 @@ + + \ No newline at end of file From 6258784fb1f22bcd3d4fbbc1aadde77fc27270a9 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 15 May 2020 09:45:11 -0700 Subject: [PATCH 4/5] Target framework intrinsic functions PR feedback --- eng/Packages.props | 1 + eng/TestMSBuild.targets | 14 - ...Microsoft.Build.Engine.OM.UnitTests.csproj | 3 - .../Microsoft.Build.Engine.UnitTests.csproj | 8 +- src/Build/Evaluation/IntrinsicFunctions.cs | 30 +- src/Build/Microsoft.Build.csproj | 1 + src/Build/Resources/Strings.resx | 1082 ++++++++--------- src/Build/Resources/xlf/Strings.cs.xlf | 9 +- src/Build/Resources/xlf/Strings.de.xlf | 9 +- src/Build/Resources/xlf/Strings.en.xlf | 9 +- src/Build/Resources/xlf/Strings.es.xlf | 9 +- src/Build/Resources/xlf/Strings.fr.xlf | 9 +- src/Build/Resources/xlf/Strings.it.xlf | 9 +- src/Build/Resources/xlf/Strings.ja.xlf | 9 +- src/Build/Resources/xlf/Strings.ko.xlf | 9 +- src/Build/Resources/xlf/Strings.pl.xlf | 9 +- src/Build/Resources/xlf/Strings.pt-BR.xlf | 9 +- src/Build/Resources/xlf/Strings.ru.xlf | 9 +- src/Build/Resources/xlf/Strings.tr.xlf | 9 +- src/Build/Resources/xlf/Strings.zh-Hans.xlf | 9 +- src/Build/Resources/xlf/Strings.zh-Hant.xlf | 9 +- src/Build/Utilities/NuGetFrameworkWrapper.cs | 69 ++ ...crosoft.Build.CommandLine.UnitTests.csproj | 2 - .../Microsoft.Build.Tasks.UnitTests.csproj | 3 - ...Microsoft.Build.Utilities.UnitTests.csproj | 2 - 25 files changed, 689 insertions(+), 652 deletions(-) delete mode 100644 eng/TestMSBuild.targets create mode 100644 src/Build/Utilities/NuGetFrameworkWrapper.cs diff --git a/eng/Packages.props b/eng/Packages.props index baec54fee41..9e330c75068 100644 --- a/eng/Packages.props +++ b/eng/Packages.props @@ -18,6 +18,7 @@ + diff --git a/eng/TestMSBuild.targets b/eng/TestMSBuild.targets deleted file mode 100644 index 6aabfdcc808..00000000000 --- a/eng/TestMSBuild.targets +++ /dev/null @@ -1,14 +0,0 @@ - - - - - <_NuGetDependencies Include="$(RepoRoot).dotnet\sdk\$(DotNetCliVersion)\Sdks\Microsoft.NET.Sdk\tools\net472\NuGet.Frameworks.dll" /> - - - - - - diff --git a/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj b/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj index adc3d5f0317..0dc21b3faf8 100644 --- a/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj +++ b/src/Build.OM.UnitTests/Microsoft.Build.Engine.OM.UnitTests.csproj @@ -115,7 +115,4 @@ - - - diff --git a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj index 4f6809c1bb5..c36a51b66b8 100644 --- a/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj +++ b/src/Build.UnitTests/Microsoft.Build.Engine.UnitTests.csproj @@ -11,12 +11,17 @@ $(DefineConstants);NO_MSBUILDTASKHOST + + true + + all + @@ -157,7 +162,4 @@ - - - diff --git a/src/Build/Evaluation/IntrinsicFunctions.cs b/src/Build/Evaluation/IntrinsicFunctions.cs index eec8d939770..e84bddbe99c 100644 --- a/src/Build/Evaluation/IntrinsicFunctions.cs +++ b/src/Build/Evaluation/IntrinsicFunctions.cs @@ -4,8 +4,6 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Reflection; using System.Runtime.InteropServices; using System.Text.RegularExpressions; @@ -32,22 +30,7 @@ internal static class IntrinsicFunctions private static readonly Lazy RegistrySdkRegex = new Lazy(() => new Regex(@"^HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Microsoft SDKs\\Windows\\v(\d+\.\d+)$", RegexOptions.IgnoreCase)); #endif // FEATURE_WIN32_REGISTRY - /// - /// Resolve the location of the NuGet.Frameworks assembly - /// - private static Assembly GetNuGetAssembly() - { - var assemblyDirectory = IsRunningFromVisualStudio() ? - Path.Combine(GetVsInstallRoot(), "Common7", "IDE", "CommonExtensions", "Microsoft", "NuGet") : - BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory; - return Assembly.LoadFile(Path.Combine(assemblyDirectory, "NuGet.Frameworks.dll")); - } - - /// - /// NuGet Types - /// - private static Type NuGetFramework = GetNuGetAssembly().GetType("NuGet.Frameworks.NuGetFramework"); - private static Type NuGetFrameworkUtility = GetNuGetAssembly().GetType("NuGet.Frameworks.NuGetFrameworkUtility"); + private static readonly Lazy NuGetFramework = new Lazy(() => new NuGetFrameworkWrapper()); /// /// Add two doubles @@ -497,24 +480,19 @@ internal static bool VersionLessThanOrEquals(string a, string b) return SimpleVersion.Parse(a) <= SimpleVersion.Parse(b); } - private static object ParseNuGetFramework(string tfm) - { - return NuGetFramework.GetMethod("Parse", new Type[] { typeof(string) }).Invoke(null, new object[] { tfm }); - } - internal static string GetTargetFrameworkIdentifier(string tfm) { - return NuGetFramework.GetProperty("Framework").GetValue(ParseNuGetFramework(tfm)) as string; + return NuGetFramework.Value.GetTargetFrameworkIdentifier(tfm); } internal static string GetTargetFrameworkVersion(string tfm) { - return (NuGetFramework.GetProperty("Version").GetValue(ParseNuGetFramework(tfm)) as Version).ToString(2); + return NuGetFramework.Value.GetTargetFrameworkVersion(tfm); } internal static bool IsTargetFrameworkCompatible(string tfm1, string tfm2) { - return Convert.ToBoolean(NuGetFrameworkUtility.GetMethod("IsCompatibleWithFallbackCheck").Invoke(null, new object[] { ParseNuGetFramework(tfm1), ParseNuGetFramework(tfm2) })); + return NuGetFramework.Value.IsCompatible(tfm1, tfm2); } public static string GetCurrentToolsDirectory() diff --git a/src/Build/Microsoft.Build.csproj b/src/Build/Microsoft.Build.csproj index aa55562d5a5..d8ea0d8c500 100644 --- a/src/Build/Microsoft.Build.csproj +++ b/src/Build/Microsoft.Build.csproj @@ -157,6 +157,7 @@ + diff --git a/src/Build/Resources/Strings.resx b/src/Build/Resources/Strings.resx index d609f327a2f..02e477695b4 100644 --- a/src/Build/Resources/Strings.resx +++ b/src/Build/Resources/Strings.resx @@ -1,6 +1,66 @@  + + @@ -9,9 +69,16 @@ - + + + + + + + + @@ -20,11 +87,10 @@ - - - - - + + + + @@ -38,13 +104,6 @@ - - - - - - - text/microsoft-resx @@ -53,214 +112,214 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + MSB4001: The "{0}" task has more than one parameter called "{1}". {StrBegin="MSB4001: "}UE: This message is shown when a task has more than one .NET property with the same name -- it's unclear which of those properties the task wants to use as a parameter in project files. - + MSB4002: There was a failure retrieving the attributes for parameters in the "{0}" task. {1} {StrBegin="MSB4002: "}UE: This message is shown when the .NET attributes that a task's .NET properties are decorated with, cannot be retrieved -- this is typically because the .NET classes that define the .NET attributes cannot be loaded because the assembly they are defined in cannot be found, or the classes themselves cannot be found. - + MSB4003: "{0}" is a reserved attribute of the <{1}> element, and must be spelled with the correct casing. This attribute cannot be used as a parameter to the "{2}" task. {StrBegin="MSB4003: "}UE: Tasks are not allowed to use incorrect case for reserved attributes on the task nodes e.g. "continueonerror" instead of the "ContinueOnError". - + The operation cannot be completed because a build is already in progress. - + The operation cannot be completed because BeginBuild has not yet been called. - + The operation cannot be completed because EndBuild has already been called but existing submissions have not yet completed. - + The operation cannot be completed because the submission has already been executed. - + Cannot dispose the build manager because it is not idle. - + MSB4197: Build was canceled. {0} {StrBegin="MSB4197: "} Error when the build stops suddenly for some reason. For example, because a child node died. - + Build FAILED. - + Build succeeded. - + Build started {0}. - + Building target "{0}" completely. {0} is the name of the target. - + No input files were specified. - + Input file "{0}" is newer than output file "{1}". {0} and {1} are filenames on disk. - + Output file "{0}" does not exist. {0} is a filename on disk. - + Input file "{0}" does not exist. {0} is a filename on disk. - + Building target "{0}" partially, because some output files are out of date with respect to their input files. {0} is the name of the target. - + [{0}: Input={1}, Output={2}] Input file is newer than output file. {0} is the name of an MSBuild item. {1} and {2} are filenames on disk. - + [{0}: Input={1}, Output={2}] Output file does not exist. {0} is the name of an MSBuild item. {1} and {2} are filenames on disk. - + [{0}: Input={1}, Output={2}] Input file does not exist. {0} is the name of an MSBuild item. {1} and {2} are filenames on disk. - + The attribute "{0}" is a known MSBuild attribute, and cannot be accessed using this method. - + MSB4023: Cannot evaluate the item metadata "%({0})". {1} {StrBegin="MSB4023: "}UE: This message is shown when the value of an item metadata cannot be computed for some reason e.g. trying to apply %(RootDir) to an item-spec that's not a valid path, would result in this error. LOCALIZATION: "{1}" is a localized message explaining the problem. - + MSB4248: Cannot expand metadata in expression "{0}". {1} {StrBegin="MSB4248: "}UE: This message is shown when metadata cannot be expanded in an expression for some reason e.g. trying to apply %(RootDir) to an item-spec that's not a valid path would result in this error. LOCALIZATION: "{1}" is a localized message explaining the problem. - + MSB4193: MSBuild.exe could not be launched as a child node as it could not be found at the location "{0}". If necessary, specify the correct location in the BuildParameters, or with the MSBUILD_EXE_PATH environment variable. {StrBegin="MSB4193: "} - + MSB4218: Failed to successfully launch or connect to a child MSBuild.exe process. Verify that the MSBuild.exe "{0}" launches successfully, and that it is loading the same microsoft.build.dll that the launching process loaded. If the location seems incorrect, try specifying the correct location in the BuildParameters object, or with the MSBUILD_EXE_PATH environment variable. {StrBegin="MSB4218: "} - + MSB4117: The "{0}" item name is reserved, and cannot be used. {StrBegin="MSB4117: "}UE: This message is shown when the user tries to redefine one of the reserved MSBuild items e.g. @(Choose) - + MSB4118: The "{0}" item metadata name is reserved, and cannot be used. {StrBegin="MSB4118: "}UE: This message is shown when the user tries to redefine one of the reserved MSBuild item metadata names e.g. %(FullPath). Only MSBuild can set those. - + MSB4004: The "{0}" property is reserved, and cannot be modified. {StrBegin="MSB4004: "}UE: This message is shown when the user tries to redefine one of the reserved MSBuild properties e.g. $(MSBuildProjectFile) - + MSB4094: "{0}" is an invalid value for the "{1}" parameter of the "{3}" task. Multiple items cannot be passed into a parameter of type "{2}". {StrBegin="MSB4094: "} UE: This error is shown when a project tries to pass multiple items into a task parameter of type ITaskItem (singular). - + MSB4115: The "{0}" function only accepts a scalar value, but its argument "{1}" evaluates to "{2}" which is not a scalar value. {StrBegin="MSB4115: "} UE: This error is shown when a project tries to pass multiple items into a function in a conditional expression, that can only accept a scalar value (such as the "exists()" function). - + MSB4095: The item metadata %({0}) is being referenced without an item name. Specify the item name by using %(itemname.{0}). {StrBegin="MSB4095: "} - + MSB4162: <{0}> is not valid. Child elements are not allowed below a item remove element. {StrBegin="MSB4162: "} - + MSB4166: Child node "{0}" exited prematurely. Shutting down. Diagnostic information may be found in files in "{1}" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.{2} {StrBegin="MSB4166: "} {2} is exception text if any - + MSB4085: A <Choose> must contain at least one <When>. {StrBegin="MSB4085: "} - + MSB4114: <Choose> elements cannot be nested more than {0} levels deep. {StrBegin="MSB4114: "}UE: This message appears if the project file contains unreasonably nested Choose elements. LOCALIZATION: Do not localize "Choose" as it is an XML element name. - + MSB4006: There is a circular dependency in the target dependency graph involving target "{0}". {StrBegin="MSB4006: "}UE: This message is shown when the build engine detects a target referenced in a circular manner -- a project cannot request a target to build itself (perhaps via a chain of other targets). - + MSB4086: A numeric comparison was attempted on "{1}" that evaluates to "{2}" instead of a number, in condition "{0}". {StrBegin="MSB4086: "} - + MSB4130: The condition "{0}" may have been evaluated incorrectly in an earlier version of MSBuild. Please verify that the order of the AND and OR clauses is written as intended. To avoid this warning, add parentheses to make the evaluation order explicit. {StrBegin="MSB4130: "} - + MSB4087: Specified condition "{0}" does not evaluate to a boolean. {StrBegin="MSB4087: "} - + MSB4113: Specified condition "{0}" evaluates to "{1}" instead of a boolean. {StrBegin="MSB4113: "} - + MSB4136: Error reading the toolset information from the configuration file "{0}". {1} {StrBegin="MSB4136: "} - + MSB4142: MSBuildToolsPath is not the same as MSBuildBinPath for the ToolsVersion "{0}" defined at "{1}". If both are present they must have the same value. {StrBegin="MSB4142: "} - + MSB4009: The default tasks file could not be successfully loaded. {0} {StrBegin="MSB4009: "}UE: This message is shown when one of the default tasks file (*.tasks) located alongside the MSBuild binaries cannot be opened/parsed. "{0}" contains a message explaining why. The filename itself is not part of the message but is provided separately to loggers. LOCALIZATION: "{0}" is a message from some FX method and is already localized. - + MSB4010: The "{0}" files could not be successfully loaded from their expected location "{1}". Default tasks will not be available. {2} {StrBegin="MSB4010: "}UE: This message is shown when the default tasks files that are located alongside the MSBuild binaries cannot be found, either because they don't exist, or because of lack of permissions. "{2}" contains a message explaining why. LOCALIZATION: "{2}" is a message from some FX method and is already localized. - + Importing the file "{0}" into the file "{1}" results in a circular dependency. {0} is a file imported into the file "{1}" such that it results in a circular dependency. For e.g. if t1.targets imports t2.targets and t2.targets tries to import t1.targets, then it results in a circular dependency. - - Search paths being used for {0} are {1} + + Search paths being used for {0} are {1} - - Trying to import {0} using extensions path {1} + + Trying to import {0} using extensions path {1} - + MSB4194: The override tasks file could not be successfully loaded. {0} {StrBegin="MSB4194: "}UE: This message is shown when one of the override tasks file (*.overridetasks) located alongside the MSBuild binaries cannot @@ -269,19 +328,19 @@ LOCALIZATION: "{0}" is a message from some FX method and is already localized. - + The override tasks path "{0}" must not be a relative path and must exist on disk. Default tasks will not be overridden. UE: This message is shown when the override tasks path in the registry or passed to the toolset is not a full path. - + A problem occurred loading the override tasks path "{0}". {1} UE: This message is shown when the override tasks path in the registry or passed to the toolset is not a full path. - + MSB4196: The "{0}" files could not be successfully loaded from their expected location "{1}". Default tasks will not be overridden. {2} {StrBegin="MSB4196: "}UE: This message is shown when the override tasks files that are located alongside the MSBuild binaries cannot be @@ -289,228 +348,228 @@ LOCALIZATION: "{2}" is a message from some FX method and is already localized. - + MSB4195: There was an error gathering properties for tasks file evaluation. {0} {StrBegin="MSB4195: "}UE: This message is shown when the gathering of properties for the evaluation of override and defaults tasks has an exception. "{0"} will be the exception message - + MSB4133: A default tools version "{0}" was specified, but its definition could not be found. {StrBegin="MSB4133: "} - + MSB4011: "{0}" cannot be imported again. It was already imported at "{1}". This is most likely a build authoring error. This subsequent import will be ignored. {2} {StrBegin="MSB4011: "} - + MSB4211: The property "{0}" is being set to a value for the first time, but it was already consumed at "{1}". {StrBegin="MSB4211: "} - + MSB4210: "{0}" is attempting to import itself, directly or indirectly. This is most likely a build authoring error. The import will be ignored. {StrBegin="MSB4210: "} - + MSB4079: The <ProjectExtensions> element occurs more than once. {StrBegin="MSB4079: "} - + MSB4012: The expression "{0}" cannot be used in this context. Item lists cannot be concatenated with other strings where an item list is expected. Use a semicolon to separate multiple item lists. {StrBegin="MSB4012: "}UE: This message is shown when the user does not properly specify an item list when an item list is expected e.g. "badprefix@(foo)badsuffix" instead of "prefix; @(foo); suffix" - + end of input This is the name of the "EndOfInput" token. It is displayed in quotes as the unexpected char or token when the end of a conditional was unexpectedly reached. - + The previous error was converted to a warning because the task was called with ContinueOnError=true. - + {0} Error(s) - + MSB4159: Error creating the toolset "{0}". {1} {StrBegin="MSB4159: "} - + MSB4146: Cannot evaluate the property expression "{0}" found at "{1}". {2} {StrBegin="MSB4146: "} - + The <{0}> tag is no longer supported as a child of the <Project> element. Place this tag within a target, and add the name of the target to the "InitialTargets" attribute of the <Project> element. - + Evaluation started ("{0}") - + Evaluation finished ("{0}") - + Launching task "{0}" from assembly "{1}" in an external task host with a runtime of "{2}" and a process architecture of "{3}". - + MSB4100: Expected "{0}" to evaluate to a boolean instead of "{1}", in condition "{2}". {StrBegin="MSB4100: "} - + MSB4028: The "{0}" task's outputs could not be retrieved from the "{1}" parameter. {2} {StrBegin="MSB4028: "} - + MSB4014: The build stopped unexpectedly because of an internal failure. {StrBegin="MSB4014: "}UE: This message is shown when an unhandled exception terminates the build. The cause is most likely a programming error in the build engine. - + MSB4015: The build stopped unexpectedly because the "{0}" logger failed unexpectedly during shutdown. {StrBegin="MSB4015: "}UE: This message is used for a special exception that is thrown when a logger fails while shutting down (most likely because of a programming error in the logger). When a logger dies, we cannot proceed with the build, and we throw a special exception to abort the build. - + MSB4016: The build stopped unexpectedly because the "{0}" logger failed unexpectedly during initialization. {StrBegin="MSB4016: "}UE: This message is used for a special exception that is thrown when a logger fails while initializing itself (most likely because of a programming error in the logger). When a logger dies, we cannot proceed with the build, and we throw a special exception to abort the build. - + MSB4017: The build stopped unexpectedly because of an unexpected logger failure. {StrBegin="MSB4017: "}UE: This message is used for a special exception that is thrown when a logger fails while logging an event (most likely because of a programming error in the logger). When a logger dies, we cannot proceed with the build, and we throw a special exception to abort the build. - + MSB4018: The "{0}" task failed unexpectedly. {StrBegin="MSB4018: "}UE: This message is shown when a task terminates because of an unhandled exception. The cause is most likely a programming error in the task; however, it is also possible that the unhandled exception originated in the engine, and was surfaced through the task when the task called into the engine. - + MSB4187: Failed to receive a response from the task thread in the timeout period "{0}" ms. Shutting down. {StrBegin="MSB4187: "} - + MSB4088: Condition "{0}" is improperly constructed. {StrBegin="MSB4088: "} - + MSB4105: Found an unexpected character '{2}' at position {1} in condition "{0}". Did you intend to use "=="? {StrBegin="MSB4105: "} - + MSB4106: Expected an item list at position {1} in condition "{0}". Did you forget the closing parenthesis? {StrBegin="MSB4106: "} - + MSB4107: Expected an item list at position {1} in condition "{0}". Did you forget the opening parenthesis after the '@'? To use a literal '@', use '%40' instead. {StrBegin="MSB4107: "} - + MSB4108: Expected an item list at position {1} in condition "{0}". Did you forget to close a quote inside the item list expression? {StrBegin="MSB4108: "} - + MSB4109: Expected a property at position {1} in condition "{0}". Did you forget the closing parenthesis? {StrBegin="MSB4109: "} - + MSB4110: Expected a property at position {1} in condition "{0}". Did you forget the opening parenthesis after the '$'? To use a literal '$', use '%24' instead. {StrBegin="MSB4110: "} - + MSB4101: Expected a closing quote after position {1} in condition "{0}". {StrBegin="MSB4101: "} - + MSB4019: The imported project "{0}" was not found. Confirm that the expression in the Import declaration "{1}" is correct, and that the file exists on disk. {StrBegin="MSB4019: "}LOCALIZATION: <Import> should not be localized. - + MSB4226: The imported project "{0}" was not found. Also, tried to find "{1}" in the fallback search path(s) for {2} - {3} . These search paths are defined in "{4}". Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. {StrBegin="MSB4226: "}LOCALIZATION: <Import> should not be localized. - + MSB4226: The imported project "{0}" was not found. Also, tried to find "{1}" in the fallback search path(s) for {2} - {3} . Confirm that the path in the <Import> declaration is correct, and that the file exists on disk in one of the search paths. {StrBegin="MSB4226: "}LOCALIZATION: <Import> should not be localized. - + MSB4089: Incorrect number of arguments to function in condition "{0}". Found {1} argument(s) when expecting {2}. {StrBegin="MSB4089: "} - + MSB4020: The value "{0}" of the "{1}" attribute in element <{2}> is invalid. {StrBegin="MSB4020: "}UE: This is a generic message that is displayed when we find a project element with an incorrect value for one of its attributes e.g. <Import Project=""> -- the value of Project should not be an empty string. - + MSB4111: At most one of the include, remove, and update attributes may be specified for an item element. - + MSB4102: The value "{0}" of the "{1}" attribute in element <{2}> is invalid. {3} {StrBegin="MSB4102: "}UE: This is a generic message that is displayed when we find a project element with an incorrect value for one of its attributes. At the end of the message we show the exception text we got trying to use the value. - + MSB4234: Invalid binary logger parameter(s): "{0}". Expected: ProjectImports={{None,Embed,ZipFile}} and/or [LogFile=]filePath.binlog (the log file name or path, must have the ".binlog" extension). - + MSB4021: The "ContinueOnError" attribute of the "{0}" task is not valid. {1} {StrBegin="MSB4021: "}LOCALIZATION: "ContinueOnError" should not be localized. "{1}" is a message from another exception explaining the problem. - + MSB4022: The result "{0}" of evaluating the value "{1}" of the "{2}" attribute in element <{3}> is not valid. {StrBegin="MSB4022: "}UE: This message is shown when the engine is checking the correctness of the value (after evaluating embedded properties/items) assigned to an XML attribute of an XML element in the project file. - + MSB4104: Failed to write to log file "{0}". {1} {StrBegin="MSB4104: "}UE: This is shown when the File Logger can't create or write to the file it was instructed to log to. - + MSB4024: The imported project file "{0}" could not be loaded. {1} {StrBegin="MSB4024: "}UE: This message is shown when an imported project file cannot be loaded because of incorrect XML. The project filename is not part of the message because it is provided separately to loggers. LOCALIZATION: {0} is a localized message from the CLR/FX explaining why the project is invalid. - + MSB4147: The property "{0}" at "{1}" is invalid. {2} {StrBegin="MSB4147: "} - + MSB4177: Invalid property. {0} {StrBegin="MSB4177: "} UE: {0} is a localized message indicating what the problem was. - + MSB4143: The registry expression "{0}" cannot be evaluated. {1} {StrBegin="MSB4143: "} UE: This message is shown when the user attempts to provide an expression like "$(Registry:HKEY_LOCAL_MACHINE\Software\Vendor\Tools@TaskLocation)" LOCALIZATION: "{0}" is the expression that was bad. "{1}" is a message from an FX exception that describes why the expression is bad. - + MSB4184: The expression "{0}" cannot be evaluated. {1} {StrBegin="MSB4184: "} Double quotes as the expression will typically have single quotes in it. - UE: This message is shown when the user attempts to provide an expression like "$(SomeProperty.ToLower())" or "@(Foo->Bar())" + UE: This message is shown when the user attempts to provide an expression like "$(SomeProperty.ToLower())" or "@(Foo->Bar())" LOCALIZATION: "{0}" is the expression that was bad. "{1}" is a message from an FX exception that describes why the expression is bad. - + The quotes were mismatched. This is a potential suffix to "InvalidFunctionPropertyExpression" so it has no error code. - + The parentheses were mismatched. This is a potential suffix to "InvalidFunctionPropertyExpression" so it has no error code. - + The square brackets were mismatched. This is a potential suffix to "InvalidFunctionPropertyExpression" so it has no error code. - + MSB4185: The function "{0}" on type "{1}" is not available for execution as an MSBuild property function. {StrBegin="MSB4185: "} @@ -518,7 +577,7 @@ LOCALIZATION: "{0}" is the static function name, "{1}" is the .NET Framework type name - + MSB4212: Invalid static method invocation syntax: "{0}". The type "{1}" is either not available for execution in an MSBuild property function or could not be found. {StrBegin="MSB4212: "} @@ -526,23 +585,23 @@ LOCALIZATION: "{0}" is the function expression which is in error. "{1}" is the .NET Framework type name - + MSB4186: Invalid static method invocation syntax: "{0}". {1} Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. {StrBegin="MSB4186: "} UE: This message is shown when the user attempts to call a static method on a type, but has used the incorrect syntax LOCALIZATION: "{0}" is the function expression which is in error. "{1}" is a message from an FX exception that describes why the expression is bad. - + MSB4198: The expression "{0}" cannot be evaluated on item "{1}". {2} {StrBegin="MSB4198: "} Double quotes as the expression will typically have single quotes in it. - UE: This message is shown when the user attempts to provide an expression like "@(SomeItem->DirectoryName())" + UE: This message is shown when the user attempts to provide an expression like "@(SomeItem->DirectoryName())" LOCALIZATION: "{0}" is the expression that was bad, "{1}" is the item or file that was being worked on. "{2}" is a message from an FX exception that describes why the expression is bad. - + MSB4199: Invalid transformation syntax "{0}". An item function was not found with that name and {1} parameters. {StrBegin="MSB4199: "} @@ -550,531 +609,510 @@ LOCALIZATION: "{0}" is the function which is in error - + MSB4200: Unknown item transformation function "{0}". {StrBegin="MSB4200: "} - UE: This message is shown when the user attempts to provide an expression like @(Item->SomeTransform()), but SomeTransform is unknown + UE: This message is shown when the user attempts to provide an expression like @(Item->SomeTransform()), but SomeTransform is unknown LOCALIZATION: "{0}" is the function name - + MSB4026: The "{0}={1}" parameter for the "{2}" task is invalid. {StrBegin="MSB4026: "}UE: This message is displayed when a task has an invalid parameter that cannot be initialized. - + MSB4027: The "{0}" task generated invalid items from the "{1}" output parameter. {2} {StrBegin="MSB4027: "} - + MSB4029: The "{0}" task has an invalid output specification. The "TaskParameter" attribute is required, and either the "ItemName" or "PropertyName" attribute must be specified (but not both). {StrBegin="MSB4029: "}LOCALIZATION: "TaskParameter", "ItemName" and "PropertyName" should not be localized. - + MSB4030: "{0}" is an invalid value for the "{1}" parameter of the "{3}" task. The "{1}" parameter is of type "{2}". {StrBegin="MSB4030: "}UE: This error is shown when a type mis-match occurs between the value assigned to task parameter in the project file and the type of the .NET property that corresponds to the task parameter. For example, if an int task parameter called "Count" is assigned the value "x", this error would be displayed: <MyTask Count="x" /> - + MSB4137: Invalid value specified in the configuration file at "{0}". Property name or tools version name is an empty string. {StrBegin="MSB4137: "} - + MSB4163: <ItemDefinitionGroup> is not allowed inside a target. {StrBegin="MSB4163: "} - + MSB4096: The item "{0}" in item list "{1}" does not define a value for metadata "{2}". In order to use this metadata, either qualify it by specifying %({1}.{2}), or ensure that all items in this list define a value for this metadata. {StrBegin="MSB4096: "} - + MSB4099: A reference to an item list at position {1} is not allowed in this condition "{0}". {StrBegin="MSB4099: "} - + MSB4191: The reference to custom metadata "{2}" at position {1} is not allowed in this condition "{0}". {StrBegin="MSB4191: "} - + MSB4190: The reference to the built-in metadata "{2}" at position {1} is not allowed in this condition "{0}". {StrBegin="MSB4190: "} - + MSB4033: "{0}" is a reserved item metadata, and cannot be redefined as a custom metadata on the item. {StrBegin="MSB4033: "} - + An InternalLoggerException can only be thrown by the MSBuild engine. The public constructors of this class cannot be used to create an instance of the exception. UE: This message is shown when a user tries to instantiate a special exception called InternalLoggerException through the OM -- only the engine is allowed to create and throw this exception. LOCALIZATION: "InternalLoggerException" and "MSBuild" should not be localized. - + Initial Items: - + Environment at start of build: - + MSB4164: The value "{0}" of metadata "{1}" contains an item list expression. Item list expressions are not allowed on default metadata values. {StrBegin="MSB4164: "} - + MSB4035: The required attribute "{0}" is empty or missing from the element <{1}>. {StrBegin="MSB4035: "}UE: This message is shown when a user leaves off a required attribute from a project element e.g. <UsingTask AssemblyName="foo"> -- this is missing the "TaskName" attribute. - + MSB4232: Items that are outside Target elements must have one of the following operations: Include, Update, or Remove. {StrBegin="MSB4232: "} Target, Include, Update, and Remove should not be localized and their casing should not be changed - + MSB4036: The "{0}" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "{1}" directory. {StrBegin="MSB4036: "}LOCALIZATION: <UsingTask> and "*.tasks" should not be localized. - + MSB4141: MSBuildToolsPath is not specified for the ToolsVersion "{0}" defined at "{1}", or the value specified evaluates to the empty string. {StrBegin="MSB4141: "} - + MSB4222: ToolsVersion "{0}", defined at "{1}", contains sub-toolset "{2}" which sets MSBuildBinPath or MSBuildToolsPath. This is not supported in sub-toolsets. - + MSB4144: Multiple definitions were found for the toolset "{0}". {StrBegin="MSB4144: "} - - MSB4225: Toolset contains multiple definitions of searchPaths for the OS "{0}" at "{1}". + + MSB4225: Toolset contains multiple definitions of searchPaths for the OS "{0}" at "{1}". {StrBegin="MSB4225: "} - + MSB4145: Multiple definitions were found for the property "{0}". {StrBegin="MSB4145: "} - + MSB4082: Choose has more than one <Otherwise> element. {StrBegin="MSB4082: "} - + MSB4038: The element <{0}> must be last under element <{1}>. Found element <{2}> instead. {StrBegin="MSB4038: "} - + MSB4138: Non-string data was specified at the registry location "{0}". {StrBegin="MSB4138: "} - + MSB4039: No "{0}" element was found in the project file. {StrBegin="MSB4039: "} - + MSB4040: There is no target in the project. {StrBegin="MSB4040: "} - + A null entry was found in the collection of loggers. - + MaxNodeCount may only be assigned a value greater than zero. - + Overriding target "{0}" in project "{1}" with target "{2}" from project "{3}". - + {0} ms {1} {2} calls - + (* = timing was not recorded because of reentrancy) - + The project file "{0}" was not found. UE: This message is shown when the user calls into the OM to build a project that doesn't exist on disk. - + Done building project "{0}" -- FAILED. - + Done building project "{0}". - + Done Building Project "{0}" ({1} target(s)). - + Done Building Project "{0}" (default targets). - + Done Building Project "{0}" ({1} target(s)) -- FAILED. - + Done Building Project "{0}" (default targets) -- FAILED. - + MSB4041: The default XML namespace of the project must be the MSBuild XML namespace or no namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="{0}" to the <Project> element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. {StrBegin="MSB4041: "}UE: This is a Beta 1 message only. LOCALIZATION: <Project>, "MSBuild" and "xmlns" should not be localized. - + Project Performance Summary: - + Project "{0}" is building "{1}" ({2} target(s)): - + Project "{0}" is building "{1}" (default targets): - + Project "{0}" ({1} target(s)): - + Project "{0}" (default targets): - + Task name cannot be empty. - + MSB4075: The project file "{0}" must be opened in the Visual Studio IDE and converted to the latest version before it can be built by MSBuild. {StrBegin="MSB4075: "} - + MSB4192: The project file "{0}" is in the ".vcproj" file format, which MSBuild no longer supports. Please convert the project by opening it in the Visual Studio IDE or running the conversion tool, or use MSBuild 3.5 or earlier to build it. {StrBegin="MSB4192: "} LOC: ".vcproj" should not be localized - + Initial Properties: - + MSB4148: The name of a property stored under the registry key "{0}" has zero length. {StrBegin="MSB4148: "} - + Property reassignment: $({0})="{1}" (previous value: "{2}") at {3} - + MSB4043: The item metadata reference "{0}" is invalid because it is qualified with an item name. Item metadata referenced in transforms do not need to be qualified, because the item name is automatically deduced from the items being transformed. Change "{0}" to "%({1})". - {StrBegin="MSB4043: "}UE: This message is shown when the user does something like this: @(foo->'%(foo.metadata)'). There is no need to specify + {StrBegin="MSB4043: "}UE: This message is shown when the user does something like this: @(foo->'%(foo.metadata)'). There is no need to specify "foo.metadata", because "foo" is automatically deduced. In corollary, "bar.metadata" is not allowed either, where "bar" is a different item list type. - + MSB4135: Error reading the toolset information from the registry location "{0}". {1} {StrBegin="MSB4135: "} - + MSB4044: The "{0}" task was not given a value for the required parameter "{1}". {StrBegin="MSB4044: "}UE: This message is shown when a task parameter designated as "required" is not set in the project file. - + MSB4112: The targets in this project have been disabled by the host and therefore cannot be built at this time. This may have been done for security reasons. To enable the targets, the host must set Project.BuildEnabled to "true". {StrBegin="MSB4112: "} - + MSB4093: The "{0}" parameter of the "{1}" task cannot be written to because it does not have a "set" accessor. {StrBegin="MSB4093: "}UE: This error is shown when a project tries to assign a value to a task parameter that does not have a "set" accessor on the corresponding .NET property on the task class. - + Skipping target "{0}" because it has no inputs. - + Though the target has declared its inputs, the input specification only references empty properties and/or empty item lists. - + Skipping target "{0}" because it has no outputs. - + Though the target has declared its outputs, the output specification only references empty properties and/or empty item lists. - + Skipping target "{0}" because all output files are up-to-date with respect to the input files. - + Input files: {0} {0} is a semicolon-separated list of filenames. - + Output files: {0} {0} is a semicolon-separated list of filenames. - + {0}: Defaulting .NET Framework v{1} to the .NET Framework v4.0 version of aspnet_compiler.exe. To change the version of the tool used, please set the "ToolPath" parameter with the correct path to the tool. - + MSB4203: {0}: Invalid TargetFrameworkMoniker {1}. The AspNetCompiler task only supports targeting the .NET Framework. {StrBegin="MSB4203: "} - + MSB4205: The website project in this solution is targeting the v2.0 runtime, but it is not installed. {StrBegin="MSB4205: "} - + MSB4249: Unable to build website project "{0}". The ASP.NET compiler is only available on the .NET Framework version of MSBuild. {StrBegin="MSB4249: "} - + MSB4204: {0}: Invalid TargetFrameworkMoniker {1}. {2}. {StrBegin="MSB4204: "} - + Using the MSBuild v3.5 solution wrapper generator because the tools version was set to {0}. - + Using the MSBuild v3.5 solution wrapper generator with a tools version of {0} because the solution file format was version {1} and no tools version was supplied. - + Building solution configuration "{0}". UE: This is not an error, so doesn't need an error code. - + MSB4160: A circular dependency involving project "{0}" has been detected. {StrBegin="MSB4160: "} - + MSB4126: The specified solution configuration "{0}" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. {StrBegin="MSB4126: "}UE: The solution filename is provided separately to loggers. - + MSB4046: Error reading project file "{0}": {1} {StrBegin="MSB4046: "} - + MSB4125: The project file name "{0}" is invalid. {1} {StrBegin="MSB4125: "}UE: The solution filename is provided separately to loggers. - + MSB4051: Project {0} is referencing a project with GUID {1}, but a project with this GUID was not found in the .SLN file. {StrBegin="MSB4051: "}UE: The solution filename is provided separately to loggers. - + MSB4078: The project file "{0}" is not supported by MSBuild and cannot be built. {StrBegin="MSB4078: "} - + MSB4054: The solution file must be opened in the Visual Studio IDE and converted to the latest version before it can be built by MSBuild. {StrBegin="MSB4054: "}UE: The solution filename is provided separately to loggers. - + MSB4121: The project configuration for project "{0}" was not specified in the solution file for the solution configuration "{1}". {StrBegin="MSB4121: "} - + The project "{0}" is not selected for building in solution configuration "{1}". UE: This is not an error, so doesn't need an error code. - + MSB4122: Scanning project dependencies for project "{0}" failed. {1} {StrBegin="MSB4122: "} - + MSB4149: The tools version "{0}" of the solution does not support building projects with a different tools version. {StrBegin="MSB4149: "} - + Web projects do not support the "Clean" target. Continuing with remaining projects ... UE: This is not an error, so doesn't need an error code. LOCALIZATION: Do not localize "Clean". - + Web projects do not support the "Publish" target. Continuing with remaining projects ... UE: This is not an error, so doesn't need an error code. LOCALIZATION: Do not localize "Publish". - + Skipping because the "$(AspNetConfiguration)" configuration is not supported for this web project. You can use the AspNetConfiguration property to override the configuration used for building web projects, by adding /p:AspNetConfiguration=<value> to the command line. Currently web projects only support Debug and Release configurations. UE: This is not an error, so doesn't need an error code. LOCALIZATION: Do NOT localize "AspNetConfiguration", "Debug", "Release". - + Target "{0}" skipped. Previously built unsuccessfully. - + Target "{0}" skipped. Previously built successfully. - + MSB4116: The condition "{1}" on the "{0}" target has a reference to item metadata. References to item metadata are not allowed in target conditions unless they are part of an item transform. {StrBegin="MSB4116: "} - + MSB4057: The target "{0}" does not exist in the project. {StrBegin="MSB4057: "} - + The target "{0}" listed in a BeforeTargets attribute at "{1}" does not exist in the project, and will be ignored. - + The target "{0}" listed in an AfterTargets attribute at "{1}" does not exist in the project, and will be ignored. - + Done building target "{0}" in project "{1}" -- FAILED. - + Done building target "{0}" in project "{1}". - + {0}: (TargetId:{1}) - + Target output items: - + {0} - + MSB4058: The "{0}" target is missing its output specification. If a target declares inputs, it must also declare outputs. {StrBegin="MSB4058: "} - + Target Performance Summary: - + Target "{0}" skipped, due to false condition; ({1}) was evaluated as ({2}). - + Target "{0}" skipped. The target does not exist in the project and SkipNonexistentTargets is set to true. LOCALIZATION: Do NOT localize "SkipNonexistentTargets" or "true". - - - - - + Target "{0}" in file "{1}" from project "{2}": - + Target "{0}" in file "{1}" from project "{2}" (entry point): - + Target "{0}" in file "{1}" from project "{2}" (target "{3}" depends on it): - + Target "{0}" in file "{1}" from project "{2}" (designated to run before target "{3}"): - + Target "{0}" in file "{1}" from project "{2}" (designated to run after target "{3}"): - - - + Target "{0}" in project "{1}": - + Target "{0}" in project "{1}" (entry point): - + Target "{0}" in project "{1}" (target "{2}" depends on it): - + Target "{0}" in project "{1}" (designated to run before target "{2}"): - + Target "{0}" in project "{1}" (designated to run after target "{2}"): - - - + Target {0}: - - - + Target "{0}" in file "{1}": - - - + Target {0} from project "{1}": - - - + Target "{0}" in file "{1}" from project "{2}": - - - + Added Item(s): - + Removed Item(s): - + Set Property: {0}={1} - - - + Output Item(s): - + Output Property: {0}={1} - - - - - Build continuing because "{0}" on the task "{1}" is set to "{2}". + + Build continuing because "{0}" on the task "{1}" is set to "{2}". - + MSB4060: The "{0}" task has been declared or used incorrectly, or failed during construction. Check the spelling of the task name and the assembly name. {StrBegin="MSB4060: "} - + MSB4214: The "{0}" task has been defined, but cannot be used due to the fact that the identity defined in the UsingTask declaration (Runtime="{1}", Architecture="{2}") does not match the identity specified by the task invocation (MSBuildRuntime="{3}", MSBuildArchitecture="{4}"). {StrBegin="MSB4214: "}LOCALIZATION: Runtime, Architecture, MSBuildRuntime, and MSBuildArchitecture should not be localized. - + Done executing task "{0}" -- FAILED. - + Done executing task "{0}". - + {0} (TaskId:{1}) - + Using "{0}" task from assembly "{1}". UE: This informational message helps users determine which assemblies their tasks were loaded from. - + Using "{0}" task from the task factory "{1}". UE: This informational message helps users determine which assemblies their tasks were loaded from. - + Task "{0}" will be run in a single-threaded apartment thread. UE: This informational message helps users determine if their tasks are run in the STA or MTA. - + MSB4061: The "{0}" task could not be instantiated from "{1}". {2} {StrBegin="MSB4061: "}LOCALIZATION: "{2}" is a localized message from a CLR/FX exception. - + MSB4127: The "{0}" task could not be instantiated from the assembly "{1}". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. {2} {StrBegin="MSB4127: "}UE: This message is a specialized version of the TaskInstantiationFailureError message and can probably reuse some of its docs. LOCALIZATION: "{2}" is a localized message from a CLR/FX exception. Also, Microsoft.Build.Framework should not be localized - + MSB4180: The "{0}" logger could not be instantiated from the assembly "{1}". Please verify the logger assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. {2} {StrBegin="MSB4180: "} LOCALIZATION: "{2}" is a localized message from a CLR/FX exception. Also, Microsoft.Build.Framework should not be localized - + MSB4132: The "{0}" task returned false but did not log an error. {StrBegin="MSB4132: "} - + MSB1021: Cannot create an instance of the logger. {0} {StrBegin="MSB1021: "} UE: This error is shown when a logger cannot be loaded and instantiated from its assembly. LOCALIZATION: The prefix "MSBxxxx: " should not be localized. {0} contains a message explaining why the logger could not be created -- this message comes from the CLR/FX and is localized. - + MSB1020: The logger was not found. Check the following: 1.) The logger name specified is the same as the name of the logger class. 2.) The logger class is "public" and implements the Microsoft.Build.Framework.ILogger interface. 3.) The path to the logger assembly is correct, or the logger can be loaded using only the assembly name provided. {StrBegin="MSB1020: "}UE: This message does not need in-line parameters because the exception takes care of displaying the invalid arg. @@ -1083,602 +1121,554 @@ LOCALIZATION: The prefix "MSBxxxx: " should not be localized. - + MSB4179: The task factory instance for the "{0}" task could not be instantiated from the task factory "{1}". {2} {StrBegin="MSB4179: "} LOCALIZATION: "{2}" is a localized message from a CLR/FX exception. - + MSB4176: The "{0}" task factory could not be instantiated from the assembly "{1}". Please verify the task assembly has been built using the same version of the Microsoft.Build.Framework assembly as the one installed on your computer and that your host application is not missing a binding redirect for Microsoft.Build.Framework. {2} {StrBegin="MSB4176: "}UE: This message is a specialized version of the TaskFactoryInstantiationFailureError message and can probably reuse some of its docs. LOCALIZATION: "{2}" is a localized message from a CLR/FX exception. Also, Microsoft.Build.Framework should not be localized - + MSB4219: The TaskFactory "{0}" does not implement ITaskFactory2. The attributes "{1}" and/or "{2}" on the UsingTask declaration for task "{3}" will be be ignored. {StrBegin="MSB4219: "} LOCALIZATION: The prefix "MSBUILD : error MSBxxxx:" should not be localized. - + The task factory must return a value for the "TaskType" property. - + MSB4062: The "{0}" task could not be loaded from the assembly {1}. {2} Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. {StrBegin="MSB4062: "}UE: This message is shown when a task cannot be loaded from its assembly for various reasons e.g. corrupt assembly, invalid task declaration, disk error, etc. "{2}" contains a message explaining what happened. LOCALIZATION: "{2}" is a message from the CLR loader and is already localized. Also, <UsingTask> should not be localized. - + MSB4215: The "{0}" task could not be loaded. "{1}" is an invalid value for the task host parameter "{2}". Valid values are: "{3}", "{4}", "{5}", and "{6}"; not specifying a value is also valid. {StrBegin="MSB4215: "} - + "{0}" is an invalid value for the task host parameter "{1}". Valid values are: "{2}", "{3}", "{4}", and "{5}"; not specifying a value is also valid. - + MSB4216: Could not run the "{0}" task because MSBuild could not create or connect to a task host with runtime "{1}" and architecture "{2}". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "{3}" exists and can be run. {StrBegin="MSB4216: "} - + MSB4221: Could not run the "{0}" task because MSBuild could not create or connect to a task host with runtime "{1}" and architecture "{2}". Please ensure that (1) the requested runtime and/or architecture are available on the machine, and (2) that the required executable "{3}" exists and can be run. Error {4} {5}. {StrBegin="MSB4221: "} - + A task requested launch of the .NET 3.5 version of the MSBuild task host, but .NET 3.5 is not installed on this machine so the task host could not be launched. To fix this error, please either install .NET 3.5 or retarget your project. - + MSB4217: Task host node exited prematurely. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt. {0} {StrBegin="MSB4217: "} - + MSB4063: The "{0}" task could not be initialized with its input parameters. {1} {StrBegin="MSB4063: "} - + Task Parameter: - + Task Performance Summary: - + Project Evaluation Performance Summary: - + Task "{0}" skipped, due to false condition; ({1}) was evaluated as ({2}). - + Task "{0}" - + Time Elapsed {0} - + Building with tools version "{0}". - + Project file contains ToolsVersion="{0}". This toolset may be unknown or missing, in which case you may be able to resolve this by installing the appropriate version of MSBuild, or the build may have been forced to a particular ToolsVersion for policy reasons. Treating the project as if it had ToolsVersion="{1}". For more information, please see http://go.microsoft.com/fwlink/?LinkId=293424. - + Deferred Messages - + MSB4090: Found an unexpected character '{2}' at position {1} in condition "{0}". {StrBegin="MSB4090: "} - + MSB4091: Found a call to an undefined function "{1}" in condition "{0}". {StrBegin="MSB4091: "} - + MSB4064: The "{0}" parameter is not supported by the "{1}" task. Verify the parameter exists on the task, and it is a settable public instance property. {StrBegin="MSB4064: "} - + MSB4131: The "{0}" parameter is not supported by the "{1}" task. Verify the parameter exists on the task, and it is a gettable public instance property. {StrBegin="MSB4131: "} - + MSB4092: An unexpected token "{1}" was found at character position {2} in condition "{0}". {StrBegin="MSB4092: "} - + MSB4065: The "{0}" parameter is not marked for output by the "{1}" task. {StrBegin="MSB4065: "} - + MSB4066: The attribute "{0}" in element <{1}> is unrecognized. {StrBegin="MSB4066: "} - + MSB4067: The element <{0}> beneath element <{1}> is unrecognized. {StrBegin="MSB4067: "} - + MSB4173: The element <{0}> beneath element <{1}> is invalid because a child element with that name already exists {StrBegin="MSB4173: "} - + MSB4227: The attribute "{0}" on element <{1}> is invalid because an attribute with that name already exists {StrBegin="MSB4227: "} - + MSB4228: The name "{0}" is not valid for metadata expressed as an attribute (on element <{1}>) {StrBegin="MSB4228: "} - + MSB4229: The value "{0}" is not valid for an Sdk specification. The attribute should be a semicolon-delimited list of Sdk-name/minimum-version pairs, separated by a forward slash. {StrBegin="MSB4229: "} - + MSB4236: The SDK '{0}' specified could not be found. {StrBegin="MSB4236: "} - + MSB4237: The SDK resolver type "{0}" failed to load. {1} {StrBegin="MSB4237: "} - + MSB4244: The SDK resolver assembly "{0}" could not be loaded. {1} {StrBegin="MSB4244: "} - + MSB4242: The SDK resolver "{0}" failed to run. {1} {StrBegin="MSB4242: "} - + MSB4243: The NuGet-based SDK resolver failed to run because NuGet assemblies could not be located. Check your installation of MSBuild or set the environment variable "{0}" to the folder that contains the required NuGet assemblies. {1} {StrBegin="MSB4243: "} - + MSB4245: SDK Resolver manifest file is invalid. This may indicate a corrupt or invalid installation of MSBuild. Manifest file path '{0}'. Message: {1} {StrBegin="MSB4245: "} - + MSB4246: SDK Resolver folder exists but without an SDK Resolver DLL or manifest file. This may indicate a corrupt or invalid installation of MSBuild. SDK resolver path: {0} {StrBegin="MSB4246: "} - + MSB4247: Could not load SDK Resolver. A manifest file exists, but the path to the SDK Resolver DLL file could not be found. Manifest file path '{0}'. SDK resolver path: {1} {StrBegin="MSB4247: "} - + MSB4238: The name "{0}" is not a valid SDK name. {StrBegin="MSB4238: "} - + MSB4189: <{1}> is not a valid child of the <{0}> element. {StrBegin="MSB4189: "} - + MSB4068: The element <{0}> is unrecognized, or not supported in this context. {StrBegin="MSB4068: "} - + MSB4235: The log file format version is {0}, whereas this version of MSBuild only supports versions up to {1}. {StrBegin="MSB4235: "} - + MSB4069: The "{0}" type of the "{1}" parameter of the "{2}" task is not supported by MSBuild. {StrBegin="MSB4069: "}LOCALIZATION: "MSBuild" should not be localized. - + MSB4072: A <{0}> element must contain either the "{1}" attribute or the "{2}" attribute (but not both). {StrBegin="MSB4072: "} - + {0} Warning(s) - + MSB4084: A <When> element may not follow an <Otherwise> element in a <Choose>. {StrBegin="MSB4084: "} - + MSB4150: Must initialize the console logger using the initialize method before using ApplyParameter {StrBegin="MSB4150: "} - + MSB4206: A non-null host object cannot be specified for a project which has an affinity set to out-of-process. {StrBegin="MSB4206: "} - + MSB4207: Only an in-process affinity may be specified for projects which have registered host objects. {StrBegin="MSB4207: "} - + MSB4209: The specified project instance conflicts with the affinity specified in the HostServices. {StrBegin="MSB4209: "} - + MSB4213: The specified request affinity {0} conflicts with a previous affinity {1} specified for this project. {StrBegin="MSB4213: "} - + MSB4223: A node of the required type {0} could not be created. {StrBegin="MSB4223: "} - + MSB4224: KeepMetadata and RemoveMetadata are mutually exclusive. {StrBegin="MSB4224: "} - - "{0}" ({1} target) ({2}) -> + + "{0}" ({1} target) ({2}) -> - - "{0}" (default target) ({1}) -> + + "{0}" (default target) ({1}) -> - + {0} {1,5} - + Project "{0}" on node {1} ({2} target(s)). - + Project "{0}" on node {1} (default targets). - + Project "{0}" ({1}) is building "{2}" ({3}) on node {4} ({5} target(s)). - + Project "{0}" ({1}) is building "{2}" ({3}) on node {4} (default targets). - - ({0} target) -> + + ({0} target) -> - + The property "{0}" with value "{1}" is being overridden by another batch. The property is now: "{2}" - + The log file path cannot be null or empty. - + [default] - + MSB4174: The task factory "{0}" could not be found in the assembly "{1}". {StrBegin="MSB4174: "} - + MSB4175: The task factory "{0}" could not be loaded from the assembly "{1}". {2} {StrBegin="MSB4175: "} - + MSB4201: The cancel operation was unable to complete because the currently executing task is not responding. {StrBegin="MSB4201: "} - + MSB4220: Waiting for the currently executing task "{0}" to cancel. {StrBegin="MSB4220: "} - + MSB4202: The request to build submission {0} cannot proceed because submission {1} is already using the main thread. {StrBegin="MSB4202: "} - + The request to build this submission cannot proceed because a project with the same configuration is already building. - + Initializing task factory "{0}" from assembly "{1}". - + Initializing task host factory for task "{0}" from assembly "{1}" - + The build plan could not be written. Check that the build process has permissions to write to {0}. - + The MSBuild cache file "{0}" is inaccessible. Ensure you have access to the directory and that this file is not deleted during the build. {1} LOCALIZATION: "{1}" is a localized message from a CLR/FX exception. - + The build plan could not be read. Check that the build process has permissions to read {0}. - + The build plan at {0} appears to be corrupt and cannot be used. - + Detailed Build Summary ====================== - + ============================== Build Hierarchy (IDs represent configurations) ===================================================== Id : Exclusive Time Total Time Path (Targets) ----------------------------------------------------------------------------------------------------------------------------------- - + {0}{1,-3}{2}: {3:0.000}s {4:0.000}s {5} ({6}) Fields 3 and 4 represent seconds, and the 's' following them should reflect the localized abbreviation for seconds. - + ============================== Node Utilization (IDs represent configurations) ==================================================== Timestamp: {0} Duration Cumulative ----------------------------------------------------------------------------------------------------------------------------------- Spacing is important. Preserve the number of characters between the start of each word. - + {0} {1:0.000}s {2:0.000}s {3} Fields 1 and 2 represents seconds, and the 's' following it should reflect the localized abbreviation for seconds. - + ----------------------------------------------------------------------------------------------------------------------------------- Utilization: {0} Average Utilization: {1:###.0} Spacing is important. Preserve the number of characters between the start of each word. - - - - - + This collection cannot convert from the specified value to the backing value. - + The "{0}" property name is reserved. UE: This message is shown when the user tries to redefine one of the reserved MSBuild properties e.g. $(MSBuildProjectFile) through the object model - - - - - + The <{0}> element must have either the "{1}" attribute or the "{2}" attribute but not both. - + The <{0}> element must have either the "{1}" attribute, the "{2}" attribute, or the "{3}" attribute, but not more than one. - + The "Remove" attribute is not permitted on an item outside of a <Target>. - + The "KeepMetadata" attribute is not permitted on an item outside of a <Target>. - + The "RemoveMetadata" attribute is not permitted on an item outside of a <Target>. - + The "KeepDuplicates" attribute is not permitted on an item outside of a <Target>. - + Elements of this type do not have a condition. For example, it is not legal for a <ProjectExtensions> element to have a condition attribute. - + The node already has a parent. Remove it from its parent before moving it. - + The node is not parented by this object so it cannot be removed from it. - + The reference node is not a child of this node. - + Cannot make a node or an ancestor of that node a child of itself. - + Cannot create a relationship between nodes that were created from different projects. - + The parent node is not itself parented. - + This parent is not a valid parent for the item. - + An item not parented under a Target must have a value for Include or Update or Remove. LOCALIZATION: Please do not localize "Target", "Include", "Update", and "Remove". - + The name "{0}" contains an invalid character "{1}". - + Method {0} cannot be called with a collection containing null or empty target names. - + An <Otherwise> element cannot be located before a <When> or <Otherwise> element. - + Project has not been given a path to save to. - + Project was not loaded with the ProjectLoadSettings.RecordDuplicateImports flag. - + Project or targets file "{0}" was loaded in read-only mode, and cannot be saved. - - - - - + The "{0}" object specified does not belong to the correct "{1}" object. - + The "{0}" name is reserved, and cannot be used. - + The "{0}" property is a global property, and cannot be modified. - + An equivalent project (a project with the same global properties and tools version) is already present in the project collection, with the path "{0}". To load an equivalent into this project collection, unload this project first. - + The project provided was not loaded in the collection. - + Cannot modify an evaluated object originating in an imported file "{0}". - + Cannot remove the metadata named "{0}" as it originates from an item definition, rather than being directly defined on this item. - + The requested operation needs to split the item element at location {0} into individual elements but item element splitting is disabled with {1}. - + The project cannot be used as it is no longer loaded into a project collection. - + The operation is not allowed because currently this object is not parented. - + The project XML file "{0}" cannot be unloaded because at least one project "{1}" is still loaded which references that project XML. - + Instance object was created as immutable. - + The specified API "{0}" is not available because ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition was set when loading this project. - - - - - + All build submissions in a build must use project instances originating from the same project collection. This occurs if a client tries to add two BuildSubmissions to a build, each involving a ProjectInstance originating in different ProjectCollection. This is not allowed. - - - - - - - - + Build started. - + {0} ({1},{2}) A file location to be embedded in a string. - - - - + MSB3203: The output path "{0}" cannot be rebased. {1} {StrBegin="MSB3203: "}UE: This message is shown when the user asks the "MSBuild" task to rebase the paths of its output items relative to the project from where the "MSBuild" task is called (as opposed to the project(s) on which the "MSBuild" task is called), and one of the output item paths is invalid. LOCALIZATION: "{1}" is a localized message from a CLR/FX exception explaining the problem. - + MSB3202: The project file "{0}" was not found. {StrBegin="MSB3202: "}UE: This message is shown when the user passes a non-existent project file to the MSBuild task, in the "Projects" parameter. and they have not specified the SkipNonexistentProjects parameter, or it is set to false. - + Skipping project "{0}" because it was not found. UE: This message is shown when the user passes a non-existent project file to the MSBuild task, in the "Projects" parameter, and they have specified the SkipNonexistentProjects parameter. - + MSB3204: The project file "{0}" is in the ".vcproj" file format, which MSBuild no longer supports. Please convert the project by opening it in the Visual Studio IDE or running the conversion tool, or use MSBuild 3.5 or earlier to build it. {StrBegin="MSB3204: "} LOC: ".vcproj" should not be localized - + MSB3205: SkipNonexistentProject can only accept values of "True", "False" and "Build". {StrBegin="MSB3205: "} LOC: "SkipNonexistentProject", "True", "False" and "Build" should not be localized - + The MSBuild task is skipping the remaining projects because the StopOnFirstFailure parameter was set to true. LOCALIZATION: Do not localize the words "MSBuild" or "StopOnFirstFailure". - + The MSBuild task is skipping the remaining targets because the StopOnFirstFailure parameter was set to true. LOCALIZATION: Do not localize the words "MSBuild" or "StopOnFirstFailure". - + Overriding the BuildingInParallel property by setting it to false. This is due to the system being run in single process mode with StopOnFirstFailure set to true. LOCALIZATION: Do not localize the words "MSBuild", "BuildingInParallel", or "StopOnFirstFailure". - + StopOnFirstFailure will have no effect when the following conditions are all present: 1) The system is running in multiple process mode 2) The BuildInParallel property is true. 3) The RunEachTargetSeparately property is false. LOCALIZATION: Do not localize the words "RunEachTargetSeparately", "BuildingInParallel", or "StopOnFirstFailure". - - - + MSB3100: Syntax for "{0}" parameter is not valid ({1}). Correct syntax is {0}="<name>=<value>". {StrBegin="MSB3100: "}This error is shown if the user does any of the following: Properties="foo" (missing property value) Properties="=4" (missing property name) The user must pass in an actual property name and value, as in Properties="Configuration=Debug". - + Global Properties: - + Removing Properties: - + Overriding Global Properties for project "{0}" with: - + Additional Properties for project "{0}": - + Removing Properties for project "{0}": - - MSB4802: The "{0}" task could not be instantiated from "{1}". This version of MSBuild does not support {2}. {StrBegin="MSB4802: "} - - + The parameter '{0}' can only be a file name and cannot include a directory. - - + MSB4229: File to reload from does not exist: {0} {StrBegin="MSB4229: "} - - + MSB4230: Value not set: {0} {StrBegin="MSB4230: "} - - + MSB4231: ProjectRootElement can't reload if it contains unsaved changes. {StrBegin="MSB4231: "} - - - Metaproject "{0}" generated. + + Metaproject "{0}" generated. - - - Project "{0}" was not imported by "{1}" at ({2},{3}), due to false condition; ({4}) was evaluated as ({5}). + + Project "{0}" was not imported by "{1}" at ({2},{3}), due to false condition; ({4}) was evaluated as ({5}). - - - Project "{0}" was not imported by "{1}" at ({2},{3}), due to no matching files. + + Project "{0}" was not imported by "{1}" at ({2},{3}), due to no matching files. - - - Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file being empty. + + Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file being empty. - - - Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file being invalid. + + Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file being invalid. - - - Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file not existing. + + Project "{0}" was not imported by "{1}" at ({2},{3}), due to the file not existing. - - - Importing project "{0}" into project "{1}" at ({2},{3}). + + Importing project "{0}" into project "{1}" at ({2},{3}). MSBUILD : error MSB4239: Error writing profiling report. {0} @@ -1689,39 +1679,39 @@ Utilization: {0} Average Utilization: {1:###.0} Done writing report. - + MSB4240: Multiple versions of the same SDK "{0}" cannot be specified. The previously resolved SDK version "{1}" from location "{2}" will be used and the version "{3}" will be ignored. {StrBegin="MSB4240: "} LOCALIZATION: Do not localize the word SDK. - + MSB4241: The SDK reference "{0}" version "{1}" was resolved to version "{2}" instead. You could be using a different version than expected if you do not update the referenced version to match. {StrBegin="MSB4241: "} LOCALIZATION: Do not localize the word SDK. - + Resolving SDK '{0}'... LOCALIZATION: Do not localize the word SDK. - + MSB4250: ProjectGraph does not support ProjectReference items with the ToolsVersion metadata set. Found ProjectReference "{0}" with ToolsVersion in file "{1}" {StrBegin="MSB4250: "} LOCALIZATION: Do not localize the following words: ProjectGraph, ProjectReference, ToolsVersion. - + MSB4251: There is a circular dependency involving the following projects: {0} {StrBegin="MSB4251:"} This message is shown when a graph build detects a target referenced in a circular manner -- a project cannot request a target to build itself (perhaps via a chain of other targets) - + MSB4252: Project "{0}" with global properties ({1}) is building project "{2}" with global properties @@ -1736,58 +1726,57 @@ Utilization: {0} Average Utilization: {1:###.0} LOCALIZATION: Do not localize the following words: ProjectReference, ProjectReferenceTargets - + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. {StrBegin="MSB4253: "} LOCALIZATION: Do not localize the following words: ProjectInstanceFactoryFunc. - + MSB4254: The MSBuild task is building project(s) "{0}" which are not specified in the ProjectReference item. In isolated builds this probably means that the references are not explicitly specified as a ProjectReference item in "{1}" {StrBegin="MSB4254:"} LOCALIZATION: Do not localize the following words: ProjectReference, MSBuild, task. - + MSB4256: Reading input result cache files from path "{0}" encountered an error: {1} - + MSB4255: The following input result cache files do not exist: "{0}" - + MSB4257: The specified output result cache file is empty. - + MSB4258: Writing output result cache file in path "{0}" encountered an error: {1} - + Using input build results caches: {0} LOCALIZATION: {0} is a list of semicolon separated file paths - + Writing build results caches to: {0} LOCALIZATION: {0} is a file path - + MSB4260: Project "{0}" skipped graph isolation constraints on referenced project "{1}" LOCALIZATION: {0} and {1} are file paths - - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. LOCALIZATION: {0} is a semicolon delimited list of files - + MSB4262: Solution file "{0}" contains the following warnings and errors: Warnings: {1} Errors: {2} @@ -1796,7 +1785,7 @@ Utilization: {0} Average Utilization: {1:###.0} LOCALIZATION: {0} is a file, {1} and {2} are semicolon delimited lists of messages - + MSB4263: Project "{0}" has a reference to solution file "{1}". Referencing solutions is not supported in static graph. @@ -1812,65 +1801,16 @@ Utilization: {0} Average Utilization: {1:###.0} Version string was not in a correct format. - + Read uninitialized property "{0}" - - - + Read environment variable "{0}" - - - + Property initial value: $({0})="{1}" Source: {2} - - - - + + A required NuGet assembly was not found. Expected Path: {0} + + \ No newline at end of file diff --git a/src/Build/Resources/xlf/Strings.cs.xlf b/src/Build/Resources/xlf/Strings.cs.xlf index 33b6e3392ab..afb2c05e59e 100644 --- a/src/Build/Resources/xlf/Strings.cs.xlf +++ b/src/Build/Resources/xlf/Strings.cs.xlf @@ -117,6 +117,11 @@ Operaci nelze dokončit, protože funkce BeginBuild ještě nebyla zavolána. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Uživatelem zadané zpětné volání ProjectInstanceFactoryFunc vrátilo odkaz null. To není přípustné. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: Statický graf přijímá pouze řešení jako jediný vstupní bod. Zjištěno více vstupních bodů: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: Statický graf přijímá pouze řešení jako jediný vstupní bod. Zjištěno více vstupních bodů: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.de.xlf b/src/Build/Resources/xlf/Strings.de.xlf index 251cf3c1df8..2a49e3f6ae9 100644 --- a/src/Build/Resources/xlf/Strings.de.xlf +++ b/src/Build/Resources/xlf/Strings.de.xlf @@ -117,6 +117,11 @@ Der Vorgang kann nicht abgeschlossen werden, da BeginBuild noch nicht aufgerufen wurde. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Ein benutzerseitig angegebener ProjectInstanceFactoryFunc-Rückruf hat einen NULL-Verweis zurückgegeben. Dies ist nicht zulässig. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: Ein statischer Graph akzeptiert nur eine Projektmappe als einzigen Einstiegspunkt. Es wurden mehrere Einstiegspunkte erkannt: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: Ein statischer Graph akzeptiert nur eine Projektmappe als einzigen Einstiegspunkt. Es wurden mehrere Einstiegspunkte erkannt: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.en.xlf b/src/Build/Resources/xlf/Strings.en.xlf index 4cbe8cb8cbb..80c7cd42f2f 100644 --- a/src/Build/Resources/xlf/Strings.en.xlf +++ b/src/Build/Resources/xlf/Strings.en.xlf @@ -117,6 +117,11 @@ The operation cannot be completed because BeginBuild has not yet been called. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.es.xlf b/src/Build/Resources/xlf/Strings.es.xlf index 685fbadd8ea..f95789855e0 100644 --- a/src/Build/Resources/xlf/Strings.es.xlf +++ b/src/Build/Resources/xlf/Strings.es.xlf @@ -117,6 +117,11 @@ La operación no se puede completar porque todavía no se llamó a BeginBuild. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Se devolvió una referencia nula de una devolución de llamada de ProjectInstanceFactoryFunc proporcionada por el usuario, y no se permite. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: Un grafo estático solo acepta una solución como único punto de entrada. Se han detectado varios puntos de entrada: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: Un grafo estático solo acepta una solución como único punto de entrada. Se han detectado varios puntos de entrada: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.fr.xlf b/src/Build/Resources/xlf/Strings.fr.xlf index db343510d59..b1267e95892 100644 --- a/src/Build/Resources/xlf/Strings.fr.xlf +++ b/src/Build/Resources/xlf/Strings.fr.xlf @@ -117,6 +117,11 @@ Impossible d'effectuer l'opération car la méthode BeginBuild n'a pas encore été appelée. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Une référence null a été retournée à partir d'un rappel ProjectInstanceFactoryFunc fourni par l'utilisateur. Ceci n'est pas autorisé. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: le graphe statique n'accepte qu'une solution comme seul point d'entrée. Plusieurs points d'entrée ont été détectés : {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: le graphe statique n'accepte qu'une solution comme seul point d'entrée. Plusieurs points d'entrée ont été détectés : {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.it.xlf b/src/Build/Resources/xlf/Strings.it.xlf index 2606ef8f03b..b9c6797a758 100644 --- a/src/Build/Resources/xlf/Strings.it.xlf +++ b/src/Build/Resources/xlf/Strings.it.xlf @@ -117,6 +117,11 @@ Non è possibile completare l'operazione perché BeginBuild non è stato ancora chiamato. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: è stato restituito un riferimento Null da un callback ProjectInstanceFactoryFunc fornito dall'utente. Questa operazione non è consentita. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: l'unico punto di ingresso accettato dal grafo statico è una soluzione. Sono stati rilevati più punti di ingresso: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: l'unico punto di ingresso accettato dal grafo statico è una soluzione. Sono stati rilevati più punti di ingresso: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.ja.xlf b/src/Build/Resources/xlf/Strings.ja.xlf index e8eb191a8e1..79366b23f8e 100644 --- a/src/Build/Resources/xlf/Strings.ja.xlf +++ b/src/Build/Resources/xlf/Strings.ja.xlf @@ -117,6 +117,11 @@ BeginBuild がまだ呼び出されていないため、操作を完了できません。 + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: ユーザー提供の ProjectInstanceFactoryFunc コールバックから null 参照が返されました。これは許可されていません。 @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: 静的グラフでは、ソリューションを唯一のエントリ ポイントとして受け入れるのみです。複数のエントリ ポイントが検出されました: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: 静的グラフでは、ソリューションを唯一のエントリ ポイントとして受け入れるのみです。複数のエントリ ポイントが検出されました: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.ko.xlf b/src/Build/Resources/xlf/Strings.ko.xlf index 352879280c8..01565a075b7 100644 --- a/src/Build/Resources/xlf/Strings.ko.xlf +++ b/src/Build/Resources/xlf/Strings.ko.xlf @@ -117,6 +117,11 @@ BeginBuild가 아직 호출되지 않았으므로 작업을 완료할 수 없습니다. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: 사용자가 제공한 ProjectInstanceFactoryFunc 콜백에서 Null 참조가 반환되었습니다. 이는 허용되지 않습니다. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: 정적 그래프는 유일한 진입점으로 솔루션만 허용합니다. 여러 진입점이 발견되었습니다. {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: 정적 그래프는 유일한 진입점으로 솔루션만 허용합니다. 여러 진입점이 발견되었습니다. {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.pl.xlf b/src/Build/Resources/xlf/Strings.pl.xlf index 2018cdcb104..85907238ede 100644 --- a/src/Build/Resources/xlf/Strings.pl.xlf +++ b/src/Build/Resources/xlf/Strings.pl.xlf @@ -117,6 +117,11 @@ Nie można zakończyć operacji, ponieważ metoda BeginBuild nie została jeszcze wywołana. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Z podanego przez użytkownika wywołania zwrotnego ProjectInstanceFactoryFunc została zwrócona pusta referencja. Jest to niedozwolone. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: wykres statyczny akceptuje tylko rozwiązanie jako jedyny punkt wejścia. Wykryto wiele punktów wejścia: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: wykres statyczny akceptuje tylko rozwiązanie jako jedyny punkt wejścia. Wykryto wiele punktów wejścia: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.pt-BR.xlf b/src/Build/Resources/xlf/Strings.pt-BR.xlf index ef4fc0fc9b3..c53768c2f3d 100644 --- a/src/Build/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Build/Resources/xlf/Strings.pt-BR.xlf @@ -117,6 +117,11 @@ A operação não pode ser concluída porque BeginBuild ainda não foi chamado. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Uma referência nula foi devolvida de um retorno de chamada do ProjectInstanceFactoryFunc fornecido pelo usuário. Isso não é permitido. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: o grafo estático aceita apenas uma solução como o único ponto de entrada. Vários pontos de entrada detectados: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: o grafo estático aceita apenas uma solução como o único ponto de entrada. Vários pontos de entrada detectados: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.ru.xlf b/src/Build/Resources/xlf/Strings.ru.xlf index 94f60764ee7..73020624f66 100644 --- a/src/Build/Resources/xlf/Strings.ru.xlf +++ b/src/Build/Resources/xlf/Strings.ru.xlf @@ -117,6 +117,11 @@ Не удается завершить операцию, так как ещё не был вызван BeginBuild. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: ссылка со значением NULL была возвращена из предоставленного пользователем вызова ProjectInstanceFactoryFunc. Это недопустимо. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: статический граф принимает решение только в качестве единственной точки входа. Обнаружено несколько точек входа: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: статический граф принимает решение только в качестве единственной точки входа. Обнаружено несколько точек входа: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.tr.xlf b/src/Build/Resources/xlf/Strings.tr.xlf index 6e286b658ee..c44fe61991c 100644 --- a/src/Build/Resources/xlf/Strings.tr.xlf +++ b/src/Build/Resources/xlf/Strings.tr.xlf @@ -117,6 +117,11 @@ BeginBuild henüz çağrılmadığı için işlem tamamlanamıyor. + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: Kullanıcı tarafından sağlanan bir ProjectInstanceFactoryFunc geri aramasında null başvuru var. Buna izin verilmez. @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: Statik graf tek giriş noktası olarak yalnızca bir çözümü kabul eder. Birden çok giriş noktası algılandı: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: Statik graf tek giriş noktası olarak yalnızca bir çözümü kabul eder. Birden çok giriş noktası algılandı: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.zh-Hans.xlf b/src/Build/Resources/xlf/Strings.zh-Hans.xlf index de877a23fb9..e57f274781b 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hans.xlf @@ -117,6 +117,11 @@ 无法完成该操作,因为尚未调用 BeginBuild。 + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: 从用户提供的 ProjectInstanceFactoryFunc 回调中返回了一个空引用。这是不允许的。 @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: 静态图仅接受解决方案作为唯一入口点。检测到多个入口点: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: 静态图仅接受解决方案作为唯一入口点。检测到多个入口点: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Resources/xlf/Strings.zh-Hant.xlf b/src/Build/Resources/xlf/Strings.zh-Hant.xlf index 61558f48a1c..b639528bd87 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hant.xlf @@ -117,6 +117,11 @@ 無法完成作業,因為尚未呼叫 BeginBuild。 + + A required NuGet assembly was not found. Expected Path: {0} + A required NuGet assembly was not found. Expected Path: {0} + + MSB4253: A null reference was returned from a user-provided ProjectInstanceFactoryFunc callback. This is not allowed. MSB4253: 使用者提供的 ProjectInstanceFactoryFunc 回呼傳回了 null 參考。這是不允許的情況。 @@ -151,8 +156,8 @@ - MSB4261: Static graph only accepts a solution as the only entry point. Multiple entry points detected: {0} - MSB4261: 靜態圖表只接受解決方案作為唯一的進入點。偵測到多個進入點: {0} + MSB4261: Multiple entry points with solutions detected: {0}. If static graph is loaded from a solution, that that solution must be the only entry point. + MSB4261: 靜態圖表只接受解決方案作為唯一的進入點。偵測到多個進入點: {0} LOCALIZATION: {0} is a semicolon delimited list of files diff --git a/src/Build/Utilities/NuGetFrameworkWrapper.cs b/src/Build/Utilities/NuGetFrameworkWrapper.cs new file mode 100644 index 00000000000..db2d3245f81 --- /dev/null +++ b/src/Build/Utilities/NuGetFrameworkWrapper.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using System; +using System.IO; +using System.Reflection; +using Microsoft.Build.Shared; + +namespace Microsoft.Build.Evaluation +{ + /// + /// Wraps the NuGet.Frameworks assembly, which is referenced by reflection. + /// + internal class NuGetFrameworkWrapper + { + /// + /// NuGet Types + /// + private static MethodInfo ParseMethod; + private static MethodInfo IsCompatibleMethod; + private static object DefaultCompatibilityProvider; + private static PropertyInfo FrameworkProperty; + private static PropertyInfo VersionProperty; + + public NuGetFrameworkWrapper() + { + /// Resolve the location of the NuGet.Frameworks assembly + var assemblyDirectory = BuildEnvironmentHelper.Instance.Mode == BuildEnvironmentMode.VisualStudio ? + Path.Combine(BuildEnvironmentHelper.Instance.VisualStudioInstallRootDirectory, "Common7", "IDE", "CommonExtensions", "Microsoft", "NuGet") : + BuildEnvironmentHelper.Instance.CurrentMSBuildToolsDirectory; + try + { + var NuGetAssembly = Assembly.LoadFile(Path.Combine(assemblyDirectory, "NuGet.Frameworks.dll")); + var NuGetFramework = NuGetAssembly.GetType("NuGet.Frameworks.NuGetFramework"); + var NuGetFrameworkCompatibilityProvider = NuGetAssembly.GetType("NuGet.Frameworks.CompatibilityProvider"); + var NuGetFrameworkDefaultCompatibilityProvider = NuGetAssembly.GetType("NuGet.Frameworks.DefaultCompatibilityProvider"); + ParseMethod = NuGetFramework.GetMethod("Parse", new Type[] { typeof(string) }); + IsCompatibleMethod = NuGetFrameworkCompatibilityProvider.GetMethod("IsCompatible"); + DefaultCompatibilityProvider = NuGetFrameworkDefaultCompatibilityProvider.GetMethod("get_Instance").Invoke(null, new object[] { }); + FrameworkProperty = NuGetFramework.GetProperty("Framework"); + VersionProperty = NuGetFramework.GetProperty("Version"); + } + catch + { + throw new InternalErrorException(string.Format(AssemblyResources.GetString("NuGetAssemblyNotFound"), assemblyDirectory)); + } + } + + private object Parse(string tfm) + { + return ParseMethod.Invoke(null, new object[] { tfm }); + } + + public string GetTargetFrameworkIdentifier(string tfm) + { + return FrameworkProperty.GetValue(Parse(tfm)) as string; + } + + public string GetTargetFrameworkVersion(string tfm) + { + return (VersionProperty.GetValue(Parse(tfm)) as Version).ToString(2); + } + + public bool IsCompatible(string tfm1, string tfm2) + { + return Convert.ToBoolean(IsCompatibleMethod.Invoke(DefaultCompatibilityProvider, new object[] { Parse(tfm1), Parse(tfm2) })); + } + } +} diff --git a/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj b/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj index 263dc6997c5..be9203b581a 100644 --- a/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj +++ b/src/MSBuild.UnitTests/Microsoft.Build.CommandLine.UnitTests.csproj @@ -74,6 +74,4 @@ - - diff --git a/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj b/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj index 758ea544fb5..a19d99dc303 100644 --- a/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj +++ b/src/Tasks.UnitTests/Microsoft.Build.Tasks.UnitTests.csproj @@ -143,7 +143,4 @@ PreserveNewest - - - diff --git a/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj b/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj index 261cd33ac51..b560f1b1455 100644 --- a/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj +++ b/src/Utilities.UnitTests/Microsoft.Build.Utilities.UnitTests.csproj @@ -59,6 +59,4 @@ - - \ No newline at end of file From a3a2fcb41b5c15081ec3ae83ec911ee30dcd6438 Mon Sep 17 00:00:00 2001 From: Sarah Oslund Date: Fri, 22 May 2020 08:52:47 -0700 Subject: [PATCH 5/5] Updating nuget intrinsic functions parameter names for clarity --- src/Build/Evaluation/IntrinsicFunctions.cs | 4 ++-- src/Build/Utilities/NuGetFrameworkWrapper.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Build/Evaluation/IntrinsicFunctions.cs b/src/Build/Evaluation/IntrinsicFunctions.cs index 43e61d022b9..55f9e185226 100644 --- a/src/Build/Evaluation/IntrinsicFunctions.cs +++ b/src/Build/Evaluation/IntrinsicFunctions.cs @@ -490,9 +490,9 @@ internal static string GetTargetFrameworkVersion(string tfm) return NuGetFramework.Value.GetTargetFrameworkVersion(tfm); } - internal static bool IsTargetFrameworkCompatible(string tfm1, string tfm2) + internal static bool IsTargetFrameworkCompatible(string target, string candidate) { - return NuGetFramework.Value.IsCompatible(tfm1, tfm2); + return NuGetFramework.Value.IsCompatible(target, candidate); } public static string GetCurrentToolsDirectory() diff --git a/src/Build/Utilities/NuGetFrameworkWrapper.cs b/src/Build/Utilities/NuGetFrameworkWrapper.cs index db2d3245f81..117e85acd93 100644 --- a/src/Build/Utilities/NuGetFrameworkWrapper.cs +++ b/src/Build/Utilities/NuGetFrameworkWrapper.cs @@ -61,9 +61,9 @@ public string GetTargetFrameworkVersion(string tfm) return (VersionProperty.GetValue(Parse(tfm)) as Version).ToString(2); } - public bool IsCompatible(string tfm1, string tfm2) + public bool IsCompatible(string target, string candidate) { - return Convert.ToBoolean(IsCompatibleMethod.Invoke(DefaultCompatibilityProvider, new object[] { Parse(tfm1), Parse(tfm2) })); + return Convert.ToBoolean(IsCompatibleMethod.Invoke(DefaultCompatibilityProvider, new object[] { Parse(target), Parse(candidate) })); } } }