diff --git a/MSBuild.sln b/MSBuild.sln
index 258d1a5c5d7..caac39c6344 100644
--- a/MSBuild.sln
+++ b/MSBuild.sln
@@ -52,12 +52,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSBuildTaskHost", "src\MSBu
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MSBuild.VSSetup", "src\Package\MSBuild.VSSetup\MSBuild.VSSetup.csproj", "{136C8713-3103-4AF9-B7CB-9619E87249C1}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Deprecated", "Deprecated", "{0AC7F677-AD87-48C8-A51C-008A68136929}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Engine", "src\Deprecated\Engine\Microsoft.Build.Engine.csproj", "{586C55EE-4003-4A20-AAE2-76DBDA421BB3}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Build.Conversion", "src\Deprecated\Conversion\Microsoft.Build.Conversion.csproj", "{8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Localization", "src\Package\Localization\Localization.csproj", "{16DBDF17-3E0E-4140-989A-B42638126A40}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DevDivPackage", "src\Package\DevDivPackage\DevDivPackage.csproj", "{EDBFE32E-F264-4F01-97C3-B58F8B9165C9}"
@@ -556,54 +550,6 @@ Global
{136C8713-3103-4AF9-B7CB-9619E87249C1}.Release|x64.Build.0 = Release|x64
{136C8713-3103-4AF9-B7CB-9619E87249C1}.Release|x86.ActiveCfg = Release|Any CPU
{136C8713-3103-4AF9-B7CB-9619E87249C1}.Release|x86.Build.0 = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|ARM64.Build.0 = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|x64.ActiveCfg = Debug|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|x64.Build.0 = Debug|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Debug|x86.Build.0 = Debug|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|Any CPU.ActiveCfg = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|Any CPU.Build.0 = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|ARM64.ActiveCfg = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|ARM64.Build.0 = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|x64.ActiveCfg = MachineIndependent|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|x64.Build.0 = MachineIndependent|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|x86.ActiveCfg = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.MachineIndependent|x86.Build.0 = MachineIndependent|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|Any CPU.Build.0 = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|ARM64.ActiveCfg = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|ARM64.Build.0 = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|x64.ActiveCfg = Release|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|x64.Build.0 = Release|x64
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|x86.ActiveCfg = Release|Any CPU
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3}.Release|x86.Build.0 = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|ARM64.Build.0 = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|x64.ActiveCfg = Debug|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|x64.Build.0 = Debug|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Debug|x86.Build.0 = Debug|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|Any CPU.ActiveCfg = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|Any CPU.Build.0 = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|ARM64.ActiveCfg = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|ARM64.Build.0 = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|x64.ActiveCfg = MachineIndependent|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|x64.Build.0 = MachineIndependent|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|x86.ActiveCfg = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.MachineIndependent|x86.Build.0 = MachineIndependent|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|Any CPU.Build.0 = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|ARM64.ActiveCfg = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|ARM64.Build.0 = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|x64.ActiveCfg = Release|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|x64.Build.0 = Release|x64
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|x86.ActiveCfg = Release|Any CPU
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA}.Release|x86.Build.0 = Release|Any CPU
{16DBDF17-3E0E-4140-989A-B42638126A40}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{16DBDF17-3E0E-4140-989A-B42638126A40}.Debug|Any CPU.Build.0 = Debug|Any CPU
{16DBDF17-3E0E-4140-989A-B42638126A40}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@@ -927,8 +873,6 @@ Global
{F45DBA88-C833-434A-8F68-087124540303} = {760FF85D-8BEB-4992-8095-A9678F88FD47}
{523E1555-DB60-4FD4-8CDF-3C159710CAED} = {760FF85D-8BEB-4992-8095-A9678F88FD47}
{136C8713-3103-4AF9-B7CB-9619E87249C1} = {9BAD9352-DEFB-45E5-B8A4-4816B9B22A33}
- {586C55EE-4003-4A20-AAE2-76DBDA421BB3} = {0AC7F677-AD87-48C8-A51C-008A68136929}
- {8AE12A8B-D64C-48CF-AD00-9A0C35884DFA} = {0AC7F677-AD87-48C8-A51C-008A68136929}
{16DBDF17-3E0E-4140-989A-B42638126A40} = {9BAD9352-DEFB-45E5-B8A4-4816B9B22A33}
{EDBFE32E-F264-4F01-97C3-B58F8B9165C9} = {9BAD9352-DEFB-45E5-B8A4-4816B9B22A33}
{B60173F0-F9F0-4688-9DF8-9ADDD57BD45F} = {9BAD9352-DEFB-45E5-B8A4-4816B9B22A33}
diff --git a/src/Build/AssemblyInfo.cs b/src/Build/AssemblyInfo.cs
index 36254bf8544..fd0a475c5e8 100644
--- a/src/Build/AssemblyInfo.cs
+++ b/src/Build/AssemblyInfo.cs
@@ -21,8 +21,7 @@
[assembly: InternalsVisibleTo("Microsoft.Build.Engine.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
[assembly: InternalsVisibleTo("Microsoft.Build.BuildCheck.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
[assembly: InternalsVisibleTo("Microsoft.Build.UnitTests.Shared, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
-[assembly: InternalsVisibleTo("Microsoft.Build.Conversion.Core, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
-[assembly: InternalsVisibleTo("Microsoft.Build.Conversion.Unittest, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
+[assembly: InternalsVisibleTo("Microsoft.Build.UnitTests.Shared, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
[assembly: InternalsVisibleTo("Microsoft.Build.Tasks.Cop, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
[assembly: InternalsVisibleTo("Microsoft.Build.BuildCheck.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")]
// DO NOT expose Internals to "Microsoft.Build.UnitTests.OM.OrcasCompatibility" as this assembly is supposed to only see public interface
diff --git a/src/Deprecated/Conversion.UnitTests/OldVSProjectFileReader_Tests.cs b/src/Deprecated/Conversion.UnitTests/OldVSProjectFileReader_Tests.cs
deleted file mode 100644
index 268e5d6c849..00000000000
--- a/src/Deprecated/Conversion.UnitTests/OldVSProjectFileReader_Tests.cs
+++ /dev/null
@@ -1,498 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.IO;
-using System.Text;
-
-using Microsoft.Build.Conversion;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Microsoft.Build.Shared;
-
-namespace Microsoft.Build.UnitTests
-{
- /***************************************************************************
- *
- * Class: OldVSProjectFileReader_Tests
- * Owner: RGoel
- *
- * This class contains the unit tests for the "OldVSProjectFileReader" class.
- * See the comments in that class for a description of its purpose.
- *
- **************************************************************************/
- [TestClass]
- public class OldVSProjectFileReader_Tests
- {
- /***********************************************************************
- *
- * Method: OldVSProjectFileReader_Tests.CreateTemporaryProjectFile
- * Owner: RGoel
- *
- * Helper method which creates a temporary text file on disk with the
- * specified contents. Returns the temp filename as an [out] parameter.
- *
- **********************************************************************/
- private void CreateTemporaryProjectFile
- (
- string projectFileContents,
- out string projectFilename
- )
- {
- projectFilename = FileUtilities.GetTemporaryFile();
-
- StreamWriter projectFile = new StreamWriter(projectFilename, false, Encoding.Default); // HIGHCHAR: Default means ANSI, ANSI is what VS .NET 2003 wrote. Without this, the project would be written as ASCII.
- projectFile.Write(projectFileContents);
- projectFile.Close();
- }
-
- /***********************************************************************
- *
- * Method: OldVSProjectFileReader_Tests.DeleteTemporaryProjectFile
- * Owner: RGoel
- *
- * Helper method to delete the temporary file created via
- * "CreateTemporaryProjectFile".
- *
- **********************************************************************/
- private void DeleteTemporaryProjectFile
- (
- string projectFilename
- )
- {
- File.Delete(projectFilename);
- }
-
- /***********************************************************************
- *
- * Method: OldVSProjectFileReader_Tests.NoSpecialCharacters
- * Owner: RGoel
- *
- * Tests the OldVSProjectFileReader class, using a project file that
- * does not contain any special characters.
- *
- **********************************************************************/
- [TestMethod]
- public void NoSpecialCharacters
- (
- )
- {
- // The contents of the project file that we'll be testing. Look at the
- // right side, for a cleaner copy without all the escaping.
- string projectFileContents =
-
- "\r\n" + //
- "\r\n" + //
- " \r\n" + // >
- " \r\n" + //
- "\r\n" + //
- "\r\n"; //
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Create a buffer to hold 20 characters.
- char[] characterBuffer = new char[20];
- int exceptionCount = 0;
- int charactersRead = 0;
-
- // Read the first 20 characters into our buffer.
- charactersRead = reader.Read(characterBuffer, 0, 20);
- Assert.AreEqual(20, charactersRead);
- Assert.AreEqual("\r\n\r\n \r\n\r\n\n Projeasic\r", new string(characterBuffer));
-
- // Try reading the next 30 characters. Since there's not enough room in our
- // buffer for 30 characters, this will fail.
- try
- {
- charactersRead = reader.Read(characterBuffer, 5, 30);
- }
- catch (ArgumentException)
- {
- exceptionCount++;
- }
- // Confirm that the proper exception was thrown and that the buffer
- // was not touched.
- Assert.AreEqual(1, exceptionCount);
- Assert.AreEqual(">\r\n\r\n\n Projeasic\r", new string(characterBuffer));
-
- // Read to the end of the current line.
- string readLine = reader.ReadLine();
- Assert.AreEqual("ctType = \"Local\"", readLine);
-
- // Read the next line.
- readLine = reader.ReadLine();
- Assert.AreEqual(" ProductVersion = \"7.10.3022\"", readLine);
-
- // Read the next character.
- int character = reader.Read();
- Assert.AreEqual(' ', character);
-
- // Read the next character.
- character = reader.Read();
- Assert.AreEqual(' ', character);
-
- // Peek at the next character, but don't advance the read pointer.
- character = reader.Peek();
- Assert.AreEqual('>', character);
-
- // Read the next 20 characters into our buffer.
- charactersRead = reader.Read(characterBuffer, 0, 20);
- // Read the next 20 characters into our buffer.
- charactersRead = reader.Read(characterBuffer, 0, 20);
-
- // Read the next 20 characters into our buffer. But actually, since
- // we're almost at the end of the file, we expect that only 7 characters
- // will actually be read.
- charactersRead = reader.Read(characterBuffer, 0, 20);
- Assert.AreEqual(7, charactersRead);
- Assert.AreEqual("ject>\r\nsualStudioPro", new string(characterBuffer));
-
- // Read the next 20 characters into our buffer. Now, we're really
- // at the end of the file already, so it should come back with zero
- // characters read.
- charactersRead = reader.Read(characterBuffer, 0, 20);
- Assert.AreEqual(0, charactersRead);
- Assert.AreEqual("ject>\r\nsualStudioPro", new string(characterBuffer));
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
-
- /***********************************************************************
- *
- * Method: OldVSProjectFileReader_Tests.XmlAttributesWithSpecialCharacters
- * Owner: RGoel
- *
- * Tests the OldVSProjectFileReader class, using a project file that
- * contains special characters in some of the XML attribute values.
- *
- **********************************************************************/
- [TestMethod]
- public void XmlAttributesWithSpecialCharacters
- (
- )
- {
- // The contents of the project file that we'll be testing. Look at the
- // right side, for a cleaner copy without all the escaping.
- string projectFileContents =
-
- "\r\n" + //
- "\r\n" + //
- " 3022\"\r\n" + // ProductVersion = "7<.10.>3022"
- " A=\"blah>\" B=\"bloo<\"\r\n" + // A="blah>" B="bloo<"
- " >\r\n" + // >
- " \r\n" + //
- "\r\n" + //
- "\r\n"; //
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Create a buffer to hold 30 characters.
- char[] characterBuffer = new char[30];
- int charactersRead = 0;
-
- // Read the first 30 characters into our buffer.
- charactersRead = reader.Read(characterBuffer, 0, 30);
- Assert.AreEqual(30, charactersRead);
- Assert.AreEqual("\r\n\r\n characters within an attribute value got translated correctly.
- charactersRead = reader.Read(characterBuffer, 10, 20);
- Assert.AreEqual(20, charactersRead);
- Assert.AreEqual("sualBasic\rLo<cal\"\r\n Prod", new string(characterBuffer));
-
- // Read the next 20 characters into our buffer. Confirm that the < and > characters within
- // an attribute value got translated correctly.
- charactersRead = reader.Read(characterBuffer, 0, 20);
- Assert.AreEqual(20, charactersRead);
- Assert.AreEqual("uctVersion = \"7<.\r\n Prod", new string(characterBuffer));
-
- // Read the remainder of the file. Confirm that the < and > characters within
- // an attribute value got translated correctly.
- string restOfFile = reader.ReadToEnd();
- Assert.AreEqual("10.>3022\"\r\n A=\"blah>\" B=\"bloo<\"\r\n >\r\n \r\n\r\n\r\n",
- restOfFile);
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
- /***********************************************************************
- *
- * Method: OldVSProjectFileReader_Tests.MultipleElementsOnSameLine
- * Owner: RGoel
- *
- * Tests the OldVSProjectFileReader class, using a project file that
- * contains multiple XML elements with attributes on the same line.
- * This will actually never happen in a real VS7/Everett project file,
- * but it's good to test it anyway.
- *
- **********************************************************************/
- [TestMethod]
- public void MultipleElementsOnSameLine
- (
- )
- {
- // The contents of the project file that we'll be testing. Look at the
- // right side, for a cleaner copy without all the escaping.
- string projectFileContents =
-
- ">ah\"/>"; //
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Read the whole file into a string. Confirm that the < and > characters within
- // an attribute value got translated correctly, but the < and > characters occurring
- // *outside* an attribute value are not touched.
- string wholeFile = reader.ReadToEnd();
- Assert.AreEqual("\r\n",
- wholeFile);
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
- ///
- /// Sometimes VS.NET 2002/2003 wrote out the attribute value using single-quotes instead
- /// of double-quotes (particularly when the value itself contained double-quotes). Therefore
- /// we make sure we handle this case properly.
- ///
- /// RGoel
- [TestMethod]
- public void AttributeValueUsingSingleQuotes
- (
- )
- {
- // The contents of the project file that we'll be testing.
- string projectFileContents =
- "";
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Read the whole file into a string. Confirm that the < and > characters within
- // an attribute value got translated correctly, but the < and > characters occurring
- // *outside* an attribute value are not touched.
- string wholeFile = reader.ReadToEnd();
- Assert.AreEqual("\r\n",
- wholeFile);
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
-
- ///
- /// Make sure that a lonely ampersand that is NOT legitimately used for escaping does get
- /// replaced with "&" by our reader.
- ///
- /// RGoel
- [TestMethod]
- public void AmpersandReplacement
- (
- )
- {
- // Single lonely ampersand. This should get replaced.
- Assert.AreEqual("blah&doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah&doo"));
-
- // Single lonely ampersand again, but this time with a semicolon at some point afterwards, just
- // to try and confuse the parser.
- Assert.AreEqual("blah&doo;doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah&doo;doo"));
-
- // An ampersand used to escape a legitimate special character should NOT be replaced by our function.
- Assert.AreEqual("blah<doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah<doo"));
-
- // An ampersand used to escape a legitimate special character should NOT be replaced by our function.
- Assert.AreEqual("blah<doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah<doo"));
-
- // If the code between the "&" and the ";" is not a legitimate number, then we SHOULD replace the "&".
- Assert.AreEqual("blah&#AB;doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blahAB;doo"));
-
- // A valid hexadecimal number should NOT be replaced.
- Assert.AreEqual("blah«doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah«doo"));
-
- // Check to make sure we can handle two replacements.
- Assert.AreEqual("blah&doo&heehee",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah&doo&heehee"));
-
- // Check to make sure we can handle a replacement at the end of a string.
- Assert.AreEqual("blahdoo&",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blahdoo&"));
-
- // Emptiness between the "&" and the ";" is not valid, and therefore the "&" should get replaced.
- Assert.AreEqual("blah&;doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah&;doo"));
-
- // Emptiness between the "#" and the ";" is not valid, and therefore the "&" should get replaced.
- Assert.AreEqual("blah&#;doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blahdoo"));
-
- // Emptiness between the "#x" and the ";" is not valid, and therefore the "&" should get replaced.
- Assert.AreEqual("blah&#x;doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blahdoo"));
-
- // Even characters beyond 256 should be considered valid.
- Assert.AreEqual("blahĘdoo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blahĘdoo"));
-
- // The VS.NET 2003 XML writer even persisted things like the copyright symbol as an entity.
- // So we need to be careful about not touching those.
- Assert.AreEqual("blah©doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah©doo"));
-
- // The VS.NET 2003 XML writer even persisted things like the copyright symbol as an entity.
- // So we need to be careful about not touching those.
- Assert.AreEqual("blah©doo",
- OldVSProjectFileReader.ReplaceSpecialCharactersInXmlAttributeString("blah©doo"));
- }
-
-
- ///
- /// VS .NET 2002/2003 wrote out projects in invalid XML in some cases. For example,
- /// an "&" character is not allowed in an XML attribute value, unless it is being
- /// used to escape some other special character (where that other character may itself
- /// be an ampersand). However, the VS .NET 2002/2003 XML writer did this all the time.
- /// In order for System.Xml to be able to handle it, we need to translate those bogus
- /// "&"'s to "&" before letting System.Xml have at it.
- ///
- /// RGoel
- [TestMethod]
- public void Regress322573
- (
- )
- {
- // The contents of the project file that we'll be testing.
- string projectFileContents =
- "";
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Read the whole file into a string. Confirm that the & character within
- // an attribute value got translated correctly.
- string wholeFile = reader.ReadToEnd();
- Assert.AreEqual("\r\n",
- wholeFile);
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
-
- ///
- /// VS .NET wrote out projects in ANSI format by default.
- /// We want to make sure those characters don't get stripped by our reader.
- ///
- [TestMethod]
- public void Regress184573()
- {
- // The contents of the project file that we'll be testing. Look at the
- // right side, for a cleaner copy without all the escaping.
- char c = '�';
- string projectFileContents = new string(c,1);
-
- // Create a temp file on disk with the above contents.
- string projectFilename;
- this.CreateTemporaryProjectFile(projectFileContents, out projectFilename);
-
- // Instantiate our class with the project file.
- OldVSProjectFileReader reader = new OldVSProjectFileReader(projectFilename);
-
- // Read the whole file into a string.
- string wholeFile = reader.ReadToEnd();
- Assert.IsTrue(wholeFile.Length > 0, "High-bit character was stripped.");
-
- // Create two different encodings.
- Encoding defaultEncoding = Encoding.Default;
- Encoding unicode = Encoding.Unicode;
-
- // Convert the string into a byte array.
- byte[] unicodeBytes = unicode.GetBytes(projectFileContents);
- // Perform the conversion from one encoding to the other.
- byte[] defaultEncodingBytes = Encoding.Convert(unicode, defaultEncoding, unicodeBytes);
-
- // Convert the new byte[] into a char[] and then into a string.
- char[] defaultEncodingChars = new char[defaultEncoding.GetCharCount(defaultEncodingBytes, 0, defaultEncodingBytes.Length)];
- defaultEncoding.GetChars(defaultEncodingBytes, 0, defaultEncodingBytes.Length, defaultEncodingChars, 0);
-
- Assert.IsTrue(defaultEncodingChars.Length > 0);
- Assert.IsTrue(wholeFile[0] == defaultEncodingChars[0], String.Format("Expected ANSI encoding of '{0}' to result in '{0}'. Instead it was '{1}'", c, defaultEncodingChars[0], wholeFile[0])
- );
-
- // Clean up.
- reader.Close();
- this.DeleteTemporaryProjectFile(projectFilename);
- }
-
- ///
- /// Tests that a single ampersand replacement works correctly at the beginning of
- /// a string, middle of a string, and end of a string.
- ///
- [TestMethod]
- public void ReplaceSingleAmpersand()
- {
- Assert.AreEqual("&1234", OldVSProjectFileReader.ReplaceAmpersandWithLiteral("&1234", 0));
- Assert.AreEqual("12&34", OldVSProjectFileReader.ReplaceAmpersandWithLiteral("12&34", 2));
- Assert.AreEqual("1234&", OldVSProjectFileReader.ReplaceAmpersandWithLiteral("1234&", 4));
- }
- }
-}
diff --git a/src/Deprecated/Conversion.UnitTests/ProjectFileConverter_Tests.cs b/src/Deprecated/Conversion.UnitTests/ProjectFileConverter_Tests.cs
deleted file mode 100644
index c2992c6631c..00000000000
--- a/src/Deprecated/Conversion.UnitTests/ProjectFileConverter_Tests.cs
+++ /dev/null
@@ -1,5982 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Xml;
-
-using Microsoft.Build.Conversion;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-using ProjectRootElement = Microsoft.Build.Construction.ProjectRootElement;
-
-namespace Microsoft.Build.UnitTests
-{
- internal static partial class Helpers
- {
- ///
- /// Converts a VS7/Everett project to Whidbey format, and compares the result with the expected
- /// contents to make sure they match.
- ///
- ///
- ///
- /// RGoel
- internal static void ConvertAndCompare
- (
- string sourceProjectContents,
- string targetProjectContents
- )
- {
- ConvertAndCompare(sourceProjectContents, targetProjectContents, null);
- }
-
- ///
- /// Converts a VS7/Everett project to Whidbey format, and compares the result with the expected
- /// contents to make sure they match.
- ///
- ///
- ///
- ///
- ///
- /// RGoel
- internal static void ConvertAndCompare
- (
- string sourceProjectContents,
- string targetProjectContents,
- string additionalDummyFileToCreateInEverettProjectDirectory,
- bool isMinorUpgrade = false
- )
- {
- string sourceProjectFile = ObjectModelHelpers.CreateTempFileOnDiskNoFormat(sourceProjectContents);
-
- string dummyExtraFile = null;
- if (additionalDummyFileToCreateInEverettProjectDirectory != null)
- {
- dummyExtraFile = Path.Combine(Path.GetDirectoryName(sourceProjectFile), additionalDummyFileToCreateInEverettProjectDirectory);
-
- File.WriteAllText(dummyExtraFile, String.Empty);
- }
-
- try
- {
- ProjectFileConverter converter = new ProjectFileConverter();
-
- converter.OldProjectFile = sourceProjectFile;
- converter.IsUserFile = false;
- converter.IsMinorUpgrade = isMinorUpgrade;
- ProjectRootElement project = converter.ConvertInMemory();
-
- Helpers.CompareProjectXml(targetProjectContents, project.RawXml);
- }
- finally
- {
- File.Delete(sourceProjectFile);
-
- if (dummyExtraFile != null)
- {
- File.Delete(dummyExtraFile);
- }
- }
- }
- }
-
- /***************************************************************************
- *
- * Class: ProjectFileConverter_Tests
- * Owner: jomof
- *
- * This class contains the unit tests for the " ProjectFileConverter" class.
- * See the comments in that class for a description of its purpose.
- *
- **************************************************************************/
- [TestClass]
- public class ProjectFileConverter_Tests
- {
- /***********************************************************************
- *
- * Method: ProjectFileConverter_Tests.MakeRelativeWithHash
- * Owner: jomof
- *
- * Test where paths with '#' in them can be converted into relative
- * paths
- *
- **********************************************************************/
- [TestMethod]
- public void MakeRelativeWithHash()
- {
- // Intentionally making the paths not the same case, because this should be irrelevant.
- string path1 = @"D:\Public\Samples\Visual J# .NET 2003\Crosslanguage\Copy (8) of TilePuzzle\TileDriver\TileDriver.vcproj";
- string path2 = @"D:\public\Samples\Visual J# .NET 2003\Crosslanguage\Copy (8) of TilePuzzle\PUZZLE.vjsproj";
-
- string rel = ProjectFileConverter.RelativePathTo(path2, path1);
- Console.WriteLine(rel);
-
- Assert.AreEqual(@"TileDriver\TileDriver.vcproj", rel);
- }
-
- /***********************************************************************
- *
- * Method: ProjectFileConverter_Tests.MakeRelativeWithSpace
- * Owner: RGoel
- *
- * Test where paths where the relative path ends up having a in
- * it.
- *
- **********************************************************************/
- [TestMethod]
- public void MakeRelativeWithSpace()
- {
- string path1 = @"D:\Public\Samples\Tile Driver\Tile#Driver.vcproj";
- string path2 = @"D:\public\Samples\Main App\Main App.vcproj";
-
- string rel = ProjectFileConverter.RelativePathTo(path2, path1);
- Console.WriteLine(rel);
-
- Assert.AreEqual(@"..\Tile Driver\Tile#Driver.vcproj", rel);
- }
-
- ///
- /// Per this bug, any references to resx files that were empty
- /// should be removed from the project. The files should not be
- /// deleted though.
- ///
- [TestMethod]
- public void RemoveReferencesToEmptyResxPerBug248965()
- {
- string temp = Path.GetTempPath();
- string projFolder = temp + "\\projfolder";
- Directory.CreateDirectory(projFolder);
- string projectFile = projFolder + "\\project.proj";
- string resxFile1 = projFolder + "\\emptyresx1.resx";
- string resxFile2 = projFolder + "\\resx2.resx";
- string resxFile3 = projFolder + "\\emptyresx3.resx";
- string resxFile4 = projFolder + "\\resx4.resx";
- string resxFile5 = temp + "\\emptyresx5.resx";
- string resxFile6 = temp + "\\resx6.resx";
- string newProjectFile = "";
-
- #region projectContent
- string projectContent =
- @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
- #endregion
-
- try
- {
- using (StreamWriter sw = new StreamWriter(projectFile))
- sw.Write(projectContent);
- using (StreamWriter sw = new StreamWriter(resxFile1))
- sw.Write("");
- using (StreamWriter sw = new StreamWriter(resxFile2))
- sw.Write("not empty blah blah");
- using (StreamWriter sw = new StreamWriter(resxFile3))
- sw.Write("");
- using (StreamWriter sw = new StreamWriter(resxFile4))
- sw.Write("not empty blah blah");
- using (StreamWriter sw = new StreamWriter(resxFile5))
- sw.Write("");
- using (StreamWriter sw = new StreamWriter(resxFile6))
- sw.Write("not empty blah blah");
-
- ProjectFileConverter projectFileConverter = new ProjectFileConverter();
- projectFileConverter.OldProjectFile = projectFile;
- newProjectFile = projectFile + ".1";
- projectFileConverter.NewProjectFile = newProjectFile;
- projectFileConverter.IsUserFile = false;
- projectFileConverter.Convert(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath));
-
- string newContent;
- using (StreamReader sr = new StreamReader(newProjectFile))
- {
- newContent = sr.ReadToEnd();
- }
-
- #region expectedContent
- string expectedContent = @"
-
-
- Form
-
-
- Form
-
-
-
- resx6.resx
-
-
- " + Path.GetFileNameWithoutExtension(resxFile2) + @".cs
-
-
- ";
- #endregion
-
- Console.WriteLine("=actual=");
- Console.WriteLine(newContent);
- Console.WriteLine("==");
- Console.WriteLine("=expected=");
- Console.WriteLine(expectedContent);
- Console.WriteLine("==");
-
- Assert.AreNotEqual(-1, newContent.IndexOf(expectedContent));
-
- // shouldn't delete any
- Assert.IsTrue(File.Exists(resxFile1));
- Assert.IsTrue(File.Exists(resxFile2));
- Assert.IsTrue(File.Exists(resxFile3));
- Assert.IsTrue(File.Exists(resxFile4));
- Assert.IsTrue(File.Exists(resxFile5));
- Assert.IsTrue(File.Exists(resxFile6));
-
- }
- finally
- {
- if (File.Exists(projectFile)) File.Delete(projectFile);
- if (File.Exists(newProjectFile)) File.Delete(newProjectFile);
- if (File.Exists(resxFile1)) File.Delete(resxFile1);
- if (File.Exists(resxFile2)) File.Delete(resxFile2);
- if (File.Exists(resxFile3)) File.Delete(resxFile3);
- if (File.Exists(resxFile4)) File.Delete(resxFile4);
- if (File.Exists(resxFile5)) File.Delete(resxFile5);
- if (File.Exists(resxFile6)) File.Delete(resxFile6);
- if (Directory.Exists(projFolder)) Directory.Delete(projFolder);
- }
- }
-
- ///
- /// This is a regression test for bug VSWhidbey 414632. We're testing to make sure that if the Everett
- /// project already had a value for MyType that the conversion utility should not overwrite it.
- ///
- /// RGoel
- [TestMethod]
- public void VbConversionWithMyTypeAlreadySet()
- {
- // **********************************************
- // EVERETT
- // **********************************************
- string everettProjectContents = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- // **********************************************
- // WHIDBEY
- // **********************************************
- string whidbeyProjectContents = @"
-
-
- Local
- WindowsForms
- 2.0
- Debug
- AnyCPU
- Project1
- WinExe
- Project1.Form1
- 1
- 0
- 0
- False
- Microsoft
- Project1
- 20
-
-
- .\bin\
- Project1.xml
- True
- True
- True
- Win32=True
- 42016,42017,42018,42019,42032,42353,42354,42355
- full
-
-
- .\bin\
- Project1.xml
- False
- False
- True
- Win32=True
- 42016,42017,42018,42019,42032,42353,42354,42355
- none
-
-
-
- Microsoft.VisualBasic.Compatibility
-
-
- System
-
-
- System.Data
-
-
- System.Drawing
-
-
- System.Windows.Forms
-
-
- System.XML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Code
- Form1.vb
-
-
- Form
-
-
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(everettProjectContents, whidbeyProjectContents, "Form1.resx");
- }
-
- ///
- /// This is a regression test for bug VSWhidbey 477054. We're testing to make sure that if the Everett
- /// project was a Trinity project and has a reference to an Office document file in the UserProperties
- /// section, that we correctly add this as an item "None" in the converted project.
- ///
- /// RGoel
- [TestMethod]
- public void ConvertTrinityWithOfficeDocumentFile()
- {
- // **********************************************
- // EVERETT
- // **********************************************
- string everettProjectContents = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- // **********************************************
- // WHIDBEY
- // **********************************************
- string whidbeyProjectContents = @"
-
-
- Local
- 2.0
- {305E5110-3086-465A-A246-9D9718726777}
- Debug
- AnyCPU
-
-
- ExcelProject1
-
- JScript
- Grid
- IE50
- false
- Library
- ExcelProject1
- OnBuildSuccess
-
- {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 20
-
-
- bin\Debug\
- false
- 285212672
- false
-
- DEBUG;TRACE
-
- true
- 4096
- false
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
- TRACE
-
- false
- 4096
- false
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- {00020813-0000-0000-C000-000000000046}
- 1
- 5
- 0
- primary
-
-
- {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}
- 2
- 3
- 0
- primary
-
-
- {0D452EE1-E08F-101A-852E-02608C4D0BB4}
- 2
- 0
- 0
- primary
-
-
- {0002E157-0000-0000-C000-000000000046}
- 5
- 3
- 0
- primary
-
-
- System
-
-
- System.Data
-
-
- System.Windows.Forms
-
-
- System.XML
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(everettProjectContents, whidbeyProjectContents, "EXCELPROJECT1.XLS");
- }
-
- ///
- /// This is to test that we convert nodes correctly. It's not rocket
- /// science, but we need to cover it.
- ///
- /// RGoel
- [TestMethod]
- public void ConvertEmptyFolders()
- {
- // **********************************************
- // EVERETT
- // **********************************************
- string everettProjectContents = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- // **********************************************
- // WHIDBEY
- // **********************************************
- string whidbeyProjectContents = @"
-
-
-
- Local
- 2.0
- Debug
- AnyCPU
-
- 20
-
-
- .xml
- 42016,42017,42018,42019,42032,42353,42354,42355
-
-
- .xml
- 42016,42017,42018,42019,42032,42353,42354,42355
-
-
-
- System
-
-
-
-
-
-
-
-
- Code
-
-
- Form
-
-
-
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(everettProjectContents, whidbeyProjectContents, "Form1.resx");
- }
-
- ///
- /// This is to test that we convert P2P references correctly by looking up the
- /// referenced project in the passed-in .SLN file.
- ///
- /// RGoel
- [TestMethod]
- public void ConvertP2PReference()
- {
- // **********************************************
- // EVERETT PROJECT
- // **********************************************
- string resxFile = Path.Combine(Path.GetTempPath(), "Form1.resx");
- File.WriteAllText(resxFile, String.Empty);
-
- string everettProjectFile = ObjectModelHelpers.CreateTempFileOnDiskNoFormat(@"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- // **********************************************
- // EVERETT SOLUTION
- // **********************************************
- string everettSolutionFile = ObjectModelHelpers.CreateTempFileOnDiskNoFormat(
-
- @"Microsoft Visual Studio Solution File, Format Version 8.00
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `WindowsApplication2`, `WindowsApplication2.csproj`, `{77E21864-797C-4220-974E-530BB832801B}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `ClassLibrary1`, `..\ClassLibrary1\ClassLibrary1.csproj`, `{F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {77E21864-797C-4220-974E-530BB832801B}.Debug.ActiveCfg = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Debug.Build.0 = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.ActiveCfg = Release|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.Build.0 = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.ActiveCfg = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.Build.0 = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.ActiveCfg = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.Build.0 = Release|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
- EndGlobal
- ");
-
- // **********************************************
- // WHIDBEY PROJECT
- // **********************************************
- string whidbeyProjectContents = @"
-
-
-
- Local
- 2.0
- {77E21864-797C-4220-974E-530BB832801B}
- Debug
- AnyCPU
- App.ico
- 20
-
-
- bin\Debug\
- prompt
-
-
- bin\Release\
- prompt
-
-
-
- ClassLibrary1
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
-
- System
-
-
- System.XML
-
-
-
-
- Form
-
-
-
-
-
-
-
-
- ";
-
- ProjectFileConverter converter = new ProjectFileConverter();
- converter.OldProjectFile = everettProjectFile;
- converter.SolutionFile = everettSolutionFile;
- converter.IsUserFile = false;
-
- ProjectRootElement project = converter.ConvertInMemory();
-
- Helpers.CompareProjectXml(whidbeyProjectContents, project.RawXml);
-
- File.Delete(resxFile);
- File.Delete(everettProjectFile);
- File.Delete(everettSolutionFile);
- }
-
- ///
- /// This is to test that we convert Everett projects that are part of solutions including
- /// VC++ projects.
- ///
- [TestMethod]
- public void ConvertProjectWithVCInSolutionAndP2Ps()
- {
- // **********************************************
- // EVERETT PROJECT
- // **********************************************
- string resxFile = Path.Combine(Path.GetTempPath(), "Form1.resx");
- File.WriteAllText(resxFile, String.Empty);
-
- string everettProjectFile = ObjectModelHelpers.CreateTempFileOnDiskNoFormat(@"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- // **********************************************
- // EVERETT SOLUTION
- // **********************************************
- string everettSolutionFile = ObjectModelHelpers.CreateTempFileOnDiskNoFormat(
-
- @"Microsoft Visual Studio Solution File, Format Version 8.00
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `WindowsApplication2`, `WindowsApplication2.csproj`, `{77E21864-797C-4220-974E-530BB832801B}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `ClassLibrary1`, `..\ClassLibrary1\ClassLibrary1.csproj`, `{F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Project(`{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}`) = `VCClassLibrary1`, `..\VCClassLibrary1\VCClassLibrary1.vcproj`, `{6C4A36F7-F091-432A-9CA0-98FF2DEA9F33}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {77E21864-797C-4220-974E-530BB832801B}.Debug.ActiveCfg = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Debug.Build.0 = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.ActiveCfg = Release|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.Build.0 = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.ActiveCfg = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.Build.0 = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.ActiveCfg = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.Build.0 = Release|.NET
- {6C4A36F7-F091-432A-9CA0-98FF2DEA9F33}.Debug.ActiveCfg = Debug|.NET
- {6C4A36F7-F091-432A-9CA0-98FF2DEA9F33}.Debug.Build.0 = Debug|.NET
- {6C4A36F7-F091-432A-9CA0-98FF2DEA9F33}.Release.ActiveCfg = Release|.NET
- {6C4A36F7-F091-432A-9CA0-98FF2DEA9F33}.Release.Build.0 = Release|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
- EndGlobal
- ");
-
- // **********************************************
- // WHIDBEY PROJECT
- // **********************************************
- string whidbeyProjectContents = @"
-
-
-
- Local
- 2.0
- {77E21864-797C-4220-974E-530BB832801B}
- Debug
- AnyCPU
- App.ico
- 20
-
-
- bin\Debug\
- prompt
-
-
- bin\Release\
- prompt
-
-
-
- ClassLibrary1
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
-
- System
-
-
- System.XML
-
-
-
-
- Form
-
-
-
-
-
-
-
-
- ";
-
- ProjectFileConverter converter = new ProjectFileConverter();
- converter.OldProjectFile = everettProjectFile;
- converter.SolutionFile = everettSolutionFile;
- converter.IsUserFile = false;
-
- ProjectRootElement project = converter.ConvertInMemory();
-
- Helpers.CompareProjectXml(whidbeyProjectContents, project.RawXml);
-
- File.Delete(resxFile);
- File.Delete(everettProjectFile);
- File.Delete(everettSolutionFile);
- }
-
- ///
- /// This is to test that we convert P2P references correctly by looking up the
- /// referenced project in the given .SLN file. Force the conversion code to
- /// have to search for the .SLN file.
- ///
- /// RGoel
- [TestMethod]
- public void ConvertP2PReferenceSearchForSolution()
- {
- ObjectModelHelpers.DeleteTempProjectDirectory();
-
- // **********************************************
- // EVERETT PROJECT
- // **********************************************
- string everettProjectFileRelativePath = @"Project\WindowsApplication1.csproj";
- ObjectModelHelpers.CreateFileInTempProjectDirectory(everettProjectFileRelativePath, @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- string resxFile = "Project\\Form1.resx";
- ObjectModelHelpers.CreateFileInTempProjectDirectory(resxFile, String.Empty);
-
- // **********************************************
- // EVERETT SOLUTION
- // **********************************************
- ObjectModelHelpers.CreateFileInTempProjectDirectory(@"WindowsApplication1.sln",
-
- @"Microsoft Visual Studio Solution File, Format Version 8.00
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `WindowsApplication1`, `Project\WindowsApplication1.csproj`, `{77E21864-797C-4220-974E-530BB832801B}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `ClassLibrary1`, `ClassLibrary1\ClassLibrary1.csproj`, `{F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {77E21864-797C-4220-974E-530BB832801B}.Debug.ActiveCfg = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Debug.Build.0 = Debug|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.ActiveCfg = Release|.NET
- {77E21864-797C-4220-974E-530BB832801B}.Release.Build.0 = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.ActiveCfg = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Debug.Build.0 = Debug|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.ActiveCfg = Release|.NET
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}.Release.Build.0 = Release|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
- EndGlobal
- ");
-
- // **********************************************
- // RANDOM OTHER SOLUTION
- // **********************************************
- ObjectModelHelpers.CreateFileInTempProjectDirectory(@"Project\Random.sln",
-
- @"Microsoft Visual Studio Solution File, Format Version 8.00
- Project(`{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}`) = `ClassLibrary2`, `ClassLibrary2\ClassLibrary2.csproj`, `{11111111-9E5C-4FE8-BE84-96F37D47F45A}`
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
- EndProject
- Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Release = Release
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {11111111-9E5C-4FE8-BE84-96F37D47F45A}.Debug.ActiveCfg = Debug|.NET
- {11111111-9E5C-4FE8-BE84-96F37D47F45A}.Debug.Build.0 = Debug|.NET
- {11111111-9E5C-4FE8-BE84-96F37D47F45A}.Release.ActiveCfg = Release|.NET
- {11111111-9E5C-4FE8-BE84-96F37D47F45A}.Release.Build.0 = Release|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
- EndGlobal
- ");
-
- // **********************************************
- // WHIDBEY PROJECT
- // **********************************************
- string whidbeyProjectContents = @"
-
-
-
- Local
- 2.0
- {77E21864-797C-4220-974E-530BB832801B}
- Debug
- AnyCPU
- App.ico
- 20
-
-
- bin\Debug\
- prompt
-
-
- bin\Release\
- prompt
-
-
-
- ClassLibrary1
- {F532DD6D-9E5C-4FE8-BE84-96F37D47F45A}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
-
- System
-
-
- System.XML
-
-
-
-
- Form
-
-
-
-
-
-
-
-
- ";
-
- ProjectFileConverter converter = new ProjectFileConverter();
- converter.OldProjectFile = Path.Combine(ObjectModelHelpers.TempProjectDir, everettProjectFileRelativePath);
- converter.IsUserFile = false;
- ProjectRootElement project = converter.ConvertInMemory();
-
- Helpers.CompareProjectXml(whidbeyProjectContents, project.RawXml);
- }
-
- ///
- /// This is a test for bug VSWhidbey 472064. We are making sure that if DebugSymbols is true in
- /// the original project file, then we also emit DebugType to the whidbey project file. We also
- /// emit ErrorReport = prompt to the whidbey project file if the language is C#
- ///
- /// FaisalMo
- [TestMethod]
- public void ConvertEverettProjectWithNoDebugInfoFlag()
- {
- // **********************************************
- // EVERETT
- // **********************************************
- string everettProjectContents = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- // **********************************************
- // WHIDBEY
- // **********************************************
- string whidbeyProjectContents = @"
-
-
- Local
- 2.0
- {172D0AFF-7BF3-4297-8168-792C46DC89DD}
- Debug
- AnyCPU
- App.ico
-
- ConsoleApplication1
-
- JScript
- Grid
- IE50
- false
- Exe
- ConsoleApplication1
- OnBuildSuccess
-
- 20
-
-
- bin\Debug\
- false
- 285212672
- false
-
- DEBUG;TRACE
-
- true
- 4096
- false
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
- TRACE
-
- false
- 4096
- false
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- System
-
-
- System.Data
-
-
- System.XML
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(everettProjectContents, whidbeyProjectContents);
- }
-
- ///
- /// This is a test for converting Everett projects that had special characters in the AssemblyName,
- /// OutputPath, config name, etc. These characters need to be escaped when converted to MSBuild.
- ///
- /// RGoel
- [TestMethod]
- public void ConvertEverettProjectWithSpecialCharaceters()
- {
- // **********************************************
- // EVERETT
- // **********************************************
- string everettProjectContents = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- // **********************************************
- // WHIDBEY
- // **********************************************
- string whidbeyProjectContents = @"
-
-
- Local
- 2.0
- {172D0AFF-7BF3-4297-8168-792C46DC89DD}
- Debug
- AnyCPU
- App.ico
-
- Console%3bApplication1
-
- JScript
- Grid
- IE50
- false
- Exe
- ConsoleApplication1
- OnBuildSuccess
-
- 20
-
-
- bin\Debu%40foo - %24%28hello%29g\
- false
- 285212672
- false
-
- DEBUG;TRACE
-
- true
- 4096
- false
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
- TRACE
-
- false
- 4096
- false
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- Microsoft.My%27Different%3bAssemb%25ly
- D:\myapps\Microsoft.My%27Different%3bAssemb%25ly.dll
-
-
- System
-
-
- System.Data
-
-
- System.XML
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
- echo $(TargetPath)
- echo %25DEBUGGER%25
-
-
- ";
-
- Helpers.ConvertAndCompare(everettProjectContents, whidbeyProjectContents);
- }
-
- ///
- /// Dev10 Bug 557388: When converting a project to v4.0, if the project contains
- /// references to v3.5 and before VC projects (.vcproj), convert that reference to
- /// instead reference a .vcxproj of the same name.
- ///
- [TestMethod]
- public void ConvertVCProjectReferenceExtensions()
- {
- string orcasProjectFileContents = @"
-
-
-
-
-
- ";
-
- string dev10projectContents = @"
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(orcasProjectFileContents, dev10projectContents);
- }
-
- ///
- /// Dev10 Bug 557388: When converting a project to v4.0, if the project contains
- /// references to v3.5 and before VC projects (.vcproj), convert that reference to
- /// instead reference a .vcxproj of the same name.
- ///
- [TestMethod]
- public void ConvertVCProjectReferenceExtensionsWildcard()
- {
- string orcasProjectFileContents = @"
-
-
-
-
-
- ";
-
- string dev10projectContents = @"
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(orcasProjectFileContents, dev10projectContents);
- }
-
- ///
- /// Dev10 Bug 557388: When converting a project to v4.0, if the project contains
- /// references to v3.5 and before VC projects (.vcproj), convert that reference to
- /// instead reference a .vcxproj of the same name.
- ///
- [TestMethod]
- public void ConvertVCProjectReferenceExtensionsTrimNeeded()
- {
- string orcasProjectFileContents = @"
-
-
-
-
-
- ";
-
- string dev10projectContents = @"
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(orcasProjectFileContents, dev10projectContents);
- }
-
- [TestMethod]
- public void ConvertProjectFileWithClientSubset()
- {
- string orcasProjectFileClient = @"
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {3D948CB8-F515-41D5-B0ED-4215ED0A6D76}
- Exe
- Properties
- FxProfile
- FxProfile
- v3.5
- Client
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- string dev12ProjectFileClient = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {3D948CB8-F515-41D5-B0ED-4215ED0A6D76}
- Exe
- Properties
- FxProfile
- FxProfile
- v3.5
- 512
- Client
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(orcasProjectFileClient, dev12ProjectFileClient);
- }
-
- [TestMethod]
- public void ConvertProjectFileWithFullSubset()
- {
- string orcasProjectFileFull = @"
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {3D948CB8-F515-41D5-B0ED-4215ED0A6D76}
- Exe
- Properties
- FxProfile
- FxProfile
- v3.5
- Full
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- string dev12ProjectFileFull = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- AnyCPU
- 9.0.21022
- 2.0
- {3D948CB8-F515-41D5-B0ED-4215ED0A6D76}
- Exe
- Properties
- FxProfile
- FxProfile
- v3.5
- 512
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(orcasProjectFileFull, dev12ProjectFileFull);
- }
-
- [TestMethod]
- public void ConvertFSharpOrcasProjectFile()
- {
- string fsharpOrcasProjectFile = @"
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {4516a96a-098b-408b-b914-71d82752c1cb}
- Exe
- ImportToDev10
- ImportToDev10
- v3.5
- 512
- ImportToDev10
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 3
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 3
-
-
-
-
- 3.5
-
-
-
-
-
-
-
-
- ";
- string fsharpDev10ProjectFile = @"
-
-
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {4516a96a-098b-408b-b914-71d82752c1cb}
- Exe
- ImportToDev10
- ImportToDev10
- v3.5
- 512
- ImportToDev10
- 2.3.0.0
- 11
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 3
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 3
-
-
-
- True
-
-
-
-
- 3.5
-
-
-
-
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
- ";
- Helpers.ConvertAndCompare(fsharpOrcasProjectFile, fsharpDev10ProjectFile);
- }
-
- [TestMethod]
- public void ConvertDev11PortableLibraryProjectFile()
- {
- string sampleDev11PortableLibraryProjectFile = @"
-
-
-
- Debug
- AnyCPU
- 2.0
- abe4e969-375e-463c-8db0-005e32337771
- Library
- PortableLibrary1
- PortableLibrary1
- v4.0
- Profile47
- PortableLibrary1
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- bin\Debug\PortableLibrary1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- bin\Release\PortableLibrary1.XML
-
-
-
- FSharp.Core
- FSharp.Core.dll
- $(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable\FSharp.Core.dll
-
-
-
-
-
-
-
- 11
-
-
-
-
- ";
-
- string asDev12ProjectFile = @"
-
-
-
- Debug
- AnyCPU
- 2.0
- abe4e969-375e-463c-8db0-005e32337771
- Library
- PortableLibrary1
- PortableLibrary1
- v4.0
- Profile47
- PortableLibrary1
- 2.3.5.0
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- bin\Debug\PortableLibrary1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- bin\Release\PortableLibrary1.XML
-
-
-
- $(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\$(TargetFSharpCoreVersion)\FSharp.Core.dll
- True
-
-
-
-
-
-
-
- 11
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(sampleDev11PortableLibraryProjectFile, asDev12ProjectFile);
- }
-
- [TestMethod]
- public void ConvertDev12PortableLibraryProjectFileShouldBeNoOp()
- {
- string asDev12ProjectFile = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
- Debug
- AnyCPU
- 2.0
- abe4e969-375e-463c-8db0-005e32337771
- Library
- PortableLibrary1
- PortableLibrary1
- v4.0
- Profile47
- PortableLibrary1
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- bin\Debug\PortableLibrary1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- bin\Release\PortableLibrary1.XML
-
-
-
- FSharp.Core
- FSharp.Core.dll
- $(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable\FSharp.Core.dll
-
-
-
-
-
-
-
- 11
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(asDev12ProjectFile, asDev12ProjectFile);
- }
-
- [TestMethod]
- public void ConvertFSharpDev10ProjectFile()
- {
- // pick standard proj from dev10, do conversion
- string sampleFSharpDev10ProjectFile = @"
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {83a887ac-cd45-4d4a-a769-324d9055ac97}
- Exe
- ConsoleApplication1
- ConsoleApplication1
- v4.0
- Client
- ConsoleApplication1
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication1.XML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
- string asDev11ProjectFile = @"
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {83a887ac-cd45-4d4a-a769-324d9055ac97}
- Exe
- ConsoleApplication1
- ConsoleApplication1
- v4.0
- Client
- ConsoleApplication1
- 4.3.0.0
- 11
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication1.XML
-
-
-
- True
-
-
-
-
-
-
-
-
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
- ";
- Helpers.ConvertAndCompare(sampleFSharpDev10ProjectFile, asDev11ProjectFile);
- }
-
- [TestMethod]
- public void ConvertFSharpDev10ProjectFileWithMinVS()
- {
- // pick standard proj from dev10, do conversion
- string sampleFSharpDev10ProjectFile = @"
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {83a887ac-cd45-4d4a-a769-324d9055ac97}
- Exe
- ConsoleApplication1
- ConsoleApplication1
- v4.0
- Client
- ConsoleApplication1
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication1.XML
-
-
-
-
-
-
-
-
-
-
-
-
- 10
-
-
-
-
-
- ";
- string asDev11ProjectFile = @"
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {83a887ac-cd45-4d4a-a769-324d9055ac97}
- Exe
- ConsoleApplication1
- ConsoleApplication1
- v4.0
- Client
- ConsoleApplication1
- 4.3.0.0
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication1.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication1.XML
-
-
-
- True
-
-
-
-
-
-
-
-
-
-
- 10
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
- ";
- Helpers.ConvertAndCompare(sampleFSharpDev10ProjectFile, asDev11ProjectFile);
- }
-
- [TestMethod]
- public void ConvertFSharpDev11ProjectFile()
- {
- string sampleDev11Project = @"
-
-
- Debug
- x86
- 2.0
- {bfafbde5-287f-430e-85ed-e5cdfc71213b}
- Exe
- ConsoleApplication2
- ConsoleApplication2
- v4.5
- Client
- ConsoleApplication2
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication2.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication2.XML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- string aDev12Project = @"
-
-
- Debug
- x86
- 2.0
- {bfafbde5-287f-430e-85ed-e5cdfc71213b}
- Exe
- ConsoleApplication2
- ConsoleApplication2
- v4.5
- Client
- ConsoleApplication2
- 4.3.0.0
- 11
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication2.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication2.XML
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
-
-
-
-
- True
-
-
-
-
-
-
-
-
- ";
- Helpers.ConvertAndCompare(sampleDev11Project, aDev12Project);
- }
-
- [TestMethod]
- public void ConvertFSharpDev11ProjectFileWithCustomFSharpCoreLocation()
- {
- string sampleDev11Project = @"
-
-
- Debug
- x86
- 2.0
- {bfafbde5-287f-430e-85ed-e5cdfc71213b}
- Exe
- ConsoleApplication2
- ConsoleApplication2
- v4.5
- Client
- ConsoleApplication2
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication2.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication2.XML
-
-
-
-
-
-
-
-
-
-
-
- c:\some-custom-location\FSharp.Core.dll
-
-
-
-
-
-
-
- ";
-
- string aDev12Project = @"
-
-
- Debug
- x86
- 2.0
- {bfafbde5-287f-430e-85ed-e5cdfc71213b}
- Exe
- ConsoleApplication2
- ConsoleApplication2
- v4.5
- Client
- ConsoleApplication2
- 11
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication2.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication2.XML
-
-
-
-
- $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
-
-
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
-
-
-
-
-
-
-
-
-
- c:\some-custom-location\FSharp.Core.dll
-
-
-
-
-
-
-
- ";
- Helpers.ConvertAndCompare(sampleDev11Project, aDev12Project);
- }
-
- [TestMethod]
- public void ConvertFSharpDev12ProjectFileShouldBeNoOp()
- {
- string aDev12Project = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- x86
- 2.0
- {bfafbde5-287f-430e-85ed-e5cdfc71213b}
- Exe
- ConsoleApplication2
- ConsoleApplication2
- v4.5
- Client
- ConsoleApplication2
-
-
- true
- full
- false
- false
- bin\Debug\
- DEBUG;TRACE
- 3
- x86
- bin\Debug\ConsoleApplication2.XML
-
-
- pdbonly
- true
- true
- bin\Release\
- TRACE
- 3
- x86
- bin\Release\ConsoleApplication2.XML
-
-
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
-
-
- 12
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
- Helpers.ConvertAndCompare(aDev12Project, aDev12Project); // ensure no change
- }
-
- [TestMethod]
- public void ConvertWFProjectFile()
- {
- string wfWhidbeyProjectFile = @"
-
-
- Debug
- 8.0.50727
- 2.0
- {60A2C065-FE5A-4A8F-808D-506BE3007BBD}
- Library
- WorkflowLibrary1
- WorkflowLibrary1
- {14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
-
-
- true
- full
- false
- .\bin\Debug\
- DEBUG;TRACE
- false
-
-
- false
- true
- .\bin\Release\
- TRACE
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SettingsSingleFileGenerator
- Settings.cs
-
-
- Component
-
-
- Workflow1.cs
-
-
- True
- Settings.settings
-
-
-
-
-
-
- ";
- string wfDev10ProjectFile = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- 8.0.50727
- 2.0
- {60A2C065-FE5A-4A8F-808D-506BE3007BBD}
- Library
- WorkflowLibrary1
- WorkflowLibrary1
- {14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 4
- v3.0
-
-
- true
- full
- false
- .\bin\Debug\
- DEBUG;TRACE
- false
-
-
- false
- true
- .\bin\Release\
- TRACE
- false
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SettingsSingleFileGenerator
- Settings.cs
-
-
- Component
-
-
- Workflow1.cs
-
-
- True
- Settings.settings
-
-
-
-
-
-
- ");
- Helpers.ConvertAndCompare(wfWhidbeyProjectFile, wfDev10ProjectFile);
- }
-
- [TestMethod]
- public void ConvertVisualBasicVS2005Project() {
- string wfWhidbeyProjectFile = @"
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {280AE511-8349-4296-8296-9EF098121639}
- Exe
- ConsoleApplication21.Module1
- ConsoleApplication21
- ConsoleApplication21
- 512
- Console
- v3.5
- On
- Binary
- Off
- On
-
-
- true
- full
- true
- true
- bin\Debug\
- ConsoleApplication21.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- ConsoleApplication21.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
-
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
- string wfDev10ProjectFile = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {280AE511-8349-4296-8296-9EF098121639}
- Exe
- ConsoleApplication21.Module1
- ConsoleApplication21
- ConsoleApplication21
- 512
- Console
- v3.5
- On
- Binary
- Off
- On
-
-
- true
- full
- true
- true
- bin\Debug\
- ConsoleApplication21.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- ConsoleApplication21.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355
-
-
-
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
- Helpers.ConvertAndCompare(wfWhidbeyProjectFile, wfDev10ProjectFile);
- }
-
- #region VS2011
-
- ///
- /// A VS2010 C# project file which requires Repair
- ///
- [TestMethod]
- public void ConvertVB2008RepairRequired()
- {
- string ProjectBefore = @"
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {C7234361-F078-473B-BCA0-2E62A6DE4D46}
- {349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
- Library
- Vs2008Sp1_Wap_35_Vb
- Vs2008Sp1_Wap_35_Vb
- v3.5
- Custom
- On
- Binary
- Off
- On
-
-
- true
- full
- true
- true
- bin\
- Vs2008Sp1_Wap_35_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\
- Vs2008Sp1_Wap_35_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ASPXCodeBehind
- Default.aspx
-
-
- Default.aspx
-
-
-
- True
- Application.myapp
-
-
- Microsoft.VisualBasic.Web.MyExtension
- 1.0.0.0
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- Site1.Master
-
-
- Site1.Master
- ASPXCodeBehind
-
-
- WebForm1.aspx
-
-
- WebForm1.aspx
- ASPXCodebehind
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- True
- 64194
- /
-
-
- False
- False
-
-
- False
-
-
-
-
-";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {C7234361-F078-473B-BCA0-2E62A6DE4D46}
- {349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}
- Library
- Vs2008Sp1_Wap_35_Vb
- Vs2008Sp1_Wap_35_Vb
- v3.5
- Custom
- On
- Binary
- Off
- On
-
-
- true
- full
- true
- true
- bin\
- Vs2008Sp1_Wap_35_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355
-
-
- pdbonly
- false
- true
- true
- bin\
- Vs2008Sp1_Wap_35_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,42353,42354,42355
-
-
-
-
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
- 3.5
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ASPXCodeBehind
- Default.aspx
-
-
- Default.aspx
-
-
-
- True
- Application.myapp
-
-
- Microsoft.VisualBasic.Web.MyExtension
- 1.0.0.0
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
- Site1.Master
-
-
- Site1.Master
- ASPXCodeBehind
-
-
- WebForm1.aspx
-
-
- WebForm1.aspx
- ASPXCodebehind
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
-
-
-
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
-
-
-
-
-
- False
- True
- 64194
- /
-
-
- False
- False
-
-
- False
-
-
-
-
-");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// A VS2010 C# project file which requires Repair
- ///
- [TestMethod]
- public void ConvertCSharp2010RepairRequired()
- {
- string ProjectBefore = @"
-
-
- Debug
- AnyCPU
-
-
- 2.0
- {F4206430-F95D-4E52-B394-2E9E91EB362E}
- {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- Dev10Solution_Dev10RepairRequired
- Dev10Solution_Dev10RepairRequired
- v4.0
-
-
- true
- full
- false
- bin\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Web.config
-
-
- Web.config
-
-
-
-
- About.aspx
- ASPXCodeBehind
-
-
- About.aspx
-
-
- ChangePassword.aspx
- ASPXCodeBehind
-
-
- ChangePassword.aspx
-
-
- ChangePasswordSuccess.aspx
- ASPXCodeBehind
-
-
- ChangePasswordSuccess.aspx
-
-
- Login.aspx
- ASPXCodeBehind
-
-
- Login.aspx
-
-
- Register.aspx
- ASPXCodeBehind
-
-
- Register.aspx
-
-
- Default.aspx
- ASPXCodeBehind
-
-
- Default.aspx
-
-
- Global.asax
-
-
-
- Site.Master
- ASPXCodeBehind
-
-
- Site.Master
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- False
- True
- 63975
- /
-
-
- False
- False
-
-
- False
-
-
-
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
- Debug
- AnyCPU
-
-
- 2.0
- {F4206430-F95D-4E52-B394-2E9E91EB362E}
- {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
- Library
- Properties
- Dev10Solution_Dev10RepairRequired
- Dev10Solution_Dev10RepairRequired
- v4.0
-
-
- true
- full
- false
- bin\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- bin\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Web.config
-
-
- Web.config
-
-
-
-
- About.aspx
- ASPXCodeBehind
-
-
- About.aspx
-
-
- ChangePassword.aspx
- ASPXCodeBehind
-
-
- ChangePassword.aspx
-
-
- ChangePasswordSuccess.aspx
- ASPXCodeBehind
-
-
- ChangePasswordSuccess.aspx
-
-
- Login.aspx
- ASPXCodeBehind
-
-
- Login.aspx
-
-
- Register.aspx
- ASPXCodeBehind
-
-
- Register.aspx
-
-
- Default.aspx
- ASPXCodeBehind
-
-
- Default.aspx
-
-
- Global.asax
-
-
-
- Site.Master
- ASPXCodeBehind
-
-
- Site.Master
-
-
-
-
-
-
-
-
-
-
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
-
-
-
-
- False
- True
- 63975
- /
-
-
- False
- False
-
-
- False
-
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// A VS2010 Deploy project file which requires is no longer supported
- ///
- [TestMethod]
- public void VS2010DeployProjectDeprecated()
- {
- string ProjectBefore = @"
- ""DeployProject""
- {
- ""VSVersion"" = ""3:800""
- ""ProjectType"" = ""8:{978C614F-708E-4E1A-B201-565925725DBA}""
- ""IsWebType"" = ""8:FALSE""
- ""ProjectName"" = ""8:Dev10Dep1""
- ""LanguageId"" = ""3:1033""
- ""CodePage"" = ""3:1252""
- ""UILanguageId"" = ""3:1033""
- ""SccProjectName"" = ""8:""
- ""SccLocalPath"" = ""8:""
- ""SccAuxPath"" = ""8:""
- ""SccProvider"" = ""8:""
- ""Hierarchy""
- {
- }
- ""Configurations""
- {
- ""Debug""
- {
- ""DisplayName"" = ""8:Debug""
- ""IsDebugOnly"" = ""11:TRUE""
- ""IsReleaseOnly"" = ""11:FALSE""
- ""OutputFilename"" = ""8:Debug\\Dev10Dep1.msi""
- ""PackageFilesAs"" = ""3:2""
- ""PackageFileSize"" = ""3:-2147483648""
- ""CabType"" = ""3:1""
- ""Compression"" = ""3:2""
- ""SignOutput"" = ""11:FALSE""
- ""CertificateFile"" = ""8:""
- ""PrivateKeyFile"" = ""8:""
- ""TimeStampServer"" = ""8:""
- ""InstallerBootstrapper"" = ""3:2""
- }
- ""Release""
- {
- ""DisplayName"" = ""8:Release""
- ""IsDebugOnly"" = ""11:FALSE""
- ""IsReleaseOnly"" = ""11:TRUE""
- ""OutputFilename"" = ""8:Release\\Dev10Dep1.msi""
- ""PackageFilesAs"" = ""3:2""
- ""PackageFileSize"" = ""3:-2147483648""
- ""CabType"" = ""3:1""
- ""Compression"" = ""3:2""
- ""SignOutput"" = ""11:FALSE""
- ""CertificateFile"" = ""8:""
- ""PrivateKeyFile"" = ""8:""
- ""TimeStampServer"" = ""8:""
- ""InstallerBootstrapper"" = ""3:2""
- }
- }
- ""Deployable""
- {
- ""CustomAction""
- {
- }
- ""DefaultFeature""
- {
- ""Name"" = ""8:DefaultFeature""
- ""Title"" = ""8:""
- ""Description"" = ""8:""
- }
- ""ExternalPersistence""
- {
- ""LaunchCondition""
- {
- }
- }
- ""File""
- {
- }
- ""FileType""
- {
- }
- ""Folder""
- {
- ""{1525181F-901A-416C-8A58-119130FE478E}:_0AA7A53E511C4817B4948E95C0DF4664""
- {
- ""Name"" = ""8:#1919""
- ""AlwaysCreate"" = ""11:FALSE""
- ""Condition"" = ""8:""
- ""Transitive"" = ""11:FALSE""
- ""Property"" = ""8:ProgramMenuFolder""
- ""Folders""
- {
- }
- }
- ""{3C67513D-01DD-4637-8A68-80971EB9504F}:_1B395C1DD72D471891B8440A6A066FE5""
- {
- ""DefaultLocation"" = ""8:[ProgramFilesFolder][Manufacturer]\\[ProductName]""
- ""Name"" = ""8:#1925""
- ""AlwaysCreate"" = ""11:FALSE""
- ""Condition"" = ""8:""
- ""Transitive"" = ""11:FALSE""
- ""Property"" = ""8:TARGETDIR""
- ""Folders""
- {
- }
- }
- ""{1525181F-901A-416C-8A58-119130FE478E}:_D6EBF35E5CC343C290FAE28008DC6E7E""
- {
- ""Name"" = ""8:#1916""
- ""AlwaysCreate"" = ""11:FALSE""
- ""Condition"" = ""8:""
- ""Transitive"" = ""11:FALSE""
- ""Property"" = ""8:DesktopFolder""
- ""Folders""
- {
- }
- }
- }
- ""LaunchCondition""
- {
- }
- ""Locator""
- {
- }
- ""MsiBootstrapper""
- {
- ""LangId"" = ""3:1033""
- ""RequiresElevation"" = ""11:FALSE""
- }
- ""Product""
- {
- ""Name"" = ""8:Microsoft Visual Studio""
- ""ProductName"" = ""8:Dev10Dep1""
- ""ProductCode"" = ""8:{43FB18EF-67AC-473C-AD2A-DC07B7ABF16F}""
- ""PackageCode"" = ""8:{4C46BDB8-9AB2-4369-83CF-203DF67A3561}""
- ""UpgradeCode"" = ""8:{730CFD38-8449-4AFE-AED2-B34234601C56}""
- ""AspNetVersion"" = ""8:4.0.30319.0""
- ""RestartWWWService"" = ""11:FALSE""
- ""RemovePreviousVersions"" = ""11:FALSE""
- ""DetectNewerInstalledVersion"" = ""11:TRUE""
- ""InstallAllUsers"" = ""11:FALSE""
- ""ProductVersion"" = ""8:1.0.0""
- ""Manufacturer"" = ""8:Microsoft""
- ""ARPHELPTELEPHONE"" = ""8:""
- ""ARPHELPLINK"" = ""8:""
- ""Title"" = ""8:Dev10Dep1""
- ""Subject"" = ""8:""
- ""ARPCONTACT"" = ""8:Microsoft""
- ""Keywords"" = ""8:""
- ""ARPCOMMENTS"" = ""8:""
- ""ARPURLINFOABOUT"" = ""8:""
- ""ARPPRODUCTICON"" = ""8:""
- ""ARPIconIndex"" = ""3:0""
- ""SearchPath"" = ""8:""
- ""UseSystemSearchPath"" = ""11:TRUE""
- ""TargetPlatform"" = ""3:0""
- ""PreBuildEvent"" = ""8:""
- ""PostBuildEvent"" = ""8:""
- ""RunPostBuildEvent"" = ""3:0""
- }
- ""Registry""
- {
- ""HKLM""
- {
- ""Keys""
- {
- ""{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_AC44CB3A56164C5FB678594056AC8A01""
- {
- ""Name"" = ""8:Software""
- ""Condition"" = ""8:""
- ""AlwaysCreate"" = ""11:FALSE""
- ""DeleteAtUninstall"" = ""11:FALSE""
- ""Transitive"" = ""11:FALSE""
- ""Keys""
- {
- ""{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_8703E97B5EFC4DFB87EDC467D0E61560""
- {
- ""Name"" = ""8:[Manufacturer]""
- ""Condition"" = ""8:""
- ""AlwaysCreate"" = ""11:FALSE""
- ""DeleteAtUninstall"" = ""11:FALSE""
- ""Transitive"" = ""11:FALSE""
- ""Keys""
- {
- }
- ""Values""
- {
- }
- }
- }
- ""Values""
- {
- }
- }
- }
- }
- ""HKCU""
- {
- ""Keys""
- {
- ""{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5BD957DCAAEA4AE49C46557E3D4B4076""
- {
- ""Name"" = ""8:Software""
- ""Condition"" = ""8:""
- ""AlwaysCreate"" = ""11:FALSE""
- ""DeleteAtUninstall"" = ""11:FALSE""
- ""Transitive"" = ""11:FALSE""
- ""Keys""
- {
- ""{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C51959C240B141E4B5DC7F3CB358EB03""
- {
- ""Name"" = ""8:[Manufacturer]""
- ""Condition"" = ""8:""
- ""AlwaysCreate"" = ""11:FALSE""
- ""DeleteAtUninstall"" = ""11:FALSE""
- ""Transitive"" = ""11:FALSE""
- ""Keys""
- {
- }
- ""Values""
- {
- }
- }
- }
- ""Values""
- {
- }
- }
- }
- }
- ""HKCR""
- {
- ""Keys""
- {
- }
- }
- ""HKU""
- {
- ""Keys""
- {
- }
- }
- ""HKPU""
- {
- ""Keys""
- {
- }
- }
- }
- ""Sequences""
- {
- }
- ""Shortcut""
- {
- }
- ""UserInterface""
- {
- ""{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_1D4A4CE12E704A68BF617F9EBBD6DE62""
- {
- ""UseDynamicProperties"" = ""11:FALSE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdBasicDialogs.wim""
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_3E838CB7B9B14D41B3A0BC24E5D1A219""
- {
- ""Name"" = ""8:#1901""
- ""Sequence"" = ""3:2""
- ""Attributes"" = ""3:2""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_01573A9060964A069C78FD9E40D8706F""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Progress""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdAdminProgressDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""ShowProgress""
- {
- ""Name"" = ""8:ShowProgress""
- ""DisplayName"" = ""8:#1009""
- ""Description"" = ""8:#1109""
- ""Type"" = ""3:5""
- ""ContextData"" = ""8:1;True=1;False=0""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:0""
- ""Value"" = ""3:1""
- ""DefaultValue"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_490F3627B9214CCEA509B6126EBAA586""
- {
- ""Name"" = ""8:#1901""
- ""Sequence"" = ""3:1""
- ""Attributes"" = ""3:2""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_42E52D514DE041D58DEEE621DA18551D""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Progress""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdProgressDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""ShowProgress""
- {
- ""Name"" = ""8:ShowProgress""
- ""DisplayName"" = ""8:#1009""
- ""Description"" = ""8:#1109""
- ""Type"" = ""3:5""
- ""ContextData"" = ""8:1;True=1;False=0""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:0""
- ""Value"" = ""3:1""
- ""DefaultValue"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_79632A079AC34475B054FB01EE83F43E""
- {
- ""Name"" = ""8:#1902""
- ""Sequence"" = ""3:1""
- ""Attributes"" = ""3:3""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_65FEFF54A86446E0A331A5DAB110A495""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Finished""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdFinishedDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""UpdateText""
- {
- ""Name"" = ""8:UpdateText""
- ""DisplayName"" = ""8:#1058""
- ""Description"" = ""8:#1158""
- ""Type"" = ""3:15""
- ""ContextData"" = ""8:""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:1""
- ""Value"" = ""8:#1258""
- ""DefaultValue"" = ""8:#1258""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_920D0874C0714728A52B67391F321564""
- {
- ""Name"" = ""8:#1902""
- ""Sequence"" = ""3:2""
- ""Attributes"" = ""3:3""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_68C15B16DFB74BF895B444A1E7F2A2E5""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Finished""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdAdminFinishedDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_CA216A037F2D49CABBA5C5230D50CA17""
- {
- ""Name"" = ""8:#1900""
- ""Sequence"" = ""3:2""
- ""Attributes"" = ""3:1""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_60BE1685AB5C48A8974B528786607841""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Welcome""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdAdminWelcomeDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""CopyrightWarning""
- {
- ""Name"" = ""8:CopyrightWarning""
- ""DisplayName"" = ""8:#1002""
- ""Description"" = ""8:#1102""
- ""Type"" = ""3:3""
- ""ContextData"" = ""8:""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:1""
- ""Value"" = ""8:#1202""
- ""DefaultValue"" = ""8:#1202""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""Welcome""
- {
- ""Name"" = ""8:Welcome""
- ""DisplayName"" = ""8:#1003""
- ""Description"" = ""8:#1103""
- ""Type"" = ""3:3""
- ""ContextData"" = ""8:""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:1""
- ""Value"" = ""8:#1203""
- ""DefaultValue"" = ""8:#1203""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_C1CA957AC4194CAE8883139CCE319BD8""
- {
- ""Sequence"" = ""3:300""
- ""DisplayName"" = ""8:Confirm Installation""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdAdminConfirmDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E4416625D6DF4973918800B4910BC20D""
- {
- ""Sequence"" = ""3:200""
- ""DisplayName"" = ""8:Installation Folder""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdAdminFolderDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{DF760B10-853B-4699-99F2-AFF7185B4A62}:_DA1AB83886AE4E3ABF481FD039BBC368""
- {
- ""Name"" = ""8:#1900""
- ""Sequence"" = ""3:1""
- ""Attributes"" = ""3:1""
- ""Dialogs""
- {
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_1A17192A8B1B42AD8834821D94C34422""
- {
- ""Sequence"" = ""3:100""
- ""DisplayName"" = ""8:Welcome""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdWelcomeDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""CopyrightWarning""
- {
- ""Name"" = ""8:CopyrightWarning""
- ""DisplayName"" = ""8:#1002""
- ""Description"" = ""8:#1102""
- ""Type"" = ""3:3""
- ""ContextData"" = ""8:""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:1""
- ""Value"" = ""8:#1202""
- ""DefaultValue"" = ""8:#1202""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""Welcome""
- {
- ""Name"" = ""8:Welcome""
- ""DisplayName"" = ""8:#1003""
- ""Description"" = ""8:#1103""
- ""Type"" = ""3:3""
- ""ContextData"" = ""8:""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:1""
- ""Value"" = ""8:#1203""
- ""DefaultValue"" = ""8:#1203""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_31F1ACFF32E94780B48F7ED10871CAEE""
- {
- ""Sequence"" = ""3:300""
- ""DisplayName"" = ""8:Confirm Installation""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdConfirmDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- ""{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_332BF9E1EFDA4D12BFD34DA8CC44F337""
- {
- ""Sequence"" = ""3:200""
- ""DisplayName"" = ""8:Installation Folder""
- ""UseDynamicProperties"" = ""11:TRUE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdFolderDlg.wid""
- ""Properties""
- {
- ""BannerBitmap""
- {
- ""Name"" = ""8:BannerBitmap""
- ""DisplayName"" = ""8:#1001""
- ""Description"" = ""8:#1101""
- ""Type"" = ""3:8""
- ""ContextData"" = ""8:Bitmap""
- ""Attributes"" = ""3:4""
- ""Setting"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- ""InstallAllUsersVisible""
- {
- ""Name"" = ""8:InstallAllUsersVisible""
- ""DisplayName"" = ""8:#1059""
- ""Description"" = ""8:#1159""
- ""Type"" = ""3:5""
- ""ContextData"" = ""8:1;True=1;False=0""
- ""Attributes"" = ""3:0""
- ""Setting"" = ""3:0""
- ""Value"" = ""3:1""
- ""DefaultValue"" = ""3:1""
- ""UsePlugInResources"" = ""11:TRUE""
- }
- }
- }
- }
- }
- ""{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_DF8B5EA652E34B8EB3D051F927859B9B""
- {
- ""UseDynamicProperties"" = ""11:FALSE""
- ""IsDependency"" = ""11:FALSE""
- ""SourcePath"" = ""8:\\VsdUserInterface.wim""
- }
- }
- ""MergeModule""
- {
- }
- ""ProjectOutput""
- {
- }
- }
- }
- ";
-
- try
- {
- Helpers.ConvertAndCompare(ProjectBefore, ProjectBefore);
- Assert.Fail("There should have been a Microsoft.Build.Exceptions.InvalidProjectFileException");
- }
- catch (Exception e)
- {
- Assert.IsInstanceOfType(e, typeof(Microsoft.Build.Exceptions.InvalidProjectFileException));
- }
- }
-
-
- ///
- /// A VS2010 C# project file which requires no changes Repair
- ///
- [TestMethod]
- public void ConvertCSharp2010NoChangeRequired()
- {
- string ProjectBefore = @"
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {D97016B8-9FB6-4D56-A90E-C3DFD38AC032}
- Exe
- Properties
- Dev10SolutionDev10VanillaProject
- Dev10SolutionDev10VanillaProject
- v4.0
- Client
- 512
-
-
- x86
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectBefore);
- }
-
- ///
- /// A VS2003 C# project file which requires conversion
- ///
- [TestMethod]
- public void ConvertCSharp2003ConversionRequired()
- {
- string ProjectBefore = @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Local
- 7.10.6030
- 2.0
- {C455AB6F-933F-441D-ABF8-D2F3FDA8CDA2}
- Debug
- AnyCPU
-
-
- ClassLibrary1
-
- JScript
- Grid
- IE50
- false
- Library
- ClassLibrary1
- OnBuildSuccess
-
- 20
-
-
- bin\Debug\
- false
- 285212672
- false
-
- DEBUG;TRACE
-
- true
- 4096
- false
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
- TRACE
-
- false
- 4096
- false
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- System
-
-
- System.Data
-
-
- System.XML
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// A VS2005 VB project file which requires conversion
- ///
- [TestMethod]
- public void ConvertVB2005ConversionRequired()
- {
- string ProjectBefore = @"
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {F23FE10A-EE6B-4800-8CFB-9CA07DA2D358}
- Library
- Vs2005_ClassLib_20_Vb
- Vs2005_ClassLib_20_Vb
- Windows
-
-
- true
- full
- true
- true
- bin\Debug\
- Vs2005_ClassLib_20_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- Vs2005_ClassLib_20_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Debug
- AnyCPU
- 8.0.50727
- 2.0
- {F23FE10A-EE6B-4800-8CFB-9CA07DA2D358}
- Library
- Vs2005_ClassLib_20_Vb
- Vs2005_ClassLib_20_Vb
- Windows
-
-
- true
- full
- true
- true
- bin\Debug\
- Vs2005_ClassLib_20_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
- pdbonly
- false
- true
- true
- bin\Release\
- Vs2005_ClassLib_20_Vb.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// A VS2005 VB project file which requires conversion
- ///
- [TestMethod]
- public void ConvertCS2005ExcelProjectConversionRequired()
- {
- string projectBefore =
- @"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ";
-
- string projectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
- Local
- 7.10.3077
- 2.0
- {3CACC4D8-8DC1-418E-BB2C-3F9F60ECB2A5}
- Debug
- AnyCPU
-
-
- BasicExcel
-
- JScript
- Grid
- IE50
- false
- Library
- BasicExcel
- OnBuildSuccess
-
- {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- 20
-
-
- bin\Debug\
- false
- 285212672
- false
-
- DEBUG;TRACE
-
- true
- 4096
- false
-
- false
- false
- false
- false
- 4
- full
- prompt
-
-
- bin\Release\
- false
- 285212672
- false
-
- TRACE
-
- false
- 4096
- false
-
- true
- false
- false
- false
- 4
- none
- prompt
-
-
-
- {00020813-0000-0000-C000-000000000046}
- 1
- 5
- 0
- primary
-
-
- {2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}
- 2
- 3
- 0
- primary
-
-
- {0D452EE1-E08F-101A-852E-02608C4D0BB4}
- 2
- 0
- 0
- primary
-
-
- {0002E157-0000-0000-C000-000000000046}
- 5
- 3
- 0
- primary
-
-
- System
-
-
- System.Data
-
-
- System.Windows.Forms
-
-
- System.XML
-
-
-
-
- Code
-
-
- Code
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ")
- ;
-
- Helpers.ConvertAndCompare(projectBefore, projectAfter);
- }
-
- ///
- /// Check that when we're upgrading projects referencing and compiling .xaml source files
- /// we are correctly appending Generator and Subtype properties to the source file and not the
- /// reference
- /// Check also that project references to vcproj have their extensions fixed to .vcxproj
- ///
- [TestMethod]
- public void CheckForReferencesReplacements()
- {
- string ProjectBefore = @"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// Check that when we're upgrading projects referencing and compiling .xaml source files
- /// we are correctly appending Generator and Subtype properties to the source file and not the
- /// reference
- ///
- /// Check also that project references to vcproj have their extensions fixed to .vcxproj
- ///
- /// Lastly, make sure that this still happens even if the ToolsVersion is > 3.5.
- ///
- [TestMethod]
- public void CheckForReferencesReplacements_NewerToolsVersion()
- {
- string ProjectBefore = @"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// Check that when we're upgrading projects referencing and compiling .xaml source files
- /// that we don't append the Generator and SubType properties to the source file if they
- /// are already set.
- ///
- [TestMethod]
- public void DoNotReplacePreExistingXamlProperties()
- {
- string ProjectBefore = @"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// Check that when we're upgrading projects referencing and compiling .xaml source files
- /// that even if there are multiple instances of the metadata, we don't eliminate them --
- /// we just also don't add any more.
- ///
- [TestMethod]
- public void DontEliminateDuplicateXamlProperties()
- {
- string ProjectBefore = @"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- MSBuild:Compile
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
- Designer
- Designer
- Designer
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
- Designer
-
-
- ";
-
- string ProjectAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
-
-
-
-
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92d}
- SampeProject
-
-
- {a289b3a9-e10c-4bb8-8814-18faf19ec92e}
- SampeProject2
-
-
-
-
- MSBuild:Compile
- MSBuild:Compile
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
- Designer
- Designer
- Designer
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
- Designer
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfter);
- }
-
- ///
- /// Check that when we're upgrading projects referencing and compiling .xaml source files
- /// that already have Generator and Subtype metadata, we don't make any changes and
- /// don't update the ToolsVersion.
- ///
- [TestMethod]
- public void DontUpdateToolsVersionIfNothingChanged()
- {
- string ProjectBeforeAndAfter = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- MSBuild:Compile
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
- MSBuild:Compile
- Designer
- Designer
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBeforeAndAfter, ProjectBeforeAndAfter);
- }
-
- #endregion
-
- [TestMethod]
- public void MinorUpgradeShouldNotUpdateToolsVersion()
- {
- string ProjectBefore = @"
-
-
-
- ";
-
- string ProjectAfterByDefault = ObjectModelHelpers.CleanupFileContents(@"
-
-
-
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
- ");
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfterByDefault);
-
- string ProjectAfterMinorUpgrade = @"
-
-
-
- 10.0
- $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
-
-
-
-
- ";
-
- Helpers.ConvertAndCompare(ProjectBefore, ProjectAfterMinorUpgrade, null, isMinorUpgrade: true);
- }
- }
-}
diff --git a/src/Deprecated/Conversion.UnitTests/XMakeConversionUnitTests.csproj b/src/Deprecated/Conversion.UnitTests/XMakeConversionUnitTests.csproj
deleted file mode 100644
index de178a504d3..00000000000
--- a/src/Deprecated/Conversion.UnitTests/XMakeConversionUnitTests.csproj
+++ /dev/null
@@ -1,97 +0,0 @@
-
-
-
- $([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), Build.props))\Build.props
-
-
-
-
-
- true
- true
-
-
-
-
-
- $(SuiteBinPath)
- library
- Microsoft.Build.Conversion.Unittest
- true
- SAK
- SAK
- SAK
- SAK
- $(BuildArchitecturesAllowed);amd64;arm
-
-
-
- {9BDEE040-06EC-48F1-81A6-CDA7AA98CADA}
- {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
-
- $(NoWarn);0618
-
-
-
-
-
-
-
-
-
-
-
-
-
- {3F1F7307-EE89-4110-B636-BDE1E45358C4}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- XMakeBuildEngine
- Needs 'microsoft.build.dll'
- true
-
-
- {D21C4Bf9-E131-4ACB-8960-794797f19A39}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- OrcasEngine
- Needs 'microsoft.build.engine.dll'
- true
-
-
- {653E79B4-118B-4E0A-9E34-8EB30E5E0881}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Utilities %28components\xmake\Framework\Utilities%29
- Needs 'microsoft.build.utilities.v12.0.dll'
-
-
- {784BF121-CE8F-4314-AA55-E86AB61670FE}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- Framework %28components\xmake\Framework\Framework%29
- Needs 'microsoft.build.framework.dll'
- true
-
-
- {5274C277-F122-4a44-B7A0-00A1B3F39803}
- {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- XMakeConversion
- Needs 'microsoft.build.conversion.v12.0.dll'
-
-
-
- Content
-
-
-
-
-
- true
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Deprecated/Conversion/AdditionalOptionsParser.cs b/src/Deprecated/Conversion/AdditionalOptionsParser.cs
deleted file mode 100644
index 422ae5277e6..00000000000
--- a/src/Deprecated/Conversion/AdditionalOptionsParser.cs
+++ /dev/null
@@ -1,443 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.Text;
-using System.Diagnostics;
-using System.Globalization;
-using Microsoft.Build.Construction;
-
-namespace Microsoft.Build.Conversion
-{
- ///
- /// Only these switches will be migrated.
- /// This enum doesnt have any use, except to explicitly list the compiler
- /// options in AdditionalOptions project property that will be migrated
- ///
- internal enum SwitchesToMigrate
- {
- STM_CodePage,
- STM_DisableLangExtensions,
- STM_Jcpa,
- STM_LinkResource,
- STM_SecureScoping,
- STM_Win32Resource,
- };
-
- ///
- /// These are types of values associated with the switches
- ///
- internal enum SwitchValueType
- {
- ///
- /// Boolean value
- ///
- SVT_Boolean,
-
- ///
- /// String value
- ///
- SVT_String,
-
- ///
- /// This switch can occur multiple times and the
- /// final value is the ';' delimeted concat of all the
- /// individual occurrences
- ///
- SVT_MultiString,
- }
-
- ///
- /// This class contains the migration info for a switch
- /// that we want to migrate
- ///
- internal sealed class CompSwitchInfo
- {
- ///
- /// This is the internal switch identifier
- /// Examples:
- /// 1. STM_SecureScoping
- ///
- internal SwitchesToMigrate Switch;
-
- ///
- /// This is the string passed to the compiler
- /// Examples:
- /// 1. /ss, /securescoping
- /// 2. @
- ///
- internal string[] SwitchIDs;
-
- ///
- /// This is the type of the value associated with the switch
- /// Examples:
- /// 1. SVT_Boolean
- /// 2. SVT_MultiString
- ///
- internal SwitchValueType SwitchValueType;
-
- ///
- /// This is the final value of the switch
- /// 1. true
- /// 2. "path-a;path-b\\file-b"
- ///
- internal object SwitchValue;
-
- ///
- /// This is the name of property in the project file in which the
- /// value of this switch is stored
- ///
- internal string SwitchProjectPropertyName;
-
- ///
- /// The constructor
- ///
- internal CompSwitchInfo(
- SwitchesToMigrate switchStr,
- string[] switchIDs,
- SwitchValueType switchValueType,
- object switchValue,
- string switchProjectPropertyName
- )
- {
- this.Switch = switchStr;
- this.SwitchIDs = switchIDs;
- this.SwitchValueType = switchValueType;
- this.SwitchValue = switchValue;
- this.SwitchProjectPropertyName = switchProjectPropertyName;
- }
- }
-
- ///
- ///
- /// Class: AdditionalOptionsParser
- /// Owner: ParthaD
- ///
- /// This class contains the logic to parse the AdditionalOptions project
- /// property of v7.x J# projects and add the individual options as project
- /// properties of the upgraded projects.
- ///
- /// AdditionalOptions project property in v7.x was basically a string that
- /// was passed ditto to the compiler.
- /// It was used to hold J# compiler options that didnt have an 1-1 equivalent
- /// project property.
- /// For v8.0 and beyond, each J# compiler option has a corresponding project
- /// property.
- ///
- /// AdditionalOptions property string is broken down into list of options.
- /// White space (only ' ' and '\t') are considered as delimiters if not wrapped
- /// inside double quotes (").
- /// NOTE:
- /// 1. Other unicode spaces or double quotes sequences not considered
- /// 2. Backslash (\) not considered as possible escape char for ".
- ///
- /// Once broken down into individual options, only a few compiler options are
- /// seached for (viz. the options for which v8.0 has new project properties)
- /// Everything else is ignored.
- ///
- /// Refer to SwitchesToMigrade enum for the switches that are migrated.
- ///
- internal sealed class AdditionalOptionsParser
- {
- // These are all that we recognize in the AdditionalOptions
- private CompSwitchInfo[] validCompilerSwitches = new CompSwitchInfo[] {
- #region Info on the compiler switches to be parsed from AdditionalOptions
- // /codepage:
- new CompSwitchInfo(
- SwitchesToMigrate.STM_CodePage,
- new string[] { "/codepage:" },
- SwitchValueType.SVT_String,
- null,
- "CodePage"
- ),
-
- // /x:[all | net]
- new CompSwitchInfo(
- SwitchesToMigrate.STM_DisableLangExtensions,
- new string[] { "/x:" },
- SwitchValueType.SVT_String,
- null,
- "DisableLangXtns"
- ),
-
- // /jcpa:[package=namespace | @filename]
- new CompSwitchInfo(
- SwitchesToMigrate.STM_Jcpa,
- new string[] { "/jcpa:" },
- SwitchValueType.SVT_MultiString,
- new StringBuilder(),
- "JCPA"
- ),
-
- // /linkres[ource]:
- new CompSwitchInfo(
- SwitchesToMigrate.STM_LinkResource,
- new string[] { "/linkres:", "/linkresource:" },
- SwitchValueType.SVT_MultiString,
- new StringBuilder(),
- "LinkResource"
- ),
-
- // /securescoping[+|-], /ss[+|-]
- new CompSwitchInfo(
- SwitchesToMigrate.STM_SecureScoping,
- new string[] { "/securescoping", "/ss" },
- SwitchValueType.SVT_Boolean,
- null,
- "SecureScoping"
- ),
-
- // /win32res:
- new CompSwitchInfo(
- SwitchesToMigrate.STM_Win32Resource,
- new string[] { "/win32res:" },
- SwitchValueType.SVT_String,
- null,
- "Win32Resource"
- )
- #endregion
- };
-
- ///
- /// One and only entry point to the functionality offered by this class
- ///
- public void ProcessAdditionalOptions(
- string additionalOptionsValue,
- ProjectPropertyGroupElement configPropertyGroup
- )
- {
- // Trivial case
- if (additionalOptionsValue == null)
- {
- return;
- }
-
- // Tokenize the additional options first
- string[] compSwitchList = TokenizeAdditionalOptionsValue(additionalOptionsValue);
-
- // Extract the switch arguments
- foreach (string compSwitch in compSwitchList)
- {
- foreach (CompSwitchInfo compSwitchInfo in validCompilerSwitches)
- {
- if (ExtractSwitchInfo(compSwitchInfo, compSwitch))
- {
- break;
- }
- }
- }
-
- // Finally populate the project file and we'r done!
- PopulatePropertyGroup(configPropertyGroup);
- }
-
- ///
- /// This will tokenize the given string using ' ' and '\t' as delimiters
- /// The delimiters are escaped inside a pair of quotes
- /// If there is an unbalanced quote, EOL is treated as the closing quotes
- ///
- private string[] TokenizeAdditionalOptionsValue(string additionalOptionsValue)
- {
- ArrayList tokens = new ArrayList();
-
- bool inQuotes = false;
- StringBuilder option = new StringBuilder();
- foreach (char c in additionalOptionsValue)
- {
- switch (c)
- {
- case '\t':
- case ' ':
- if (inQuotes)
- {
- option.Append(c);
- }
- else
- {
- if (0 != option.Length)
- {
- tokens.Add(option.ToString());
- option.Length = 0;
- }
- }
- break;
-
- case '"':
- inQuotes = !inQuotes;
- break;
-
- default:
- option.Append(c);
- break;
- }
- }
-
- // Ignore everything unbalanced quotes
- if (!inQuotes)
- {
- tokens.Add(option.ToString());
- }
-
- return (string[])tokens.ToArray(typeof(string));
- }
-
- ///
- /// If compSwitch is the compSwitchInfo compiler switch, then extract the switch args
- /// Return
- /// - true: if this is the switch (even if the switch args have error)
- /// - false: this is not the switch
- ///
- private bool ExtractSwitchInfo(CompSwitchInfo compSwitchInfo, string compSwitch)
- {
- string matchedID = null;
- // First see if we have a match...
- for (int i = 0; i < compSwitchInfo.SwitchIDs.Length; i++)
- {
- if (compSwitch.StartsWith(compSwitchInfo.SwitchIDs[i], StringComparison.Ordinal))
- {
- matchedID = compSwitchInfo.SwitchIDs[i];
- break;
- }
- }
- // No no... we arent dealing with the correct switchInfo
- if (matchedID == null)
- {
- return false;
- }
-
- // Now we can get to extracting the switch arguments
- object switchVal = null;
- switch (compSwitchInfo.SwitchValueType)
- {
- case SwitchValueType.SVT_Boolean:
- if (matchedID.Length == compSwitch.Length)
- {
- switchVal = true;
- }
- else if ((matchedID.Length + 1) == compSwitch.Length)
- {
- if ('+' == compSwitch[matchedID.Length])
- {
- switchVal = true;
- }
- else if ('-' == compSwitch[matchedID.Length])
- {
- switchVal = false;
- }
- }
- if (switchVal != null)
- {
- compSwitchInfo.SwitchValue = switchVal;
- }
- else
- {
- Debug.Assert(false, "Cannot parse boolean switch: " + compSwitch);
- }
- break;
-
- case SwitchValueType.SVT_String:
- if (matchedID.Length < compSwitch.Length)
- {
- switchVal = compSwitch.Substring(matchedID.Length);
- }
- if (switchVal != null)
- {
- compSwitchInfo.SwitchValue = switchVal;
- }
- else
- {
- Debug.Assert(false, "Cannot parse string switch: " + compSwitch);
- }
- break;
-
- case SwitchValueType.SVT_MultiString:
- Debug.Assert(
- compSwitchInfo.SwitchValue != null,
- "Non null switch value expected for a multistring switch: " + matchedID
- );
-
- if (matchedID.Length < compSwitch.Length)
- {
- switchVal = compSwitch.Substring(matchedID.Length);
- }
- if (switchVal != null)
- {
- ((StringBuilder)(compSwitchInfo.SwitchValue)).Append(switchVal);
- ((StringBuilder)(compSwitchInfo.SwitchValue)).Append(";");
- }
- else
- {
- Debug.Assert(false, "Cannot parse multistring switch: " + compSwitch);
- }
- break;
-
- default:
- Debug.Assert(false, "Unknown switch value type");
- break;
- }
-
- return true;
- }
-
- ///
- /// Populate the property group with the individual options
- ///
- private void PopulatePropertyGroup(ProjectPropertyGroupElement configPropertyGroup)
- {
- string propertyName;
-
- foreach (CompSwitchInfo compSwitchInfo in validCompilerSwitches)
- {
- propertyName = compSwitchInfo.SwitchProjectPropertyName;
-
- // No need to remove the already existing property node
- // since the switches we are dealing with couldnt have been
- // set anywhere else in the property pages except the additional
- // options
-
- switch (compSwitchInfo.SwitchValueType)
- {
- case SwitchValueType.SVT_Boolean:
- if (compSwitchInfo.SwitchValue != null)
- {
- configPropertyGroup.AddProperty(
- propertyName,
- compSwitchInfo.SwitchValue.ToString().ToLower(CultureInfo.InvariantCulture)
- );
- }
- break;
-
- case SwitchValueType.SVT_String:
- if (compSwitchInfo.SwitchValue != null)
- {
- configPropertyGroup.AddProperty(
- propertyName,
- compSwitchInfo.SwitchValue.ToString()
- );
- }
- break;
-
- case SwitchValueType.SVT_MultiString:
- Debug.Assert(compSwitchInfo.SwitchValue != null, "Expected non null value for multistring switch");
- if (0 != ((StringBuilder)(compSwitchInfo.SwitchValue)).Length)
- {
- configPropertyGroup.AddProperty(
- propertyName,
- compSwitchInfo.SwitchValue.ToString()
- );
- }
- break;
-
- default:
- Debug.Assert(false, "Unknown switch value type");
- break;
- }
- }
- }
- }
-}
diff --git a/src/Deprecated/Conversion/AssemblyInfo.cs b/src/Deprecated/Conversion/AssemblyInfo.cs
deleted file mode 100644
index 861a59d36f0..00000000000
--- a/src/Deprecated/Conversion/AssemblyInfo.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Security.Permissions;
-using System.Resources;
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
-
-#pragma warning disable 618
-[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
-#pragma warning restore 618
-
-// This is the assembly-level GUID, and the GUID for the TypeLib associated with
-// this assembly. We should specify this explicitly, as opposed to letting
-// tlbexp just pick whatever it wants.
-[assembly: GuidAttribute("634AFA8F-4271-4e2c-9525-D0B75DAA821A")]
-[assembly: InternalsVisibleTo("Microsoft.Build.Conversion.Unittest, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
-
-// This will enable passing the SafeDirectories flag to any P/Invoke calls/implementations within the assembly,
-// so that we don't run into known security issues with loading libraries from unsafe locations
-[assembly: DefaultDllImportSearchPaths(DllImportSearchPath.SafeDirectories)]
-
-[assembly: CLSCompliant(true)]
-
-[assembly: NeutralResourcesLanguage("en")]
diff --git a/src/Deprecated/Conversion/AssemblyResources.cs b/src/Deprecated/Conversion/AssemblyResources.cs
deleted file mode 100644
index ccdba65a922..00000000000
--- a/src/Deprecated/Conversion/AssemblyResources.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System.Resources;
-using System.Reflection;
-using System.Globalization;
-
-namespace Microsoft.Build.Conversion
-{
- ///
- /// This class provides access to the assembly's resources.
- ///
- /// SumedhK
- internal static class AssemblyResources
- {
- ///
- /// Loads the specified resource string, either from the assembly's primary resources, or its shared resources.
- ///
- /// This method is thread-safe.
- /// SumedhK
- ///
- /// The resource string, or null if not found.
- internal static string GetString(string name)
- {
- // NOTE: the ResourceManager.GetString() method is thread-safe
- string resource = resources.GetString(name, CultureInfo.CurrentUICulture);
-
- if (resource == null)
- {
- resource = sharedResources.GetString(name, CultureInfo.CurrentUICulture);
- }
-
- return resource;
- }
-
- // assembly resources
- private static readonly ResourceManager resources = new ResourceManager("Microsoft.Build.Conversion.Core.Strings", Assembly.GetExecutingAssembly());
- // shared resources
- private static readonly ResourceManager sharedResources = new ResourceManager("Microsoft.Build.Conversion.Core.Strings.shared", Assembly.GetExecutingAssembly());
- }
-}
diff --git a/src/Deprecated/Conversion/Constants.cs b/src/Deprecated/Conversion/Constants.cs
deleted file mode 100644
index 05ffc70b443..00000000000
--- a/src/Deprecated/Conversion/Constants.cs
+++ /dev/null
@@ -1,208 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using Microsoft.Build.Shared;
-
-namespace Microsoft.Build.Conversion
-{
- ///
- /// Contains strings identifying hint paths that we should remove
- ///
- /// AJenner
- internal static class LegacyFrameworkPaths
- {
- internal const string RTMFrameworkPath = "MICROSOFT.NET\\FRAMEWORK\\V1.0.3705";
- internal const string EverettFrameworkPath = "MICROSOFT.NET\\FRAMEWORK\\V1.1.4322";
- internal const string JSharpRTMFrameworkPath = "MICROSOFT VISUAL JSHARP .NET\\FRAMEWORK\\V1.0.4205";
- }
-
- ///
- /// Contains the names of the known elements in the VS.NET project file.
- ///
- /// RGoel
- internal static class VSProjectElements
- {
- internal const string visualStudioProject = "VisualStudioProject";
- internal const string visualJSharp = "VISUALJSHARP";
- internal const string cSharp = "CSHARP";
- internal const string visualBasic = "VisualBasic";
- internal const string ECSharp = "ECSHARP";
- internal const string EVisualBasic = "EVisualBasic";
- internal const string build = "Build";
- internal const string settings = "Settings";
- internal const string config = "Config";
- internal const string platform = "Platform";
- internal const string interopRegistration = "InteropRegistration";
- internal const string references = "References";
- internal const string reference = "Reference";
- internal const string files = "Files";
- internal const string imports = "Imports";
- internal const string import = "Import";
- internal const string include = "Include";
- internal const string exclude = "Exclude";
- internal const string file = "File";
- internal const string folder = "Folder";
- internal const string startupServices = "StartupServices";
- internal const string service = "Service";
- internal const string userProperties = "UserProperties";
- internal const string otherProjectSettings = "OtherProjectSettings";
- internal const string PocketPC = "Pocket PC";
- internal const string WindowsCE = "Windows CE";
- internal const string Smartphone = "Smartphone";
- internal const string SystemDataCommon = "System.Data.Common";
- internal const string SystemSR = "System.SR";
- internal const string MSCorLib = "MSCorLib";
- }
-
- ///
- /// Contains the names of the known elements in the VS.NET project file.
- ///
- /// RGoel
- internal static class VSProjectAttributes
- {
- internal const string relPath = "RelPath";
- internal const string name = "Name";
- internal const string guid = "Guid";
- internal const string project = "Project";
- internal const string projectType = "ProjectType";
- internal const string local = "Local";
- internal const string assemblyName = "AssemblyName";
- internal const string importNamespace = "Namespace";
- internal const string id = "ID";
- internal const string link = "Link";
- internal const string buildAction = "BuildAction";
- internal const string buildActionNone = "None";
- internal const string buildActionResource = "EmbeddedResource";
- internal const string webReferences = "WebReferences";
- internal const string webReferenceUrl = "WebReferenceUrl";
- internal const string projectGuid = "ProjectGuid";
- internal const string preBuildEvent = "PreBuildEvent";
- internal const string postBuildEvent = "PostBuildEvent";
- internal const string productVersion = "ProductVersion";
- internal const string schemaVersion = "SchemaVersion";
- internal const string outputPath = "OutputPath";
- internal const string officeDocumentPath = "OfficeDocumentPath";
- internal const string officeDocumentType = "OfficeProjectType";
- internal const string officeProject = "OfficeProject";
- internal const string additionalOptions = "AdditionalOptions";
- internal const string platform = "Platform";
- internal const string selectedDevice = "SelectedDevice";
- internal const string deploymentPlatform = "DeploymentPlatform";
- internal const string incrementalBuild = "IncrementalBuild";
- internal const string hintPath = "HintPath";
- internal const string documentationFile = "DocumentationFile";
- internal const string debugType = "DebugType";
- internal const string debugTypeNone = "none";
- internal const string debugTypeFull = "full";
- internal const string errorReport = "ErrorReport";
- internal const string errorReportPrompt = "prompt";
- }
-
- ///
- /// Contains the names of some of the hard-coded strings we'll be inserting into the newly converted MSBuild project file.
- ///
- /// RGoel
- internal static class XMakeProjectStrings
- {
- internal const string project = "Project";
- internal const string defaultTargets = "Build";
- internal const string msbuildVersion = "MSBuildVersion";
- internal const string xmlns = "xmlns";
- internal const string importPrefix = "$(MSBuildToolsPath)\\";
- internal const string importSuffix = ".targets";
- internal const string targetsFilenamePrefix = "Microsoft.";
- internal const string csharpTargets = "CSharp";
- internal const string visualBasicTargets = "VisualBasic";
- internal const string visualJSharpTargets = "VisualJSharp";
- internal const string triumphImport = "$(MSBuildExtensionsPath)\\Microsoft\\VisualStudio\\v9.0\\OfficeTools\\Microsoft.VisualStudio.OfficeTools.targets";
- internal const string officeTargetsVS2005Import = @"$(MSBuildExtensionsPath)\Microsoft.VisualStudio.OfficeTools.targets";
- internal const string officeTargetsVS2005Import2 = @"$(MSBuildExtensionsPath)\Microsoft.VisualStudio.OfficeTools2.targets";
- internal const string officeTargetsVS2005Repair = @"OfficeTools\Microsoft.VisualStudio.Tools.Office.targets";
- internal const string configurationPrefix = " '$(Configuration)' == '";
- internal const string configurationSuffix = "' ";
- internal const string configuration = "Configuration";
- internal const string platformPrefix = " '$(Platform)' == '";
- internal const string platformSuffix = "' ";
- internal const string platform = "Platform";
- internal const string configplatformPrefix = " '$(Configuration)|$(Platform)' == '";
- internal const string configplatformSeparator = "|";
- internal const string configplatformSuffix = "' ";
- internal const string defaultConfiguration = "Debug";
- internal const string defaultPlatform = "AnyCPU";
- internal const string x86Platform = "x86";
- internal const string debugSymbols = "DebugSymbols";
- internal const string reference = "Reference";
- internal const string comReference = "COMReference";
- internal const string projectReference = "ProjectReference";
- internal const string import = "Import";
- internal const string service = "Service";
- internal const string folder = "Folder";
- internal const string link = "Link";
- internal const string autogen = "AutoGen";
- internal const string webReferences = "WebReferences";
- internal const string webReferenceUrl = "WebReferenceUrl";
- internal const string relPath = "RelPath";
- internal const string visualStudio = "VisualStudio";
- internal const string webRefEnableProperties = "WebReference_EnableProperties";
- internal const string webRefEnableSqlTypes = "WebReference_EnableSQLTypes";
- internal const string webRefEnableLegacyEventing = "WebReference_EnableLegacyEventingModel";
- internal const string xmlNamespace = "http://schemas.microsoft.com/developer/msbuild/2003";
-
- internal const string cSharpGuid = "FAE04EC0-301F-11D3-BF4B-00C04F79EFBC";
- internal const string visualBasicGuid = "F184B08F-C81C-45F6-A57F-5ABD9991F28F";
- internal const string visualJSharpGuid = "E6FDF86B-F3D1-11D4-8576-0002A516ECE8";
- internal const string triumphProjectTypeGuid = "BAA0C2D2-18E2-41B9-852F-F413020CAA33";
- internal const string VSDCSProjectTypeGuid = "4D628B5B-2FBC-4AA6-8C16-197242AEB884";
- internal const string VSDVBProjectTypeGuid = "68B1623D-7FB9-47D8-8664-7ECEA3297D4F";
- internal const string wpfFlavorGuid = "60dc8134-eba5-43b8-bcc9-bb4bc16c2548";
- internal const string projectTypeGuids = "ProjectTypeGuids";
- internal const string platformID = "PlatformID";
- internal const string platformFamilyName = "PlatformFamilyName";
- internal const string deployTargetSuffix = "DeployDirSuffix";
- internal const string disableCSHostProc = "\n\n";
- internal const string disableVBHostProc = "\n\n";
- internal const string SDECSTargets = "Microsoft.CompactFramework.CSharp.targets";
- internal const string SDEVBTargets = "Microsoft.CompactFramework.VisualBasic.targets";
- internal const string TargetFrameworkVersion = "TargetFrameworkVersion";
- internal const string TargetFrameworkSubset = "TargetFrameworkSubset";
- internal const string TargetFrameworkProfile = "TargetFrameworkProfile";
- internal const string ClientProfile = "Client";
- internal const string vOne = "v1.0";
- internal const string vTwo = "v2.0";
- internal const string noWarn = "NoWarn";
- internal const string disabledVBWarnings = "42016,42017,42018,42019,42032,42353,42354,42355";
- internal const string xmlFileExtension = ".xml";
- internal const string csdprojFileExtension = ".csdproj";
- internal const string vbdprojFileExtension = ".vbdproj";
- internal const string csprojFileExtension = ".csproj";
- internal const string vbprojFileExtension = ".vbproj";
- internal const string myType = "MyType";
- internal const string web = "Web";
- internal const string windowsFormsWithCustomSubMain = "WindowsFormsWithCustomSubMain";
- internal const string windows = "Windows";
- internal const string codeAnalysisRuleAssemblies = "CodeAnalysisRuleAssemblies";
- internal const string console = "Console";
- internal const string empty = "Empty";
- internal const string exe = "Exe";
- internal const string library = "Library";
- internal const string winExe = "WinExe";
- internal const string outputType = "OutputType";
- internal const string fileUpgradeFlags = "FileUpgradeFlags";
- internal const string content = "Content";
- internal const string copytooutput = "CopyToOutputDirectory";
- internal const string preservenewest = "PreserveNewest";
- internal const string toolsVersion = MSBuildConstants.CurrentToolsVersion;
- internal const string vbTargetsVS2008 = @"$(MSBuildToolsPath)\Microsoft.VisualBasic.targets";
- internal const string vbTargetsVS2005 = @"$(MSBuildBinPath)\Microsoft.VisualBasic.targets";
- internal const string vsToolsPath = @"VSToolsPath";
- internal const string visualStudioVersion = @"VisualStudioVersion";
- internal const string toRepairPatternForAssetCompat = @"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\";
- internal const string toRepairPatternForAssetCompatBeforeV10 = @"$(MSBuildExtensionsPath)\Microsoft\VisualStudio\";
- internal const string toRepairPatternForAssetCompatV10 = @"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\";
- internal const string repairHardCodedPathPattern = @"^v\d{1,2}\.\d\\";
- }
-}
diff --git a/src/Deprecated/Conversion/Microsoft.Build.Conversion.csproj b/src/Deprecated/Conversion/Microsoft.Build.Conversion.csproj
deleted file mode 100644
index 0f73cd9c6d9..00000000000
--- a/src/Deprecated/Conversion/Microsoft.Build.Conversion.csproj
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
- Microsoft.Build.Conversion.Core
- $(FullFrameworkTFM)
- true
- false
- true
- This package contains the $(MSBuildProjectName) assembly which contains logic for converting projects. NOTE: This assembly is deprecated.
- false
- $(NoWarn);1570;1572;1573;1587
- disable
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
- $(AssemblyName).Strings.resources
- Designer
-
-
-
- Resources\Strings.shared.resx
- $(AssemblyName).Strings.shared.resources
- Designer
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Deprecated/Conversion/OldVSProjectFileReader.cs b/src/Deprecated/Conversion/OldVSProjectFileReader.cs
deleted file mode 100644
index 995871eb31c..00000000000
--- a/src/Deprecated/Conversion/OldVSProjectFileReader.cs
+++ /dev/null
@@ -1,825 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.IO;
-using System.Text;
-using System.Text.RegularExpressions;
-
-using error = Microsoft.Build.Shared.ErrorUtilities;
-
-namespace Microsoft.Build.Conversion
-{
- ///
- /// This class implements a custom text reader for the old VS7/Everett
- /// project file format. The old format allowed certain XML special
- /// characters to be present within an XML attribute value. For example,
- ///
- /// <MyElement MyAttribute="My --> Value" />
- ///
- /// However, the System.Xml classes are more strict, and do not allow
- /// the < or > characters to exist within an attribute value. But
- /// the conversion utility still needs to be able to convert all old
- /// project files. So the OldVSProjectFileReader class implements
- /// the TextReader interface, thereby effectively intercepting all of
- /// the calls which are used by the XmlTextReader to actually read the
- /// raw text out of the file. As we are reading the text out of the
- /// file, we replace all > (less-than) characters inside attribute values with ">",
- /// etc. The XmlTextReader has no idea that this is going on, but
- /// no longer complains about invalid characters.
- ///
- /// rgoel
- internal sealed class OldVSProjectFileReader : TextReader
- {
- // This is the underlying text file where we will be reading the raw text
- // from.
- private StreamReader oldVSProjectFile;
-
- // We will be reading one line at a time out of the text file, and caching
- // it here.
- private StringBuilder singleLine;
-
- // The "TextReader" interface that we are implementing only allows
- // forward access through the file. You cannot seek to a random location
- // or read backwards. This variable is the index into the "singleLine"
- // string above, which indicates how far the caller has read. Once we
- // reach the end of "singleLine", we'll go read a new line from the file.
- private int currentReadPositionWithinSingleLine;
-
- ///
- /// Constructor, initialized using the filename of an existing old format
- /// project file on disk.
- ///
- /// rgoel
- ///
- internal OldVSProjectFileReader
- (
- string filename
- )
- {
- this.oldVSProjectFile = new StreamReader(filename, Encoding.Default); // HIGHCHAR: Default means ANSI, ANSI is what VS .NET 2003 wrote. Without this, the project would be read as ASCII.
-
- this.singleLine = new StringBuilder();
- this.currentReadPositionWithinSingleLine = 0;
- }
-
- ///
- /// Releases all locks and closes all handles on the underlying file.
- ///
- /// rgoel
- public override void Close
- (
- )
- {
- oldVSProjectFile.Close();
- }
-
- ///
- /// Returns the next character in the file, without actually advancing
- /// the read pointer. Returns -1 if we're already at the end of the file.
- ///
- ///
- /// rgoel
- public override int Peek
- (
- )
- {
- // If necessary, read a new line of text into our internal buffer
- // (this.singleLine).
- if (!this.ReadLineIntoInternalBuffer())
- {
- // If we've reached the end of the file, return -1.
- return -1;
- }
-
- // Return the next character, but don't advance the current position.
- return this.singleLine[this.currentReadPositionWithinSingleLine];
- }
-
- ///
- /// Returns the next character in the file, and advances the read pointer.
- /// Returns -1 if we're already at the end of the file.
- ///
- ///
- /// rgoel
- public override int Read
- (
- )
- {
- // Use our "Peek" functionality above.
- int returnCharacter = this.Peek();
-
- // If there's a character there, advance the read pointer by one.
- if (returnCharacter != -1)
- {
- this.currentReadPositionWithinSingleLine++;
- }
-
- return returnCharacter;
- }
-
- ///
- /// Reads the specified number of characters into the caller's buffer,
- /// starting at the specified index into the caller's buffer. Returns
- /// the number of characters read, or 0 if we're already at the end of
- /// the file.
- ///
- ///
- ///
- ///
- ///
- /// rgoel
- public override int Read
- (
- char[] bufferToReadInto, // The buffer to read the data into.
- int startIndexIntoBuffer, // The index into "bufferToReadInto"
- int charactersToRead // The number of characters to read.
- )
- {
- // Make sure there's enough room in the caller's buffer for what he's
- // asking us to do.
- if ((startIndexIntoBuffer + charactersToRead) > bufferToReadInto.Length)
- {
- // End-user should never see this message, so it doesn't need to be localized.
- throw new ArgumentException("Cannot write past end of user's buffer.", nameof(charactersToRead));
- }
-
- int charactersCopied = 0;
-
- // Keep looping until we've read in the number of characters requested.
- // If we reach the end of file, we'll break out early.
- while (0 < charactersToRead)
- {
- // Read more data from the underlying file if necessary.
- if (!this.ReadLineIntoInternalBuffer())
- {
- // If we've reached the end of the underlying file, exit the
- // loop.
- break;
- }
-
- // We're going to copy characters from our cached singleLine to the caller's
- // buffer. The number of characters to copy is the lesser of (the remaining
- // characters in our cached singleLine) and (the number of characters remaining
- // before we've fulfilled the caller's request).
- int charactersToCopy = (this.singleLine.Length - currentReadPositionWithinSingleLine);
- if (charactersToCopy > charactersToRead)
- {
- charactersToCopy = charactersToRead;
- }
-
- // Copy characters from our cached "singleLine" to the caller's buffer.
- this.singleLine.ToString().CopyTo(this.currentReadPositionWithinSingleLine, bufferToReadInto,
- startIndexIntoBuffer, charactersToCopy);
-
- // Update all counts and indices.
- startIndexIntoBuffer += charactersToCopy;
- this.currentReadPositionWithinSingleLine += charactersToCopy;
- charactersCopied += charactersToCopy;
- charactersToRead -= charactersToCopy;
- }
-
- return charactersCopied;
- }
-
- ///
- /// Not implemented. Our class only supports reading from a file, which
- /// can't change beneath the covers while we're reading from it. Therefore,
- /// a blocking read doesn't make sense for our scenario. (A blocking read
- /// is where you wait until the requested number of characters actually
- /// become available ... which is never going to happen if you've already
- /// reached the end of a file.)
- ///
- ///
- ///
- ///
- ///
- /// rgoel
- public override int ReadBlock
- (
- char[] bufferToReadInto,
- int startIndexIntoBuffer,
- int charactersToRead
- )
- {
- throw new NotImplementedException();
- }
-
- ///
- /// Reads a single line of text, and returns it as a string, not including the
- /// terminating line-ending characters. If we were at the end of the file,
- /// return null.
- ///
- ///
- /// rgoel
- public override string ReadLine
- (
- )
- {
- // Read a new line from the underlying file if necessary (that is, only
- // if our currently cached singleLine has already been used up).
- if (!this.ReadLineIntoInternalBuffer())
- {
- // If we reached the end of the underlying file, return null.
- return null;
- }
-
- // We now have a single line of text cached in our "singleLine" variable.
- // Just return that, or the portion of that which hasn't been already read
- // by the caller).
- string result = this.singleLine.ToString(this.currentReadPositionWithinSingleLine,
- this.singleLine.Length - this.currentReadPositionWithinSingleLine);
-
- // The caller has read the entirety of our cached "singleLine", so update
- // our read pointer accordingly.
- this.currentReadPositionWithinSingleLine = this.singleLine.Length;
-
- // Strip off the line endings before returning to caller.
- char[] lineEndingCharacters = new char[] { '\r', '\n' };
- return result.Trim(lineEndingCharacters);
- }
-
- ///
- /// Reads the remainder of the file, and returns it as a string. Returns
- /// an empty string if we've already reached the end of the file.
- ///
- ///
- /// rgoel
- public override string ReadToEnd
- (
- )
- {
- // This is what we're going to return to the caller.
- StringBuilder result = new StringBuilder();
-
- // Keep reading lines of text out of the underlying file, one line at
- // a time.
- while (true)
- {
- if (!this.ReadLineIntoInternalBuffer())
- {
- // Exit the loop when we've reached the end of the underlying
- // file.
- break;
- }
-
- // Append the line of text to the resulting output.
- result.Append(this.singleLine.ToString(this.currentReadPositionWithinSingleLine,
- this.singleLine.Length - this.currentReadPositionWithinSingleLine));
-
- this.currentReadPositionWithinSingleLine = this.singleLine.Length;
- }
-
- return result.ToString();
- }
-
- ///
- /// And this is where the real magic happens. If our currently cached
- /// "singleLine" has been used up, we read a new line of text from the
- /// underlying text file. But as we read the line of text from the file,
- /// we immediately replace all instances of special characters that occur
- /// within double-quotes with the corresponding XML-friendly equivalents.
- /// For example, if the underlying text file contained this:
- ///
- /// <MyElement MyAttribute="My --> Value" />
- ///
- /// then we would read it in and immediately convert it to this:
- ///
- /// <MyElement MyAttribute="My --> Value" />
- ///
- /// and we would store it this way in our "singleLine", so that the callers
- /// never know the difference.
- ///
- /// This method returns true on success, and false if we were unable to
- /// read a new line (due to end of file).
- ///
- ///
- /// rgoel
- private bool ReadLineIntoInternalBuffer
- (
- )
- {
- // Only do the work if we've already used up the data in the currently
- // cached "singleLine".
- if (this.currentReadPositionWithinSingleLine >= this.singleLine.Length)
- {
- // Read a line of text from the underlying file.
- string lineFromProjectFile = this.oldVSProjectFile.ReadLine();
- if (lineFromProjectFile == null)
- {
- // If we've reached the end of the file, return false.
- return false;
- }
-
- // Take the line of text just read, and replace all special characters
- // with the escaped XML-friendly string equivalents.
- this.singleLine = new StringBuilder(this.ReplaceSpecialCharacters(lineFromProjectFile));
-
- // The underlying StreamReader.ReadLine method doesn't give us the
- // trailing line endings, so add them back ourselves.
- this.singleLine.Append(Environment.NewLine);
-
- // So now we have a new cached "singleLine". Reset the read pointer
- // to the beginning of the new line just read.
- this.currentReadPositionWithinSingleLine = 0;
- }
-
- return true;
- }
-
- ///
- /// This method uses a regular expression to search for the stuff in
- /// between double-quotes. We obviously don't want to touch the stuff
- /// OUTSIDE of double-quotes, because then we would be mucking with the
- /// real angle-brackets that delimit the XML element names, etc.
- ///
- ///
- ///
- /// rgoel
- private string ReplaceSpecialCharacters
- (
- string originalLine
- )
- {
- // Find the stuff within double-quotes, and send it off to the
- // "ReplaceSpecialCharactersInXmlAttribute" for proper replacement of
- // the special characters.
- Regex attributeValueInsideDoubleQuotesPattern = new Regex("= *\"[^\"]*\"");
-
- string replacedStuffInsideDoubleQuotes = attributeValueInsideDoubleQuotesPattern.Replace(originalLine,
- new MatchEvaluator(this.ReplaceSpecialCharactersInXmlAttribute));
-
- // Find the stuff within single-quotes, and send it off to the
- // "ReplaceSpecialCharactersInXmlAttribute" for proper replacement of
- // the special characters.
- Regex attributeValueInsideSingleQuotesPattern = new Regex("= *'[^']*'");
-
- string replacedStuffInsideSingleQuotes = attributeValueInsideSingleQuotesPattern.Replace(replacedStuffInsideDoubleQuotes,
- new MatchEvaluator(this.ReplaceSpecialCharactersInXmlAttribute));
-
- return replacedStuffInsideSingleQuotes;
- }
-
- ///
- /// This method is used as the delegate that is passed into Regex.Replace.
- /// It a regular expression to search for the stuff in
- /// between double-quotes. We obviously don't want to touch the stuff
- /// OUTSIDE of double-quotes, because then we would be mucking with the
- /// real angle-brackets that delimit the XML element names, etc.
- ///
- ///
- ///
- /// RGoel
- private string ReplaceSpecialCharactersInXmlAttribute
- (
- Match xmlAttribute
- )
- {
- // We've been given the string for the attribute value (i.e., all the stuff
- // within double-quotes, including the double-quotes). Replace all the special characters
- // within it, and return the new string.
- return ReplaceSpecialCharactersInXmlAttributeString(xmlAttribute.Value);
- }
-
- ///
- /// This method actually does the replacement of special characters within the
- /// text of the XML attribute.
- ///
- /// Input string
- /// New string with all the replacements (e.g. "&" becomes "&", etc.)
- /// RGoel
- internal static string ReplaceSpecialCharactersInXmlAttributeString
- (
- string xmlAttributeText
- )
- {
- // Replace the special characters with their XML-friendly escaped equivalents. The
- // "<" and ">" signs are easy, because if they exist at all within the value of an
- // XML attribute, we know that they need to be replaced with "<" and ">"
- // respectively.
- xmlAttributeText = xmlAttributeText.Replace("<", "<");
- xmlAttributeText = xmlAttributeText.Replace(">", ">");
- xmlAttributeText = ReplaceNonEscapingAmpersands(xmlAttributeText);
-
- return xmlAttributeText;
- }
-
- // Note -- the comment below is rendered a little confusing by escaping for XML doc compiler. Read "&" as "&"
- // and "&" as "&". Or just look at the intellisense tooltip.
- ///
- /// This method scans the strings for "&" characters, and based on what follows
- /// the "&" character, it determines whether the "&" character needs to be replaced
- /// with "&". The old XML parser used in the VS.NET 2002/2003 project system
- /// was quite inconsistent in its treatment of escaped characters in XML, so here
- /// we're having to make up for those bugs. The new XML parser (System.Xml)
- /// is much more strict in enforcing proper XML syntax, and therefore doesn't
- /// tolerate "&" characters in the XML attribute value, unless the "&" is being
- /// used to escape some special character.
- ///
- /// Input string
- /// New string with all the replacements (e.g. "&" becomes "&", etc.)
- /// RGoel
- private static string ReplaceNonEscapingAmpersands
- (
- string xmlAttributeText
- )
- {
- // Ampersands are a little trickier, because some instances of "&" we need to leave
- // untouched, and some we need to replace with "&". For example,
- // aaa&bbb should be replaced with aaa&bbb
- // But:
- // aaa<bbb should not be touched.
-
- // Loop through each instance of "&"
- int indexOfAmpersand = xmlAttributeText.IndexOf('&');
- while (indexOfAmpersand != -1)
- {
- // If an "&" was found, search for the next ";" following the "&".
- int indexOfNextSemicolon = xmlAttributeText.IndexOf(';', indexOfAmpersand);
- if (indexOfNextSemicolon == -1)
- {
- // No semicolon means that the ampersand was really intended to be a literal
- // ampersand and therefore we need to replace it with "&". For example,
- //
- // aaa&bbb should get replaced with aaa&bbb
- xmlAttributeText = ReplaceAmpersandWithLiteral(xmlAttributeText, indexOfAmpersand);
- }
- else
- {
- // We found the semicolon. Capture the characters between (but not
- // including) the "&" and ";".
- string entityName = xmlAttributeText.Substring(indexOfAmpersand + 1,
- indexOfNextSemicolon - indexOfAmpersand - 1);
-
- // Perf note: Here we are walking through the entire list of entities, and
- // doing a string comparison for each. This is expensive, but this code
- // should only get executed in fairly rare circumstances. It's not very
- // common for people to have these embedded into their project files.
- bool foundEntity = false;
- for (int i = 0; i < entities.Length; i++)
- {
- // Case-sensitive comparison to see if the entity name matches any of
- // the well-known ones that were emitted by the XML writer in the VS.NET
- // 2002/2003 project system.
- if (String.Equals(entityName, entities[i], StringComparison.Ordinal))
- {
- foundEntity = true;
- break;
- }
- }
-
- // If it didn't match a well-known entity name, then the next thing to
- // check is if it represents an ASCII code. For example, in an XML
- // attribute, if I wanted to represent the "+" sign, I could do this:
- //
- // +
- //
- if (!foundEntity && (entityName.Length > 0) && (entityName[0] == '#'))
- {
- // At this point, we know entityName is something like "#1234" or "#x1234abcd"
- bool isNumber = false;
-
- // A lower-case "x" in the second position indicates a hexadecimal value.
- if ((entityName.Length > 2) && (entityName[1] == 'x'))
- {
- isNumber = true;
-
- // It's a hexadecimal number. Make sure every character of the entity
- // is in fact a valid hexadecimal character.
- for (int i = 2; i < entityName.Length; i++)
- {
- if (!Uri.IsHexDigit(entityName[i]))
- {
- isNumber = false;
- break;
- }
- }
- }
- else if (entityName.Length > 1)
- {
- // Otherwise it's a decimal value.
- isNumber = true;
-
- // ake sure every character of the entity is in fact a valid decimal number.
- for (int i = 1; i < entityName.Length; i++)
- {
- if (!Char.IsNumber(entityName[i]))
- {
- isNumber = false;
- break;
- }
- }
- }
-
- if (isNumber)
- {
- foundEntity = true;
- }
- }
-
- // If the ampersand did not precede an actual well-known entity, then we DO want to
- // replace the "&" with a "&". Otherwise we don't.
- if (!foundEntity)
- {
- xmlAttributeText = ReplaceAmpersandWithLiteral(xmlAttributeText, indexOfAmpersand);
- }
- }
-
- // We're done process that particular "&". Now find the next one.
- indexOfAmpersand = xmlAttributeText.IndexOf('&', indexOfAmpersand + 1);
- }
-
- return xmlAttributeText;
- }
-
- // Note -- the comment below is rendered a little confusing by escaping for XML doc compiler. Read "&" as "&"
- // and "&" as "&". Or just look at the intellisense tooltip.
- ///
- /// Replaces a single instance of an "&" character in a string with "&" and returns the new string.
- ///
- /// Original string where we should find an "&" character.
- /// The index of the "&" which we want to replace.
- /// The new string with the "&" replaced with "&".
- /// RGoel
- internal static string ReplaceAmpersandWithLiteral
- (
- string originalString,
- int indexOfAmpersand
- )
- {
- error.VerifyThrow(originalString[indexOfAmpersand] == '&',
- "Caller passed in a string that doesn't have an '&' character in the specified location.");
-
- StringBuilder replacedString = new StringBuilder();
-
- replacedString.Append(originalString, 0, indexOfAmpersand);
- replacedString.Append("&");
- replacedString.Append(originalString, indexOfAmpersand + 1, originalString.Length - indexOfAmpersand + 1);
-
- return replacedString.ToString();
- }
-
- // This is the complete list of well-known entity names that were written out
- // by the XML writer in the VS.NET 2002/2003 project system. This list was
- // taken directly from the source code.
- private static readonly string[] entities =
- {
- "quot", //
- "amp", // & - ampersand
- "apos", // ' - apostrophe //// not part of HTML!
- "lt", // < less than
- "gt", // > greater than
- "nbsp", // Non breaking space
- "iexcl", //
- "cent", // cent
- "pound", // pound
- "curren", // currency
- "yen", // yen
- "brvbar", // vertical bar
- "sect", // section
- "uml", //
- "copy", // Copyright
- "ordf", //
- "laquo", //
- "not", //
- "shy", //
- "reg", // Registered TradeMark
- "macr", //
- "deg", //
- "plusmn", //
- "sup2", //
- "sup3", //
- "acute", //
- "micro", //
- "para", //
- "middot", //
- "cedil", //
- "sup1", //
- "ordm", //
- "raquo", //
- "frac14", // 1/4
- "frac12", // 1/2
- "frac34", // 3/4
- "iquest", // Inverse question mark
- "Agrave", // Capital A grave accent
- "Aacute", // Capital A acute accent
- "Acirc", // Capital A circumflex accent
- "Atilde", // Capital A tilde
- "Auml", // Capital A dieresis or umlaut mark
- "Aring", // Capital A ring
- "AElig", // Capital AE dipthong (ligature)
- "Ccedil", // Capital C cedilla
- "Egrave", // Capital E grave accent
- "Eacute", // Capital E acute accent
- "Ecirc", // Capital E circumflex accent
- "Euml", // Capital E dieresis or umlaut mark
- "Igrave", // Capital I grave accent
- "Iacute", // Capital I acute accent
- "Icirc", // Capital I circumflex accent
- "Iuml", // Capital I dieresis or umlaut mark
- "ETH", // Capital Eth Icelandic
- "Ntilde", // Capital N tilde
- "Ograve", // Capital O grave accent
- "Oacute", // Capital O acute accent
- "Ocirc", // Capital O circumflex accent
- "Otilde", // Capital O tilde
- "Ouml", // Capital O dieresis or umlaut mark
- "times", // multiply or times
- "Oslash", // Capital O slash
- "Ugrave", // Capital U grave accent
- "Uacute", // Capital U acute accent
- "Ucirc", // Capital U circumflex accent
- "Uuml", // Capital U dieresis or umlaut mark;
- "Yacute", // Capital Y acute accent
- "THORN", // Capital THORN Icelandic
- "szlig", // Small sharp s German (sz ligature)
- "agrave", // Small a grave accent
- "aacute", // Small a acute accent
- "acirc", // Small a circumflex accent
- "atilde", // Small a tilde
- "auml", // Small a dieresis or umlaut mark
- "aring", // Small a ring
- "aelig", // Small ae dipthong (ligature)
- "ccedil", // Small c cedilla
- "egrave", // Small e grave accent
- "eacute", // Small e acute accent
- "ecirc", // Small e circumflex accent
- "euml", // Small e dieresis or umlaut mark
- "igrave", // Small i grave accent
- "iacute", // Small i acute accent
- "icirc", // Small i circumflex accent
- "iuml", // Small i dieresis or umlaut mark
- "eth", // Small eth Icelandic
- "ntilde", // Small n tilde
- "ograve", // Small o grave accent
- "oacute", // Small o acute accent
- "ocirc", // Small o circumflex accent
- "otilde", // Small o tilde
- "ouml", // Small o dieresis or umlaut mark
- "divide", // divide
- "oslash", // Small o slash
- "ugrave", // Small u grave accent
- "uacute", // Small u acute accent
- "ucirc", // Small u circumflex accent
- "uuml", // Small u dieresis or umlaut mark
- "yacute", // Small y acute accent
- "thorn", // Small thorn Icelandic
- "yuml", // Small y dieresis or umlaut mark
- "OElig", // latin capital ligature oe, U0152 ISOlat2
- "oelig", // latin small ligature oe, U0153 ISOlat2
- "Scaron", // latin capital letter s with caron, U0160 ISOlat2
- "scaron", // latin small letter s with caron, U0161 ISOlat2
- "Yuml", // latin capital letter y with diaeresis, U0178 ISOlat2
- "fnof", // latin small f with hook, =function, =florin, U0192 ISOtech
- "circ", // modifier letter circumflex accent, U02C6 ISOpub
- "tilde", // small tilde, U02DC ISOdia
- "Alpha", // greek capital letter alpha
- "Beta", // greek capital letter beta
- "Gamma", // greek capital letter gamma
- "Delta", // greek capital letter delta
- "Epsilon", // greek capital letter epsilon
- "Zeta", // greek capital letter zeta
- "Eta", // greek capital letter eta
- "Theta", // greek capital letter theta
- "Iota", // greek capital letter iota
- "Kappa", // greek capital letter kappa
- "Lambda", // greek capital letter lambda
- "Mu", // greek capital letter mu
- "Nu", // greek capital letter nu
- "Xi", // greek capital letter xi
- "Omicron", // greek capital letter omicron
- "Pi", // greek capital letter pi
- "Rho", // greek capital letter rho
- "Sigma", // greek capital letter sigma
- "Tau", // greek capital letter tau
- "Upsilon", // greek capital letter upsilon
- "Phi", // greek capital letter phi
- "Chi", // greek capital letter chi
- "Psi", // greek capital letter psi
- "Omega", // greek capital letter omega
- "alpha", // greek small letter alpha
- "beta", // greek small letter beta
- "gamma", // greek small letter gamma
- "delta", // greek small letter delta
- "epsilon", // greek small letter epsilon
- "zeta", // greek small letter zeta
- "eta", // greek small letter eta
- "theta", // greek small letter theta
- "iota", // greek small letter iota
- "kappa", // greek small letter kappa
- "lambda", // greek small letter lambda
- "mu", // greek small letter mu
- "nu", // greek small letter nu
- "xi", // greek small letter xi
- "omicron", // greek small letter omicron
- "pi", // greek small letter pi
- "rho", // greek small letter rho
- "sigmaf", // greek small final sigma
- "sigma", // greek small letter sigma
- "tau", // greek small letter tau
- "upsilon", // greek small letter upsilon
- "phi", // greek small letter phi
- "chi", // greek small letter chi
- "psi", // greek small letter psi
- "omega", // greek small letter omega
- "thetasym", // greek small letter theta symbol, U03D1 NEW
- "upsih", // greek upsilon with hook symbol
- "piv", // greek pi symbol
- "ensp", // en space, U2002 ISOpub
- "emsp", // em space, U2003 ISOpub
- "thinsp", // thin space, U2009 ISOpub
- "zwnj", // zero width non-joiner, U200C NEW RFC 2070
- "zwj", // zero width joiner, U200D NEW RFC 2070
- "lrm", // left-to-right mark, U200E NEW RFC 2070
- "rlm", // right-to-left mark, U200F NEW RFC 2070
- "ndash", // en dash, U2013 ISOpub
- "mdash", // em dash, U2014 ISOpub
- "lsquo", // left single quotation mark, U2018 ISOnum
- "rsquo", // right single quotation mark, U2019 ISOnum
- "sbquo", // single low-9 quotation mark, U201A NEW
- "ldquo", // left double quotation mark, U201C ISOnum
- "rdquo", // right double quotation mark, U201D ISOnum
- "bdquo", // double low-9 quotation mark, U201E NEW
- "dagger", // dagger, U2020 ISOpub
- "Dagger", // double dagger, U2021 ISOpub
- "bull", // bullet, =black small circle, U2022 ISOpub
- "hellip", // horizontal ellipsis, =three dot leader, U2026 ISOpub
- "permil", // per mille sign, U2030 ISOtech
- "prime", // prime, =minutes, =feet, U2032 ISOtech
- "Prime", // double prime, =seconds, =inches, U2033 ISOtech
- "lsaquo", // single left-pointing angle quotation mark, U2039 ISO proposed
- "rsaquo", // single right-pointing angle quotation mark, U203A ISO proposed
- "oline", // overline, spacing overscore
- "frasl", // fraction slash
- "image", // blackletter capital I, =imaginary part, U2111 ISOamso
- "weierp", // script capital P, =power set, =Weierstrass p, U2118 ISOamso
- "real", // blackletter capital R, =real part symbol, U211C ISOamso
- "trade", // trade mark sign, U2122 ISOnum
- "alefsym", // alef symbol, =first transfinite cardinal, U2135 NEW
- "larr", // leftwards arrow, U2190 ISOnum
- "uarr", // upwards arrow, U2191 ISOnum
- "rarr", // rightwards arrow, U2192 ISOnum
- "darr", // downwards arrow, U2193 ISOnum
- "harr", // left right arrow, U2194 ISOamsa
- "crarr", // downwards arrow with corner leftwards, =carriage return, U21B5 NEW
- "lArr", // leftwards double arrow, U21D0 ISOtech
- "uArr", // upwards double arrow, U21D1 ISOamsa
- "rArr", // rightwards double arrow, U21D2 ISOtech
- "dArr", // downwards double arrow, U21D3 ISOamsa
- "hArr", // left right double arrow, U21D4 ISOamsa
- "forall", // for all, U2200 ISOtech
- "part", // partial differential, U2202 ISOtech
- "exist", // there exists, U2203 ISOtech
- "empty", // empty set, =null set, =diameter, U2205 ISOamso
- "nabla", // nabla, =backward difference, U2207 ISOtech
- "isin", // element of, U2208 ISOtech
- "notin", // not an element of, U2209 ISOtech
- "ni", // contains as member, U220B ISOtech
- "prod", // n-ary product, =product sign, U220F ISOamsb
- "sum", // n-ary sumation, U2211 ISOamsb
- "minus", // minus sign, U2212 ISOtech
- "lowast", // asterisk operator, U2217 ISOtech
- "radic", // square root, =radical sign, U221A ISOtech
- "prop", // proportional to, U221D ISOtech
- "infin", // infinity, U221E ISOtech
- "ang", // angle, U2220 ISOamso
- "and", // logical and, =wedge, U2227 ISOtech
- "or", // logical or, =vee, U2228 ISOtech
- "cap", // intersection, =cap, U2229 ISOtech
- "cup", // union, =cup, U222A ISOtech
- "int", // integral, U222B ISOtech
- "there4", // therefore, U2234 ISOtech
- "sim", // tilde operator, =varies with, =similar to, U223C ISOtech
- "cong", // approximately equal to, U2245 ISOtech
- "asymp", // almost equal to, =asymptotic to, U2248 ISOamsr
- "ne", // not equal to, U2260 ISOtech
- "equiv", // identical to, U2261 ISOtech
- "le", // less-than or equal to, U2264 ISOtech
- "ge", // greater-than or equal to, U2265 ISOtech
- "sub", // subset of, U2282 ISOtech
- "sup", // superset of, U2283 ISOtech
- "nsub", // not a subset of, U2284 ISOamsn
- "sube", // subset of or equal to, U2286 ISOtech
- "supe", // superset of or equal to, U2287 ISOtech
- "oplus", // circled plus, =direct sum, U2295 ISOamsb
- "otimes", // circled times, =vector product, U2297 ISOamsb
- "perp", // up tack, =orthogonal to, =perpendicular, U22A5 ISOtech
- "sdot", // dot operator, U22C5 ISOamsb
- "lceil", // left ceiling, =apl upstile, U2308, ISOamsc
- "rceil", // right ceiling, U2309, ISOamsc
- "lfloor", // left floor, =apl downstile, U230A, ISOamsc
- "rfloor", // right floor, U230B, ISOamsc
- "lang", // left-pointing angle bracket, =bra, U2329 ISOtech
- "rang", // right-pointing angle bracket, =ket, U232A ISOtech
- "loz", // lozenge, U25CA ISOpub
- "spades", // black spade suit, U2660 ISOpub
- "clubs", // black club suit, =shamrock, U2663 ISOpub
- "hearts", // black heart suit, =valentine, U2665 ISOpub
- "diams" // black diamond suit, U2666 ISOpub
- };
- }
-}
diff --git a/src/Deprecated/Conversion/ProjectFileConverter.cs b/src/Deprecated/Conversion/ProjectFileConverter.cs
deleted file mode 100644
index 699df69088c..00000000000
--- a/src/Deprecated/Conversion/ProjectFileConverter.cs
+++ /dev/null
@@ -1,4109 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Globalization;
-using System.Reflection;
-using System.Xml;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Text.RegularExpressions;
-using System.Linq;
-
-using Microsoft.Build.Construction;
-using Microsoft.Build.Shared;
-using ProjectLoadSettings = Microsoft.Build.BuildEngine.ProjectLoadSettings;
-using OldProject = Microsoft.Build.BuildEngine.Project;
-using OldEngine = Microsoft.Build.BuildEngine.Engine;
-
-using InvalidProjectFileException = Microsoft.Build.Exceptions.InvalidProjectFileException;
-using ProjectXmlUtilities = Microsoft.Build.Internal.ProjectXmlUtilities;
-
-using error = Microsoft.Build.Shared.ErrorUtilities;
-using Microsoft.Build.Evaluation;
-
-namespace Microsoft.Build.Conversion
-{
- /***************************************************************************
- *
- * An outline of the structure of a VS.NET 2002/2003 project file is shown
- * below:
- *
- *
- *
- *
- *
- *
- * (.USER file only)
- *
- *
- * (.USER file only)
- *
- * ...
- *
- *
- *
- *
- *
- * ...
- *
- *
- *
- *
- *
- * ...
- *
- *
- *
- *
- *
- *
- *
- * ...
- *
- *
- *
- *
- *
- *
- * ...
- *
- *
- *
- * random goop?
- *
- *
- * (.USER file only)
- *
- *
- *
- *
- *
- **************************************************************************/
- ///
- /// This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- /// This class performs a project file format conversion from Visual Studio
- /// .NET 2002 or 2003 to MSBuild format (for Whidbey).
- ///
- ///
- /// [!WARNING]
- /// > This class (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public sealed class ProjectFileConverter
- {
- // The filename of the old VS7/Everett project file.
- private string oldProjectFile = null;
-
- // The target Whidbey project file for the conversion.
- private string newProjectFile = null;
-
- // Is the project file we're converting a .USER file?
- private bool isUserFile = false;
-
- // Is the conversion a minor upgrade operation?
- // Minor upgrade also means the converted project file can be opened in old VS as well, so we won't update the tools version.
- private bool isMinorUpgrade = false;
-
- // The object representing the destination XMake project.
- private ProjectRootElement xmakeProject = null;
-
- // This is the XMake object representing the global property group
- // in the destination project file.
- private ProjectPropertyGroupElement globalPropertyGroup = null;
-
- // The language for the project we're converting -- CSHARP, VisualBasic, VISUALJSHARP
- private string language = null;
-
- // This is the project instance GUID for the project we're converting
- // (only if it's the main project file -- this doesn't apply for .USER
- // files).
- private string projectGuid = null;
-
- // This is the fullpath to the solution file that contains this project
- // being converted. When conversion is done from the IDE in-proc, this
- // information can be given to us unambiguously. However, in the command-
- // line case, we may have to use a heuristic to search for the containing
- // SLN ourselves.
- private string solutionFile = null;
-
- // This is the object representing the VS solution named above.
- private SolutionFile solution = null;
-
- // The PreBuildEvent and PostBuildEvent properties are handled specially.
- private string preBuildEvent = null;
- private string postBuildEvent = null;
-
- // If we see any web references in the project, we must add some new properties to the
- // Whidbey project file, in order to force the proxy generation code to mimic the
- // Everett behavior.
- private bool newWebReferencePropertiesAdded = false;
-
- // If this is a VSD ( devices ) project, this is the platform retrieved. It's needed in two places...
- private string platformForVSD = null;
- private string frameworkVersionForVSD = null;
-
- // Cache the assembly name (used for converting DocumentationFile property for VB)
- private string assemblyName = null;
-
- // Cache the output type (used for choosing the correct MyType for VB projects).
- private string outputType = null;
-
- // Whether or not System.Windows.Forms is present as a reference.
- private bool hasWindowsFormsReference = false;
-
- private bool isMyTypeAlreadySetInOriginalProject = false;
-
- // Internal collecction that collects the conversion warnings,
- // to be exposed through the ConversionWarnings property
- private ArrayList conversionWarnings = null;
-
- // A list of property names whose values we need to escape when converting to Whidbey.
- private Dictionary propertiesToEscape = null;
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// Default constructor. We need a constructor that takes zero parameters,
- /// because this class needs to be instantiated from COM.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public ProjectFileConverter
- (
- )
- {
- this.oldProjectFile = null;
- this.newProjectFile = null;
- this.isUserFile = false;
- this.solutionFile = null;
-
- Initialize();
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// The read/write accessor for the old project filename. This must be
- /// set by the consumer before calling Convert().
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public string OldProjectFile
- {
- get
- {
- return oldProjectFile;
- }
- set
- {
- oldProjectFile = value;
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// The read/write accessor for the new project filename. This must be
- /// set by the consumer before calling Convert().
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public string NewProjectFile
- {
- get
- {
- return newProjectFile;
- }
- set
- {
- newProjectFile = value;
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// The read/write accessor for the boolean which tells the converter
- /// whether the project file we're converting is a "main" project file
- /// or a .USER file. Most of the conversion logic is identical for
- /// both types of files, but for example, one difference is that the
- /// "main" project file gets an <Import> tag inserted at the end.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public bool IsUserFile
- {
- get
- {
- return isUserFile;
- }
- set
- {
- isUserFile = value;
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// The read/write accessor for the solution file which contains this
- /// project being converted. This is used to look up information about the
- /// project-to-project references.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public string SolutionFile
- {
- get
- {
- return solutionFile;
- }
- set
- {
- solutionFile = Path.GetFullPath(value);
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// Indicates if the last attempted conversion was skipped because the project is already in the latest format.
- /// This will always return false;
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// SumedhK
- /// true, if conversion was skipped
- public bool ConversionSkippedBecauseProjectAlreadyConverted
- {
- get
- {
- return false;
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// This property returns the list of warnings that were generated during the conversion
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// faisalmo
- /// true, if conversion was skipped
- [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays", Justification = "Public interface that has shipped previously. ")]
- public string[] ConversionWarnings
- {
- get
- {
- return (string[])conversionWarnings.ToArray(typeof(string));
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// Is the conversion a minor upgrade operation?
- /// Minor upgrade also means the converted project file can be opened in old VS as well, so we won't update the tools version.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- public bool IsMinorUpgrade
- {
- get
- {
- return this.isMinorUpgrade;
- }
-
- set
- {
- this.isMinorUpgrade = value;
- }
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will overwrite "newProjectFile" if it already
- /// exists, so the caller of this method should confirm with the user
- /// that that's what he really wants to do.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- /// rgoel
- public void Convert()
- {
- DoConvert();
- }
-
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will overwrite "newProjectFile" if it already
- /// exists, so the caller of this method should confirm with the user
- /// that that's what he really wants to do.
- ///
- /// rgoel
- [Obsolete("Use parameterless overload instead")]
- public void Convert(ProjectLoadSettings projectLoadSettings)
- {
- DoConvert();
- }
-
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will overwrite "newProjectFile" if it already
- /// exists, so the caller of this method should confirm with the user
- /// that that's what he really wants to do.
- ///
- /// rgoel
- [Obsolete("Use parameterless overload instead.")]
- public void Convert
- (
- string msbuildBinPath
- )
- {
- DoConvert();
- }
-
- ///
- /// Helper method to convert given an engine
- ///
- private void DoConvert()
- {
- // Make sure we were passed in non-empty source and destination project
- // file names.
- error.VerifyThrowArgument(!string.IsNullOrEmpty(this.oldProjectFile),
- "MissingOldProjectFile");
- error.VerifyThrowArgument(!string.IsNullOrEmpty(this.newProjectFile),
- "MissingNewProjectFile");
-
- ConvertInMemoryToMSBuildProject();
-
- this.xmakeProject.Save(newProjectFile);
- }
-
- ///
- /// Initialize all member variables to get ready for a conversion.
- ///
- /// RGoel
- private void Initialize()
- {
- this.xmakeProject = null;
- this.globalPropertyGroup = null;
- this.language = null;
- this.projectGuid = null;
- this.preBuildEvent = null;
- this.postBuildEvent = null;
- this.solution = null;
- this.newWebReferencePropertiesAdded = false;
- this.platformForVSD = null;
- this.assemblyName = null;
- this.outputType = null;
- this.hasWindowsFormsReference = false;
- this.isMyTypeAlreadySetInOriginalProject = false;
- this.conversionWarnings = new ArrayList();
-
- this.propertiesToEscape = new Dictionary(StringComparer.OrdinalIgnoreCase);
- this.propertiesToEscape.Add("ApplicationIcon", null);
- this.propertiesToEscape.Add("AssemblyKeyContainerName", null);
- this.propertiesToEscape.Add("AssemblyName", null);
- this.propertiesToEscape.Add("AssemblyOriginatorKeyFile", null);
- this.propertiesToEscape.Add("RootNamespace", null);
- this.propertiesToEscape.Add("StartupObject", null);
- this.propertiesToEscape.Add("ConfigurationOverrideFile", null);
- this.propertiesToEscape.Add("DocumentationFile", null);
- this.propertiesToEscape.Add("OutputPath", null);
- }
-
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will simply create a new XmlDocument
- /// in memory, instead of trying to write it to disk.
- ///
- /// RGoel
- private void ConvertInMemoryToMSBuildProject()
- {
- // Make sure we were passed in non-empty source and destination project
- // file names.
- error.VerifyThrowArgument(!string.IsNullOrEmpty(this.oldProjectFile),
- "MissingOldProjectFile");
-
- // Make sure the source project file exists.
- error.VerifyThrowArgument(File.Exists(oldProjectFile), "ProjectFileNotFound",
- oldProjectFile);
-
- Initialize();
-
- // Load the old project file as an XML document.
- XmlDocumentWithLocation oldProjectDocument = new XmlDocumentWithLocation();
- oldProjectDocument.PreserveWhitespace = true;
- TextReader oldProjectFileReader = new OldVSProjectFileReader(oldProjectFile);
- try
- {
- // We have our own custom XML reader to read in the old VS7/Everett project
- // file. This is because the VS7/Everett project file format supported
- // having characters like <, >, &, etc. embedded inside XML attribute
- // values, but the default XmlTextReader won't handle this.
- using (XmlTextReader xmlReader = new XmlTextReader(oldProjectFileReader))
- {
- xmlReader.DtdProcessing = DtdProcessing.Ignore;
- oldProjectDocument.Load(xmlReader);
- }
- }
- catch (Exception e)
- {
- throw new InvalidProjectFileException(e.Message);
- }
- finally
- {
- oldProjectFileReader.Close();
- }
-
- // Get the top-level nodes from the XML.
- XmlNodeList rootNodes = oldProjectDocument.ChildNodes;
- XmlElementWithLocation visualStudioProjectElement = null;
-
- // The XML parser will guarantee that we only have one real root element,
- // but since XML comments may appear outside of the scope,
- // it's possible to get more than one child node. Just find the first
- // non-comment node. That should be the element.
- foreach (XmlNode childNode in rootNodes)
- {
- if ((childNode.NodeType != XmlNodeType.Comment) &&
- (childNode.NodeType != XmlNodeType.XmlDeclaration) &&
- (childNode.NodeType != XmlNodeType.Whitespace))
- {
- visualStudioProjectElement = (XmlElementWithLocation)childNode;
- break;
- }
- }
-
- IElementLocation oldProjectDocumentLocation = ElementLocation.Create(oldProjectDocument.FullPath, 1, 1);
-
- // Verify that we found a non-comment root node.
- ProjectErrorUtilities.VerifyThrowInvalidProject(visualStudioProjectElement != null,
- oldProjectDocumentLocation,
- "NoRootProjectElement", VSProjectElements.visualStudioProject);
-
- // If the root element is , then assume that this project is
- // already in XMake format.
- if (visualStudioProjectElement.Name == XMakeProjectStrings.project)
- {
- this.xmakeProject = ProjectRootElement.Open(oldProjectFile);
-
- // For Whidbey project just need to set the "ToolsVersion" attribute for the main project file
- // and remove imports like
- // because the Fidalgo stuff is part of .NET Framework 3.5
-
- // For upgraded workflow projects, the workflow targets need to reference the new v3.5 targets instead of v3.0 targets
- // this change is required to fix the msbuild break when building workflow rules.
- // e.g. before upgrade :
- // after upgrade
-
- string oldToolsVersion = xmakeProject.ToolsVersion;
-
- xmakeProject.ToolsVersion = XMakeProjectStrings.toolsVersion;
- List listOfImportsToBeDeleted = new List();
- List listOfWFImportsToBeDeleted = new List();
- List workflowImportsToAdd = new List();
- string workflowTargetsBasePath = @"$(MSBuildExtensionsPath)\Microsoft\Windows Workflow Foundation\";
- string workflowOldWhidbeyTargetsPath = workflowTargetsBasePath + @"v3.0\";
- string workflowOldOrcasTargetsPath = workflowTargetsBasePath + @"v3.5\";
- string workflowNewTargetsPath = @"$(MSBuildToolsPath)\";
- bool removedWFWhidbeyTargets = false;
- bool changedProject = false;
-
- // Find matching imports but don't delete whilst enumerating else it will throw an error
- foreach (ProjectImportElement nextImport in xmakeProject.Imports)
- {
- if (String.Equals(nextImport.Project, @"$(MSBuildBinPath)\Microsoft.WinFX.targets", StringComparison.OrdinalIgnoreCase))
- {
- listOfImportsToBeDeleted.Add(nextImport);
- }
-
- if (nextImport.Project.Contains(workflowOldWhidbeyTargetsPath))
- {
- listOfWFImportsToBeDeleted.Add(nextImport);
- workflowImportsToAdd.Add(nextImport.Project.Replace(workflowOldWhidbeyTargetsPath, workflowNewTargetsPath));
- removedWFWhidbeyTargets = true;
- }
- if (nextImport.Project.Contains(workflowOldOrcasTargetsPath))
- {
- listOfWFImportsToBeDeleted.Add(nextImport);
- workflowImportsToAdd.Add(nextImport.Project.Replace(workflowOldOrcasTargetsPath, workflowNewTargetsPath));
- }
- }
-
- // Now delete any matching imports
- foreach (ProjectImportElement importToDelete in listOfWFImportsToBeDeleted)
- {
- this.xmakeProject.RemoveChild(importToDelete);
- changedProject = true;
- }
-
- bool removedWinFXTargets = false;
- foreach (ProjectImportElement importToDelete in listOfImportsToBeDeleted)
- {
- this.xmakeProject.RemoveChild(importToDelete);
- removedWinFXTargets = true;
- changedProject = true;
- }
-
- // If we removed WinFX targets this is a sparkle project and should use v3.0
- if (removedWinFXTargets)
- {
- xmakeProject.AddProperty(XMakeProjectStrings.TargetFrameworkVersion, "v3.0");
- changedProject = true;
- }
-
- //If we removed WFWhidbey imports, we should target this project to v3.0
- if (removedWFWhidbeyTargets)
- {
- xmakeProject.AddProperty(XMakeProjectStrings.TargetFrameworkVersion, "v3.0");
- changedProject = true;
- }
-
- // Re-add the workflow imports with the v4.0 targets.
- foreach (string workflowImportToAdd in workflowImportsToAdd)
- {
- this.xmakeProject.AddImport(workflowImportToAdd);
- changedProject = true;
- }
-
- // Find all the XAML files in the project and give them the custom attributes
- // MSBuild:Compile (DevDiv Bugs bug 81222)
- // Designer (DevDiv Bugs bug 82748)
-
- // Find all references to old VC project files (.vcproj extension) and change the
- // extension to .vcxproj instead. NOTE: we assume that the actual .vcproj -> .vcxproj
- // conversion has already been / is being / will be done elsewhere.
- // Dev10 Bug 557388
-
- foreach (ProjectItemElement nextItem in xmakeProject.Items)
- {
- if ((!nextItem.ItemType.Equals("Reference", StringComparison.OrdinalIgnoreCase)) &&
- (nextItem.Include.Trim().EndsWith(".xaml", StringComparison.OrdinalIgnoreCase)))
-
- {
- if (!nextItem.Metadata.Any(m => String.Equals(m.Name, "Generator", StringComparison.OrdinalIgnoreCase)))
- {
- nextItem.AddMetadata("Generator", "MSBuild:Compile");
- changedProject = true;
- }
-
- if (!nextItem.Metadata.Any(m => String.Equals(m.Name, "SubType", StringComparison.OrdinalIgnoreCase)))
- {
- nextItem.AddMetadata("SubType", "Designer");
- changedProject = true;
- }
- }
-
- if (String.Equals(nextItem.ItemType, "ProjectReference", StringComparison.OrdinalIgnoreCase) &&
- nextItem.Include.Trim().EndsWith(".vcproj", StringComparison.OrdinalIgnoreCase))
- {
- nextItem.Include = Path.ChangeExtension(nextItem.Include, ".vcxproj");
- changedProject = true;
- }
- }
-
- // DevDiv Bugs bug 100701: if we removed the Microsoft.WinFX.targets import,
- // and if there is no ProjectTypeGuids property, add the WPF flavor GUID
- if (removedWinFXTargets)
- {
- ProjectPropertyElement currentGuidsProperty = FindPropertyIfPresent(this.xmakeProject, XMakeProjectStrings.projectTypeGuids);
- string newGuids = "{" + XMakeProjectStrings.wpfFlavorGuid + "}";
- if (currentGuidsProperty == null || currentGuidsProperty.Value.Length == 0)
- {
- string currentGuids = String.Empty;
-
- // To have a flavor GUID we need a base GUID.
- if (oldProjectFile.EndsWith(".csproj", StringComparison.OrdinalIgnoreCase))
- {
- currentGuids = "{" + XMakeProjectStrings.cSharpGuid + "}";
- }
- if (oldProjectFile.EndsWith(".vbproj", StringComparison.OrdinalIgnoreCase))
- {
- currentGuids = "{" + XMakeProjectStrings.visualBasicGuid + "}";
- }
- xmakeProject.AddProperty(XMakeProjectStrings.projectTypeGuids, newGuids + ";" + currentGuids);
- changedProject = true;
- }
- }
-
- // Fix up TargetFrameworkSubset
- changedProject = FixTargetFrameworkSubset() || changedProject;
-
- var hasFSharpSpecificConversions = FSharpSpecificConversions(true);
-
- changedProject = hasFSharpSpecificConversions || changedProject;
- changedProject = VBSpecificConversions() || changedProject;
-
- // Do asset compat repair for any project that was previously a TV < 12.0
- if (
- String.IsNullOrEmpty(oldToolsVersion) ||
- String.Equals(oldToolsVersion, "3.5", StringComparison.OrdinalIgnoreCase) ||
- String.Equals(oldToolsVersion, "4.0", StringComparison.OrdinalIgnoreCase)
- )
- {
- changedProject = DoRepairForAssetCompat() || changedProject;
- }
-
- // Remove any default fully qualified Code Analysis paths.
- // DevDiv bug 63415
- changedProject = FixCodeAnalysisPaths() || changedProject;
-
- if (hasFSharpSpecificConversions && !String.IsNullOrEmpty(oldToolsVersion))
- {
- // for Bug 609702:A ToolsVersion=12.0 F# project fails to load in VS 2012
- // for F# project after upgrade we restore previous value of ToolsVersion so Dev11 still can load upgraded project
- // however if old ToolsVersion as 3.5 - it will be upgraded to 4.0 to avoid any unexpected behavior in Dev10\Dev11
- xmakeProject.ToolsVersion = String.Equals(oldToolsVersion, "3.5", StringComparison.OrdinalIgnoreCase) ? "4.0" : oldToolsVersion;
- }
- else if (this.isMinorUpgrade ||
- (!changedProject &&
- !String.IsNullOrEmpty(oldToolsVersion) &&
- !String.Equals(oldToolsVersion, "3.5", StringComparison.OrdinalIgnoreCase))
- )
- {
- // If it's minor upgrade, or nothing changed and the project was already TV 4.0 or higher,
- // set the ToolsVersion back to its old value.
- xmakeProject.ToolsVersion = oldToolsVersion;
- }
- }
- else
- {
- // OK, we have to start with a fresh project and assemble it
- this.xmakeProject = ProjectRootElement.Create();
-
- // This root node must be a node.
- ProjectErrorUtilities.VerifyThrowInvalidProject(visualStudioProjectElement.Name ==
- VSProjectElements.visualStudioProject,
- visualStudioProjectElement.Location, "UnrecognizedElement", visualStudioProjectElement.Name);
-
- // Set the "DefaultTargets" attribute for the main project file.
- if (!isUserFile)
- {
- xmakeProject.DefaultTargets = XMakeProjectStrings.defaultTargets;
- }
-
- // Set the "ToolsVersion" attribute for the main project file.
- if (!isUserFile)
- {
- xmakeProject.ToolsVersion = XMakeProjectStrings.toolsVersion;
- }
-
- // Process the element in the source project file,
- // adding the necessary stuff to the XMake project.
- this.ProcessVisualStudioProjectElement(visualStudioProjectElement);
- }
- }
-
- ///
- /// returns 'false' if there was no repair required
- /// else does a repair and returns 'true'
- ///
- /// bool
- private bool DoRepairForAssetCompat()
- {
- var toRepairImports = RequiresRepairForAssetCompat();
-
- if (toRepairImports == null || toRepairImports.Count() == 0)
- {
- // no need to repair
- return false;
- }
-
- foreach (var toRepairImport in toRepairImports)
- {
- RepairImportForAssetCompat(toRepairImport);
- }
-
- //
- // Add PropertyGroup with Conditions right before where the Imports occur
- //
- // 10.0
- // $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- //
- //
- var vsToolsPathPropGroup = this.xmakeProject.CreatePropertyGroupElement();
- var firstAmongImports = this.xmakeProject.Imports.First();
- firstAmongImports.Parent.InsertBeforeChild(vsToolsPathPropGroup, firstAmongImports);
-
- var vsVersionProperty = this.xmakeProject.CreatePropertyElement(XMakeProjectStrings.visualStudioVersion);
- vsVersionProperty.Value = @"10.0";
- vsVersionProperty.Condition = @"'$(VisualStudioVersion)' == ''";
- vsToolsPathPropGroup.AppendChild(vsVersionProperty);
-
- var vsToolsPathProperty = this.xmakeProject.CreatePropertyElement(XMakeProjectStrings.vsToolsPath);
- vsToolsPathProperty.Value = @"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)";
- vsToolsPathProperty.Condition = @"'$(VSToolsPath)' == ''";
- vsToolsPathPropGroup.AppendChild(vsToolsPathProperty);
-
- //
- // Add a conditional import to Microsoft.Common.props at the beginning of project
- //
- //
- var newImportElement = this.xmakeProject.CreateImportElement(@"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props");
- newImportElement.Condition = @"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')";
- this.xmakeProject.InsertBeforeChild(newImportElement, this.xmakeProject.FirstChild);
-
- return true;
- }
-
- ///
- /// Repairs the given import element
- /// Change Import to use $(VSToolsPath), with Condition using $(VSToolsPath)
- /// e.g. From: Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets"
- /// To: Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false"
- /// Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets"
- /// $(VSToolsPath) will be defined elsewhere in this upgrade to be: $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
- ///
- ///
- private void RepairImportForAssetCompat(ProjectImportElement toRepairImport)
- {
- // We shouldn't have this happen but check anyway:
- ErrorUtilities.VerifyThrowInternalNull(toRepairImport, nameof(toRepairImport));
- ErrorUtilities.VerifyThrow(!toRepairImport.Condition.Equals("false", StringComparison.OrdinalIgnoreCase), "RepairImportForAssetCompat should not receive imports with condition=false already");
-
- var newImportElement = this.xmakeProject.CreateImportElement(toRepairImport.Project);
- newImportElement.Condition = "false";
- newImportElement.Project = XMakeProjectStrings.toRepairPatternForAssetCompatV10 + ExtractImportTargetsString(newImportElement.Project);
- toRepairImport.Parent.InsertAfterChild(newImportElement, toRepairImport);
-
- toRepairImport.Project = @"$(VSToolsPath)\" + ExtractImportTargetsString(toRepairImport.Project);
- toRepairImport.Condition = @"'$(VSToolsPath)' != ''";
- }
-
- ///
- /// Extracts the actual targets imported without the repair -pattern path
- /// e.g. from: $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets
- /// we will extract: WebApplications\Microsoft.WebApplication.targets
- ///
- ///
- ///
- private string ExtractImportTargetsString(string importProjectValue)
- {
- // For VS2005 Office Targets return: OfficeTools\Microsoft.VisualStudio.Tools.Office.targets
- if (importProjectValue.Equals(XMakeProjectStrings.officeTargetsVS2005Import, StringComparison.OrdinalIgnoreCase)
- || importProjectValue.Equals(XMakeProjectStrings.officeTargetsVS2005Import2, StringComparison.OrdinalIgnoreCase))
- {
- return XMakeProjectStrings.officeTargetsVS2005Repair;
- }
-
- string startString;
-
- if (importProjectValue.StartsWith(XMakeProjectStrings.toRepairPatternForAssetCompat, StringComparison.OrdinalIgnoreCase))
- {
- startString = XMakeProjectStrings.toRepairPatternForAssetCompat;
- }
- else
- {
- startString = XMakeProjectStrings.toRepairPatternForAssetCompatBeforeV10;
- }
-
- string result = importProjectValue.Remove(0, startString.Length);
-
- // Extract the version string
- Match m = Regex.Match(result, XMakeProjectStrings.repairHardCodedPathPattern);
-
- return result.Remove(0, m.Length);
- }
-
- ///
- /// Checks if repair is required
- ///
- /// bool
- private IEnumerable RequiresRepairForAssetCompat()
- {
- // check if the project has the to-repair pattern in the Imports
- // pattern: $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\
- var toRepairImports = from import in xmakeProject.Imports
- where HasRepairPattern(import)
- select import;
-
- return toRepairImports;
- }
-
- ///
- /// Check if the Import element has a repair pattern:
- /// $(MSBuildExtensionsPath)\Microsoft\VisualStudio\vX.X
- /// or $(MSBuildExtensionsPath)\Microsoft.VisualStudio.OfficeTools.targets
- ///
- ///
- ///
- private bool HasRepairPattern(ProjectImportElement importElement)
- {
- bool bHasRepairPattern = false;
-
- // in case of an already repaired project the repair pattern will exist with Condition="false"
- if (!String.Equals(importElement.Condition, "false", StringComparison.OrdinalIgnoreCase))
- {
- if ((importElement.Project.StartsWith(XMakeProjectStrings.toRepairPatternForAssetCompat, StringComparison.OrdinalIgnoreCase))
- || (importElement.Project.StartsWith(XMakeProjectStrings.toRepairPatternForAssetCompatBeforeV10, StringComparison.OrdinalIgnoreCase)))
- {
- string startString;
- if (importElement.Project.StartsWith(XMakeProjectStrings.toRepairPatternForAssetCompat, StringComparison.OrdinalIgnoreCase))
- {
- startString = XMakeProjectStrings.toRepairPatternForAssetCompat;
- }
- else
- {
- startString = XMakeProjectStrings.toRepairPatternForAssetCompatBeforeV10;
- }
-
- Match m = Regex.Match(importElement.Project.Substring(startString.Length), XMakeProjectStrings.repairHardCodedPathPattern);
-
- if (m.Success)
- {
- bHasRepairPattern = true;
- }
- }
- else
- {
- // Check for VS2003/2005 Office Targets
- // $(MSBuildExtensionsPath)\Microsoft.VisualStudio.OfficeTools.targets
- if (importElement.Project.Equals(XMakeProjectStrings.officeTargetsVS2005Import, StringComparison.OrdinalIgnoreCase)
- || importElement.Project.Equals(XMakeProjectStrings.officeTargetsVS2005Import2, StringComparison.OrdinalIgnoreCase))
- {
- bHasRepairPattern = true;
- }
- }
- }
-
- return bHasRepairPattern;
- }
-
- ///
- /// Fixes properties in the project file. This was the Orcas SP1 way of
- /// handling framework profiles, and that way is now incompatible with the VS 2010 way of handling
- /// profiles.
- ///
- /// true if changes were required, false otherwise
- private bool FixTargetFrameworkSubset()
- {
- bool changedProject = false;
-
- foreach (ProjectPropertyElement propertyElement in xmakeProject.Properties)
- {
- if (String.Equals(propertyElement.Name, XMakeProjectStrings.TargetFrameworkSubset, StringComparison.OrdinalIgnoreCase))
- {
- // For the Client profile, which was the only profile supported in Orcas SP1, we want to replace
- // with .
- if (String.Equals(propertyElement.Value, XMakeProjectStrings.ClientProfile, StringComparison.OrdinalIgnoreCase))
- {
- ProjectPropertyGroupElement parentGroup = (ProjectPropertyGroupElement)propertyElement.Parent;
- parentGroup.SetProperty(XMakeProjectStrings.TargetFrameworkProfile, XMakeProjectStrings.ClientProfile);
- changedProject = true;
- }
-
- // In all cases, is no longer supported. If it comes from the project
- // that we're converting, then we forcibly remove it. If it comes from some import... the user is
- // on their own.
- if (propertyElement.ContainingProject == xmakeProject)
- {
- propertyElement.Parent.RemoveChild(propertyElement);
- changedProject = true;
- }
-
- break;
- }
- }
-
- return changedProject;
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// Performs conversions specific to F# projects (VS2008 CTP -> VS2012) and (VS2010 -> VS2012).
- /// This involves: changing the location of FSharp targets,
- /// and for 2008CTP, adding explicit mscorlib and FSharp.Core references.
- ///
- /// if true, make the changes, otherwise, don't actually make any changes, but do report the return boolean as to whether you would make changes
- /// true if anything was (would be) changed, false otherwise
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- public bool FSharpSpecificConversions(bool actuallyMakeChanges)
- {
- // For FSharp projects, should import different location of FSharp targets
- const string fsharpFS10TargetsPath = @"$(MSBuildExtensionsPath)\FSharp\1.0\Microsoft.FSharp.Targets";
- const string fsharpFS10TargetsPath32 = @"$(MSBuildExtensionsPath32)\FSharp\1.0\Microsoft.FSharp.Targets";
- const string fsharpFS40TargetsPath = @"$(MSBuildExtensionsPath32)\..\Microsoft F#\v4.0\Microsoft.FSharp.Targets";
- const string fsharpFS45TargetsPath = @"$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets";
- const string fsharpPortableDev11TargetsPath = @"$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets";
-
- const string fsharpDev12PlusProperty = "FSharpTargetsPath";
-
- // Dev12+ projects import *.targets files using property
- const string fsharpDev12PlusImportsValue = @"$(" + fsharpDev12PlusProperty + ")";
- // Q: do we need to distinguish between different versions of F# for the same version of VS
- const string fsharpDev12PlusTargetsPath = @"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets";
- const string fsharpDev12PlusPortableTargetsPath = @"$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets";
-
- bool isAtLeastDev10Project = false;
-
- ProjectImportElement fsharpTargetsFS10Import = null;
- ProjectImportElement fsharpTargetsFS40Import = null;
- ProjectImportElement fsharpTargetsFS45Import = null;
- ProjectImportElement fsharpTargetsDev12PlusImport = null;
- ProjectImportElement fsharpTargetsDev11PortableImport = null;
-
- if (!actuallyMakeChanges && this.xmakeProject == null)
- {
- // when coming down the actuallyMakeChanges==false code path (from the F# project system's UpgradeProject_CheckOnly method), we may not have loaded the Xml yet, so do that now
- this.xmakeProject = ProjectRootElement.Open(oldProjectFile);
- }
-
- // local function: string equality check using OrdinalIgnoreCase comparison
- Func equals = (s1, s2) => String.Equals(s1, s2, StringComparison.OrdinalIgnoreCase);
-
- // local function: wraps specified string value into Exists('value')
- Func exists = s => string.Format(CultureInfo.InvariantCulture, "Exists('{0}')", s);
-
- // local function:
- // Creates property group element containing one property fsharpDev12PlusProperty with value 'path'.
- // If addCondition is true, property group will have Exists(path) condition
- Action appendPropertyGroupForDev12PlusTargetsPath =
- (path, parent) =>
- {
- var propGroup = xmakeProject.CreatePropertyGroupElement();
- parent.AppendChild(propGroup);
- var prop = xmakeProject.CreatePropertyElement(fsharpDev12PlusProperty);
- prop.Value = path;
- propGroup.AppendChild(prop);
- };
-
- foreach (ProjectImportElement importElement in xmakeProject.Imports)
- {
- if (equals(importElement.Project, fsharpFS10TargetsPath) || equals(importElement.Project, fsharpFS10TargetsPath32))
- {
- fsharpTargetsFS10Import = importElement;
- if (equals(@"!Exists('$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll')", fsharpTargetsFS10Import.Condition)
- || equals(@"!Exists('$(MSBuildBinPath)\Microsoft.Build.Tasks.v4.0.dll')", fsharpTargetsFS10Import.Condition))
- {
- isAtLeastDev10Project = true;
- }
- }
- else if (equals(importElement.Project, fsharpFS40TargetsPath))
- {
- fsharpTargetsFS40Import = importElement;
- isAtLeastDev10Project = true;
- }
- else if (equals(importElement.Project, fsharpFS45TargetsPath))
- {
- fsharpTargetsFS45Import = importElement;
- isAtLeastDev10Project = true;
- }
- else if (equals(importElement.Project, fsharpDev12PlusImportsValue))
- {
- fsharpTargetsDev12PlusImport = importElement;
- isAtLeastDev10Project = true;
- }
- else if (equals(importElement.Project, fsharpPortableDev11TargetsPath))
- {
- fsharpTargetsDev11PortableImport = importElement;
- isAtLeastDev10Project = true;
- }
- }
-
- if (fsharpTargetsDev12PlusImport != null)
- {
- // if project already contains version independent import - then assume it is already at least dev12 - do nothing
- return false;
- }
-
- // no other F# imports - do nothing
- if (fsharpTargetsFS10Import == null && fsharpTargetsFS40Import == null && fsharpTargetsFS45Import == null && fsharpTargetsDev11PortableImport == null)
- {
- return false;
- }
-
- if (!actuallyMakeChanges)
- {
- return true;
- }
-
- // both branches adds this elements to the project
- var chooseElement = xmakeProject.CreateChooseElement(); // (1)
-
- if (fsharpTargetsDev11PortableImport != null)
- {
- // Dev11 portable library
- // Expected fragment of the project file after upgrade
- //
- // (2)
- //
- // $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.Portable.FSharp.Targets
- //
- //
- // (3)
- //
- // $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.Portable.FSharp.Targets
- //
- //
- //
- //
- fsharpTargetsDev11PortableImport.Parent.InsertBeforeChild(chooseElement, fsharpTargetsDev11PortableImport);
-
- // portable libraries are supported since Dev11
- var whenVsVersionIsDev11 = xmakeProject.CreateWhenElement("'$(VisualStudioVersion)' == '11.0'"); // (2)
- chooseElement.AppendChild(whenVsVersionIsDev11);
-
- appendPropertyGroupForDev12PlusTargetsPath(fsharpPortableDev11TargetsPath, whenVsVersionIsDev11);
-
- var otherwiseIfVsVersionIsDev12Plus = xmakeProject.CreateOtherwiseElement(); // (3)
- chooseElement.AppendChild(otherwiseIfVsVersionIsDev12Plus);
-
- appendPropertyGroupForDev12PlusTargetsPath(fsharpDev12PlusPortableTargetsPath, otherwiseIfVsVersionIsDev12Plus);
- }
- else
- {
- // This is an FSharp project, and it does not already have a 4.5 import, and thus it needs repair.
- // one of these elements should be non-null, otherwise we'll exit based on the check above
- var someNonNullImportElement = fsharpTargetsFS10Import ?? fsharpTargetsFS40Import ?? fsharpTargetsFS45Import;
-
- someNonNullImportElement.Parent.InsertBeforeChild(chooseElement, someNonNullImportElement);
-
- // Expected fragment of the project file after upgrade
- //
- //
- //
- // $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets
- //
- //
- //
- //
- // $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets
- //
- //
- //
- //
-
- var whenVsVersionIsDev11 = xmakeProject.CreateWhenElement("'$(VisualStudioVersion)' == '11.0'");
- chooseElement.AppendChild(whenVsVersionIsDev11);
- {
- appendPropertyGroupForDev12PlusTargetsPath(fsharpFS45TargetsPath, whenVsVersionIsDev11);
- }
-
- var otherwiseIfVsVersionIsDev12Plus = xmakeProject.CreateOtherwiseElement();
- chooseElement.AppendChild(otherwiseIfVsVersionIsDev12Plus);
- {
- // Dev12+ projects - import target file based on property 'fsharpDev12PlusProperty'
- appendPropertyGroupForDev12PlusTargetsPath(fsharpDev12PlusTargetsPath, otherwiseIfVsVersionIsDev12Plus);
- }
- }
- // add Dev12 specific Imports element
- var dev12PlusImportElement = xmakeProject.CreateImportElement(fsharpDev12PlusImportsValue);
- dev12PlusImportElement.Condition = exists(fsharpDev12PlusImportsValue);
- chooseElement.Parent.InsertAfterChild(dev12PlusImportElement, chooseElement);
-
- if (fsharpTargetsFS10Import != null)
- {
- xmakeProject.RemoveChild(fsharpTargetsFS10Import);
- }
-
- if (fsharpTargetsFS40Import != null)
- {
- xmakeProject.RemoveChild(fsharpTargetsFS40Import);
- }
-
- if (fsharpTargetsFS45Import != null)
- {
- xmakeProject.RemoveChild(fsharpTargetsFS45Import);
- }
-
- if (fsharpTargetsDev11PortableImport != null)
- {
- xmakeProject.RemoveChild(fsharpTargetsDev11PortableImport);
- }
-
- const string ReferenceItemType = "Reference";
-
- // find ItemGroup for Reference items
- ProjectItemGroupElement referencesItemGroup = xmakeProject.Items
- .Where(projectItem => projectItem.ItemType == ReferenceItemType && projectItem.Parent is ProjectItemGroupElement)
- .Select(projectItem => (ProjectItemGroupElement)projectItem.Parent)
- .FirstOrDefault();
-
- if (referencesItemGroup == null)
- {
- referencesItemGroup = this.xmakeProject.AddItemGroup();
- }
-
- var targetFrameworkVersionProperty = xmakeProject.Properties.FirstOrDefault(p => equals(p.Name, "TargetFrameworkVersion"));
-
- // fix FSharp.Core reference
- const string TargetFSharpCoreVersionProperty = "TargetFSharpCoreVersion";
-
- // by default import with minimal possible version
- const string DefaultFSharpCoreVersionFor40 = "4.3.0.0";
- const string DefaultFSharpCoreVersionFor20 = "2.3.0.0";
- const string DefaultPortableFSharpCoreVersion = "2.3.5.0";
- const string FSharpCoreName = "FSharp.Core";
-
- if (!isAtLeastDev10Project)
- {
- bool hasMscorlibReference = xmakeProject.Items.Any(projectItem => projectItem.ItemType == ReferenceItemType && equals(projectItem.Include, "mscorlib"));
- // It appears pre-dev10, so add explicit references to mscorlib
- if (!hasMscorlibReference)
- {
- referencesItemGroup.AddItem(ReferenceItemType, "mscorlib");
- }
- }
-
- // try to find reference to FSharp.Core
- ProjectItemElement fsharpCoreItem = null;
- foreach (var item in xmakeProject.Items.Where(x => x.ItemType == ReferenceItemType))
- {
- try
- {
- var name = new AssemblyName(item.Include);
- if (name.Name == FSharpCoreName)
- {
- fsharpCoreItem = item;
- break;
- }
- }
- catch (FileLoadException)
- {
- // Include contains not AssemblyName but rather something else - not the case for F# projects
- }
- }
-
- const string Dev11PortableFSharpCoreLocation = @"$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\.NETPortable\FSharp.Core.dll";
- const string Dev12PortableFSharpCoreLocationForDev11Projects = @"$(MSBuildExtensionsPath32)\..\Reference Assemblies\Microsoft\FSharp\.NETPortable\$(" + TargetFSharpCoreVersionProperty + @")\FSharp.Core.dll";
- const string HintPath = "HintPath";
-
- ProjectItemElement newFSharpCoreItem = null;
- string targetFSharpCoreVersionValue = null;
-
- var hintPathValue = fsharpCoreItem?.Metadata.FirstOrDefault(metadata => metadata.Name == HintPath);
- if (hintPathValue != null)
- {
- if (equals(hintPathValue.Value, Dev11PortableFSharpCoreLocation))
- {
- // Reference to Dev11 portable library
- newFSharpCoreItem = referencesItemGroup.AddItem(ReferenceItemType, FSharpCoreName);
- newFSharpCoreItem.AddMetadata(HintPath, Dev12PortableFSharpCoreLocationForDev11Projects);
-
- targetFSharpCoreVersionValue = DefaultPortableFSharpCoreVersion;
- }
- }
- else if (!isAtLeastDev10Project || fsharpCoreItem != null)
- {
- newFSharpCoreItem = referencesItemGroup.AddItem(ReferenceItemType, string.Format("FSharp.Core, Version=$({0}), Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", TargetFSharpCoreVersionProperty));
- if (targetFrameworkVersionProperty == null || string.IsNullOrEmpty(targetFrameworkVersionProperty.Value) || !targetFrameworkVersionProperty.Value.StartsWith("v"))
- {
- targetFSharpCoreVersionValue = DefaultFSharpCoreVersionFor40;
- }
- else
- {
- var versionStr = targetFrameworkVersionProperty.Value.Substring(1); // strip 'v'
- Version version;
- targetFSharpCoreVersionValue =
- Version.TryParse(versionStr, out version)
- ? version.Major < 4 ? DefaultFSharpCoreVersionFor20 : DefaultFSharpCoreVersionFor40
- : DefaultFSharpCoreVersionFor40;
- }
- }
-
- newFSharpCoreItem?.AddMetadata("Private", "True");
-
- const string MinimumVisualStudioVersionProperty = "MinimumVisualStudioVersion";
- var hasMinimumVSVersion = xmakeProject.Properties.Any(prop => prop.Name == MinimumVisualStudioVersionProperty);
-
- foreach (var group in xmakeProject.PropertyGroups)
- {
- // find first non-conditional property group to add TargetFSharpCoreVersion property
- if (string.IsNullOrEmpty(group.Condition))
- {
- if (targetFSharpCoreVersionValue != null)
- {
- group.AddProperty(TargetFSharpCoreVersionProperty, targetFSharpCoreVersionValue);
- }
-
- if (!hasMinimumVSVersion)
- {
- var prop = group.AddProperty(MinimumVisualStudioVersionProperty, "11");
- prop.Condition = "'$(" + MinimumVisualStudioVersionProperty + ")' == ''";
- }
-
- break;
- }
- }
-
- // new FSharp.Core was added - can delete the old reference
- if (newFSharpCoreItem != null && fsharpCoreItem != null)
- {
- fsharpCoreItem.Parent.RemoveChild(fsharpCoreItem);
- }
-
- return true;
- }
-
- ///
- /// Performs conversions specific to VB projects (VS2008 and VS2008 -> VS2010).
- /// This involves: Adding a set of nowarn settings to disable warnings added
- /// in VS2010 that break customers upgrading from previous releases.
- ///
- /// true if changes were required, false otherwise
- private bool VBSpecificConversions()
- {
- // Are we upgrading a VB project?
- // We are if the project file imports:
- // "$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" (VS2008)
- // "$(MSBuildBinPath)\Microsoft.VisualBasic.targets" (VS2005)
-
- bool vbProject = false;
- bool changedProject = false;
-
- foreach (var import in xmakeProject.Imports)
- {
- if (String.Equals(import.Project, XMakeProjectStrings.vbTargetsVS2008, StringComparison.OrdinalIgnoreCase) ||
- String.Equals(import.Project, XMakeProjectStrings.vbTargetsVS2005, StringComparison.OrdinalIgnoreCase))
- {
- vbProject = true;
- break;
- }
- }
-
- // Not a VB project -> no work to do.
- if (!vbProject)
- {
- return changedProject;
- }
-
- // Any property group with a condition is of interest.
- // If we find it and it has "NoWarn" property, we add our warnings into it.
- // If it doesn't, we create new NoWarn property with the initial value
- foreach (var group in xmakeProject.PropertyGroups)
- {
- if (String.IsNullOrEmpty(group.Condition))
- {
- continue;
- }
-
- string noWarn = null;
- foreach (var property in group.Properties)
- {
- if (String.Equals(property.Name, XMakeProjectStrings.noWarn, StringComparison.OrdinalIgnoreCase))
- {
- noWarn = property.Value;
- break;
- }
- }
-
- if (String.IsNullOrWhiteSpace(noWarn))
- {
- noWarn = String.Empty;
- }
- else
- {
- noWarn = noWarn.Trim();
- }
-
- string originalNoWarnValue = noWarn;
- //
- // Split the no warning string and trim the results
- //
- string[] oldWarnings = noWarn.Split(',');
- for (var oi = 0; oi < oldWarnings.Length; oi++)
- {
- oldWarnings[oi] = oldWarnings[oi].Trim();
- }
-
- //
- // Add the new warnings specific to Dev10: 42353,42354,42355
- // (if we don't have them already)
- //
- string[] newWarnings = new[] { "42353", "42354", "42355" };
-
- foreach (var newWarn in newWarnings)
- {
- bool found = false;
- foreach (var oldWarn in oldWarnings)
- {
- if (String.Equals(newWarn, oldWarn, StringComparison.OrdinalIgnoreCase))
- {
- found = true;
- break;
- }
- }
-
- if (!found)
- {
- // append the new warning
- if (!String.IsNullOrEmpty(noWarn) && !noWarn.EndsWith(",", StringComparison.OrdinalIgnoreCase))
- {
- noWarn += ",";
- }
- noWarn += newWarn;
- }
- }
-
- // Set the property value. If it doesn't exist, it will be added.
- if (!String.Equals(originalNoWarnValue, noWarn, StringComparison.OrdinalIgnoreCase))
- {
- group.SetProperty(XMakeProjectStrings.noWarn, noWarn);
- changedProject = true;
- }
- }
-
- return changedProject;
- }
-
- ///
- /// This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// Microsoft.Build.Construction
- /// Microsoft.Build.Evaluation
- /// Microsoft.Build.Execution
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will simply create a new MSBuild Project object
- /// in memory, instead of trying to write it to disk.
- ///
- ///
- /// [!WARNING]
- /// > This method (and the whole namespace) is deprecated. Please use the classes in these namespaces instead:
- /// >
- /// >
- /// >
- /// ]]>
- ///
- public ProjectRootElement ConvertInMemory()
- {
- ConvertInMemoryToMSBuildProject();
-
- return xmakeProject;
- }
-
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will simply create a new MSBuild Project object
- /// in memory, instead of trying to write it to disk.
- ///
- ///
- /// rgoel
- [Obsolete("Use parameterless ConvertInMemory() method instead")]
- public OldProject ConvertInMemory
- (
- OldEngine engine
- )
- {
- return ConvertInMemory(engine, ProjectLoadSettings.None);
- }
-
- ///
- /// This is the entry point method, which performs the project file format
- /// conversion. This method will simply create a new MSBuild Project object
- /// in memory, instead of trying to write it to disk.
- ///
- ///
- /// rgoel
- [Obsolete("Use parameterless ConvertInMemory() method instead")]
- public OldProject ConvertInMemory
- (
- OldEngine engine,
- ProjectLoadSettings projectLoadSettings
- )
- {
- this.ConvertInMemoryToMSBuildProject();
-
- OldProject oldProject = new OldProject(engine);
-
- using (StringReader reader = new StringReader(xmakeProject.RawXml))
- {
- oldProject.Load(reader);
- }
-
- return oldProject;
- }
-
- ///
- /// Takes an XML element from an Everett project file, and loops through
- /// all its attributes. For each attribute, it adds a new XMake property
- /// to the destination project file in the property group passed in.
- ///
- /// RGoel
- private void AddXMakePropertiesFromXMLAttributes
- (
- ProjectPropertyGroupElement propertyGroup,
- XmlElement xmlElement
- )
- {
- error.VerifyThrow(propertyGroup != null, "Expected valid ProjectPropertyElementGroup to add properties to.");
-
- foreach (XmlAttribute xmlAttribute in xmlElement.Attributes)
- {
- // Add this as a property to the MSBuild project file. If the property is one of those
- // that contains an identifier or a path, we must escape it to treat it as a literal.
- string value = xmlAttribute.Value;
- if (this.propertiesToEscape.ContainsKey(xmlAttribute.Name))
- {
- value = ProjectCollection.Escape(value);
- }
-
- propertyGroup.AddProperty(xmlAttribute.Name, value);
- }
- }
-
- ///
- /// Processes the <VisualStudioProject> XML element, and everything
- /// within it. As it is doing this, it will add stuff to the xmakeProject.
- ///
- /// RGoel
- private void ProcessVisualStudioProjectElement
- (
- XmlElementWithLocation visualStudioProjectElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((visualStudioProjectElement?.Name == VSProjectElements.visualStudioProject),
- "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // This is just about better error reporting. Detect if the user tried
- // to convert a VC++ or some other type of project, and give a more friendly
- // error message.
- string projectType = visualStudioProjectElement.GetAttribute(VSProjectAttributes.projectType);
- ProjectErrorUtilities.VerifyThrowInvalidProject(string.IsNullOrEmpty(projectType),
- visualStudioProjectElement.Location, "ProjectTypeCannotBeConverted", projectType);
-
- // Make sure the tag doesn't have any attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!visualStudioProjectElement.HasAttributes,
- visualStudioProjectElement.Location, "NoAttributesExpected",
- VSProjectElements.visualStudioProject);
-
- bool languageFound = false;
-
- // Loop through all the direct children of the element.
- foreach (XmlNode visualStudioProjectChildNode in visualStudioProjectElement)
- {
- // Handle XML comments under the node (just ignore them)
- if ((visualStudioProjectChildNode.NodeType == XmlNodeType.Comment) ||
- (visualStudioProjectChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (visualStudioProjectChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation visualStudioProjectChildElement = (XmlElementWithLocation)visualStudioProjectChildNode;
-
- switch (visualStudioProjectChildElement.Name)
- {
- // See if we have a , , or element.
- case VSProjectElements.cSharp:
- case VSProjectElements.visualJSharp:
- case VSProjectElements.visualBasic:
- case VSProjectElements.ECSharp:
- case VSProjectElements.EVisualBasic:
- // Make sure this is the first language node we're encountering.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!languageFound, visualStudioProjectChildElement.Location,
- "MultipleLanguageNodesNotAllowed", VSProjectElements.visualStudioProject);
-
- languageFound = true;
- this.language = visualStudioProjectChildNode.Name;
- this.ProcessLanguageElement((XmlElementWithLocation)visualStudioProjectChildElement);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, visualStudioProjectChildElement.Location,
- "UnrecognizedChildElement", visualStudioProjectChildElement.Name,
- VSProjectElements.visualStudioProject);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(visualStudioProjectChildNode.Name, visualStudioProjectElement.Name, visualStudioProjectElement.Location);
- }
- }
- }
-
- ///
- /// Processes the language (e.g. <CSHARP>) XML element, and everything
- /// within it. As it is doing this, it will add stuff to the xmakeProject.
- ///
- /// RGoel
- private void ProcessLanguageElement
- (
- XmlElementWithLocation languageElement
- )
- {
- // Make sure we have a valid XML element to process.
- error.VerifyThrow(languageElement != null, "Expected valid XML language element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // Get the project instance GUID for this project file. It is required for
- // the main project file, but not for the .USER file.
- this.projectGuid = languageElement.GetAttribute(VSProjectAttributes.projectGuid);
- ProjectErrorUtilities.VerifyThrowInvalidProject((this.projectGuid != null) || (this.isUserFile),
- languageElement.Location, "MissingAttribute", languageElement.Name, VSProjectAttributes.projectGuid);
-
- // Get the project type for this project file. We only support "Local". We do not
- // convert web projects -- that's Venus's job.
- string projectType = languageElement.GetAttribute(VSProjectAttributes.projectType);
- ProjectErrorUtilities.VerifyThrowInvalidProject(string.IsNullOrEmpty(projectType) ||
- (String.Compare(projectType, VSProjectAttributes.local, StringComparison.OrdinalIgnoreCase) == 0),
- languageElement.Location, "ProjectTypeCannotBeConverted", projectType);
-
- // All of the attributes on the language tag get converted to XMake
- // properties. A couple exceptions ... for the "ProductVersion"
- // and "SchemaVersion" properties, we don't just copy the previous
- // value; we actually set it to 8.0.##### and 2.0 respectively.
- // In addition, we also add a default value for the "Configuration"
- // property. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // ...
- // ...
- // ...
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // Local
- // 8.0.31031
- // 2.0
- // {71F4C768-901B-4027-BD9D-378665D6C0B2}
- // Debug
- //
- // -----------------------------------------------------------------------
- // For Dev11, we are removing "ProductVersion" and "SchemaVersion" from all
- // project templates. Thus, eliminated writing these tags from this method.
- // -----------------------------------------------------------------------
-
- string originalMyType = languageElement.GetAttribute(XMakeProjectStrings.myType);
- if (!string.IsNullOrEmpty(originalMyType))
- {
- // Flag the fact that the Everett project already had a MyType property in there,
- // so we don't try to override it later.
- this.isMyTypeAlreadySetInOriginalProject = true;
- }
-
- // Copy over all the other properties.
- this.globalPropertyGroup = xmakeProject.AddPropertyGroup();
- this.AddXMakePropertiesFromXMLAttributes(this.globalPropertyGroup, languageElement);
-
- // Add the "Configuration" property. Put a condition on it so it only gets
- // set to the default if the user doesn't have an environment variable called
- // "Configuration". The final XML looks something like this:
- // Debug
- ProjectPropertyElement configurationProperty = this.globalPropertyGroup.AddProperty(
- XMakeProjectStrings.configuration, XMakeProjectStrings.defaultConfiguration);
- configurationProperty.Condition = XMakeProjectStrings.configurationPrefix +
- XMakeProjectStrings.configurationSuffix;
-
- // Add the "Platform" property. Put a condition on it so it only gets
- // set to the default if the user doesn't have an environment variable called
- // "Platform". The final XML looks something like this:
- //
- // Platform of course depends on the language we are dealing with - J# in whidbey supports only x86
- string platform = (this.language != VSProjectElements.visualJSharp)
- ? XMakeProjectStrings.defaultPlatform
- : XMakeProjectStrings.x86Platform;
- ProjectPropertyElement platformProperty = this.globalPropertyGroup.AddProperty(
- XMakeProjectStrings.platform, platform);
- platformProperty.Condition = XMakeProjectStrings.platformPrefix +
- XMakeProjectStrings.platformSuffix;
-
- bool isTriumphProject = false;
-
- // For SDE projects, we need to add a special property to
- // the project file. This will contain the project types for both the
- // flavor and the main language project type. In addition, SDE projects
- // need to have the host process disabled.
- if (!this.isUserFile)
- {
- if (languageElement.Name == VSProjectElements.ECSharp)
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.projectTypeGuids,
- "{" +
- XMakeProjectStrings.VSDCSProjectTypeGuid +
- "};{" +
- XMakeProjectStrings.cSharpGuid +
- "}");
- string visualStudioProjectExtensions = GetProjectExtensionsString(XMakeProjectStrings.visualStudio);
- visualStudioProjectExtensions += XMakeProjectStrings.disableCSHostProc;
- SetProjectExtensionsString(XMakeProjectStrings.visualStudio, visualStudioProjectExtensions);
- }
- else if (languageElement.Name == VSProjectElements.EVisualBasic)
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.projectTypeGuids,
- "{" +
- XMakeProjectStrings.VSDVBProjectTypeGuid +
- "};{" +
- XMakeProjectStrings.visualBasicGuid +
- "}");
- string visualStudioProjectExtensions = GetProjectExtensionsString(XMakeProjectStrings.visualStudio);
- visualStudioProjectExtensions += XMakeProjectStrings.disableVBHostProc;
- SetProjectExtensionsString(XMakeProjectStrings.visualStudio, visualStudioProjectExtensions);
- }
- }
-
- // Loop through all the direct child elements of the language element.
- foreach (XmlNode languageChildNode in languageElement)
- {
- // Handle XML comments under the the language node (just ignore them).
- if ((languageChildNode.NodeType == XmlNodeType.Comment) ||
- (languageChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (languageChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation languageChildElement = (XmlElementWithLocation)languageChildNode;
-
- switch (languageChildElement.Name)
- {
- // The element.
- case VSProjectElements.build:
- this.ProcessBuildElement((XmlElementWithLocation)languageChildElement);
- break;
-
- case VSProjectElements.files:
- this.ProcessFilesElement((XmlElementWithLocation)languageChildElement);
- break;
-
- case VSProjectElements.startupServices:
- this.ProcessStartupServicesElement((XmlElementWithLocation)languageChildElement);
- break;
-
- case VSProjectElements.userProperties:
- this.ProcessUserPropertiesElement((XmlElementWithLocation)languageChildElement, out isTriumphProject);
- break;
-
- case VSProjectElements.otherProjectSettings:
- this.ProcessOtherProjectSettingsElement((XmlElementWithLocation)languageChildElement);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, languageChildElement.Location,
- "UnrecognizedChildElement", languageChildNode.Name,
- languageElement.Name);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(languageChildNode.Name, languageElement.Name, languageElement.Location);
- }
- }
-
- AddFinalPropertiesAndImports(languageElement, isTriumphProject);
- }
-
- ///
- /// Adds any last-minute additional properties such as FileUpgradeFlags and MyType,
- /// and also adds in the necessary Import tags.
- ///
- ///
- ///
- private void AddFinalPropertiesAndImports(XmlElementWithLocation languageElement, bool isTriumphProject)
- {
- // For the main project file only, add a line at the end of the new XMake
- // project file to import the appropriate .TARGETS file.
- if (!this.isUserFile)
- {
- // We set a property called "FileUpgradeFlags", so that for command-line conversions,
- // if this project is ever loaded into the IDE, the file upgrade (.VB code, etc.) will kick in.
- // The "20" means SxS upgrade. For IDE conversions, the project system will itself set
- // this property immediately after the MSBuild conversion returns, so this value will
- // be overwritten.
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.fileUpgradeFlags, "20");
-
- // VisualBasic projects need MyType set.
- if
- (
- (
- (this.language == VSProjectElements.visualBasic) ||
- (
- (this.language == VSProjectElements.EVisualBasic) &&
- (this.frameworkVersionForVSD == XMakeProjectStrings.vTwo)
- )
- ) &&
- (!this.isMyTypeAlreadySetInOriginalProject) &&
- !isTriumphProject // Doesn't apply to Triumph->Trinity conversions.
- )
- {
- if (!string.IsNullOrEmpty(this.outputType))
- {
- if (String.Equals(this.outputType, XMakeProjectStrings.winExe, StringComparison.OrdinalIgnoreCase))
- {
- if (this.hasWindowsFormsReference)
- {
- // Only applies if there's a System.Windows.Forms reference.
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.myType, XMakeProjectStrings.windowsFormsWithCustomSubMain);
- }
- else
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.myType, XMakeProjectStrings.console);
- }
- }
- else if (String.Equals(this.outputType, XMakeProjectStrings.exe, StringComparison.OrdinalIgnoreCase))
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.myType, XMakeProjectStrings.console);
- }
- else if (String.Equals(this.outputType, XMakeProjectStrings.library, StringComparison.OrdinalIgnoreCase))
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.myType, XMakeProjectStrings.windows);
- }
- }
- }
- else if (this.language == VSProjectElements.EVisualBasic)
- {
- // For Devices, we always want a MyType of "Empty," as projects
- // are converted into v1 .NETCF, which doesn't support My.NET
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.myType, XMakeProjectStrings.empty);
- }
-
- // We need to handle the SDE scenarios for C# and VB
- if (languageElement.Name == VSProjectElements.ECSharp)
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.SDECSTargets);
- }
- else if (languageElement.Name == VSProjectElements.EVisualBasic)
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.SDEVBTargets);
- }
- else if (languageElement.Name == VSProjectElements.cSharp)
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.targetsFilenamePrefix + XMakeProjectStrings.csharpTargets + XMakeProjectStrings.importSuffix);
- }
- else if (languageElement.Name == VSProjectElements.visualBasic)
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.targetsFilenamePrefix + XMakeProjectStrings.visualBasicTargets + XMakeProjectStrings.importSuffix);
- }
- else if (languageElement.Name == VSProjectElements.visualJSharp)
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.targetsFilenamePrefix + XMakeProjectStrings.visualJSharpTargets + XMakeProjectStrings.importSuffix);
- }
- else
- {
- xmakeProject.AddImport(XMakeProjectStrings.importPrefix + XMakeProjectStrings.targetsFilenamePrefix + languageElement.Name + XMakeProjectStrings.importSuffix);
- }
-
- // [ancrider] VSTO project migration will handle the import target changes.
- //if (isTriumphProject)
- //{
- // xmakeProject.AddImport(XMakeProjectStrings.triumphImport, null);
- //}
-
- // Also add the PreBuildEvent and PostBuildEvent properties to the end
- // of the project file. The reason is that they can contain embedded
- // macros that are defined in the .TARGETS file that was imported
- // above.
- if ((this.preBuildEvent != null) || (this.postBuildEvent != null))
- {
- // In this case, we specifically need the property group at the end, so we can't just call AddPropertyGroup(..),
- // but instead must do it ourselves
- ProjectPropertyGroupElement preAndPostBuildEvents = xmakeProject.CreatePropertyGroupElement();
- xmakeProject.AppendChild(preAndPostBuildEvents);
-
- // Add the "PreBuildEvent" property.
- if (this.preBuildEvent != null)
- {
- // We must escape the percent-sign in order to handle cases like
- // "echo %DEBUGGER%". We don't want MSBuild to treat the "%DE" as
- // an escaped character.
- preAndPostBuildEvents.AddProperty(VSProjectAttributes.preBuildEvent,
- this.preBuildEvent.Replace("%", "%25"));
- }
-
- // Add the "PostBuildEvent" property.
- if (this.postBuildEvent != null)
- {
- // We must escape the percent-sign in order to handle cases like
- // "echo %DEBUGGER%". We don't want MSBuild to treat the "%DE" as
- // an escaped character.
- preAndPostBuildEvents.AddProperty(VSProjectAttributes.postBuildEvent,
- this.postBuildEvent.Replace("%", "%25"));
- }
- }
- }
- }
-
- ///
- /// Processes the <Build> element, and everything within it. As it is
- /// doing this, it will add stuff to the xmakeProject.
- ///
- /// RGoel
- private void ProcessBuildElement
- (
- XmlElementWithLocation buildElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((buildElement?.Name == VSProjectElements.build), "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // Make sure the caller has given us a valid globalPropertyGroup object.
- error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup.");
-
- // The element should not have any attributes on it.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!buildElement.HasAttributes, buildElement.Location,
- "NoAttributesExpected", VSProjectElements.build);
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode buildChildNode in buildElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((buildChildNode.NodeType == XmlNodeType.Comment) ||
- (buildChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (buildChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation buildChildElement = (XmlElementWithLocation)buildChildNode;
- switch (buildChildElement.Name)
- {
- // The element.
- case VSProjectElements.settings:
- this.ProcessSettingsElement((XmlElementWithLocation)buildChildElement);
- break;
-
- // The element.
- case VSProjectElements.references:
- this.ProcessReferencesElement((XmlElementWithLocation)buildChildElement);
- break;
-
- // The element.
- case VSProjectElements.imports:
- this.ProcessImportsElement((XmlElementWithLocation)buildChildElement);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, buildChildElement.Location,
- "UnrecognizedChildElement", buildChildNode.Name,
- VSProjectElements.build);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(buildChildNode.Name, buildElement.Name, buildElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Settings> element, and everything within it. As it is
- /// doing this, it will add stuff to the xmakeProject.
- ///
- /// RGoel
- private void ProcessSettingsElement
- (
- XmlElementWithLocation settingsElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((settingsElement?.Name == VSProjectElements.settings),
- "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // Make sure the caller has given us a valid globalPropertyGroup object.
- error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup.");
-
- // All of the attributes on the tag get converted to XMake
- // properties, except for PreBuildEvent and PostBuildEvent. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // ...
- // ...
- // ...
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- //
- //
- // XMakeBuildEngine
- //
- // JScript
- // Grid
- // IE50
- // false
- // Library
- // XMakeBuildEngine
- // OnBuildSuccess
- //
- //
- // -----------------------------------------------------------------------
-
- // The "PreBuildEvent" and "PostBuildEvent" properties need to be handled
- // specially. These can contain references to predefined macros, such
- // as "$(ProjectDir)". But these get defined in Microsoft.CSharp.targets, so the
- // "PreBuildEvent" and "PostBuildEvent" properties need to get added to
- // the project file *after* the for Microsoft.CSharp.targets. For now,
- // just save the values of these two properties.
- this.preBuildEvent = settingsElement.GetAttribute(VSProjectAttributes.preBuildEvent);
- settingsElement.RemoveAttribute(VSProjectAttributes.preBuildEvent);
- this.postBuildEvent = settingsElement.GetAttribute(VSProjectAttributes.postBuildEvent);
- settingsElement.RemoveAttribute(VSProjectAttributes.postBuildEvent);
-
- // cache the assembly name in case its needed to upgrade the
- // documentation file property)
- this.assemblyName = settingsElement.GetAttribute(VSProjectAttributes.assemblyName);
-
- // cache the output type.
- this.outputType = settingsElement.GetAttribute(XMakeProjectStrings.outputType);
-
- // Take care of copying all the other normal properties.
- this.AddXMakePropertiesFromXMLAttributes(this.globalPropertyGroup, settingsElement);
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode settingsChildNode in settingsElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((settingsChildNode.NodeType == XmlNodeType.Comment) ||
- (settingsChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (settingsChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation settingsChildElement = (XmlElementWithLocation)settingsChildNode;
- switch (settingsChildElement.Name)
- {
- // The element.
- case VSProjectElements.config:
- this.ProcessConfigElement(settingsChildElement);
- break;
-
- // In the case of a VSD project, the element
- case VSProjectElements.platform:
- this.ProcessPlatformElement(settingsChildElement);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, settingsChildElement.Location,
- "UnrecognizedChildElement", settingsChildElement.Name,
- VSProjectElements.settings);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(settingsChildNode.Name, settingsElement.Name, settingsElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Config> element, and everything within it. As it is
- /// doing this, it will add stuff to the xmakeProject, including new
- /// configuration-specific property groups.
- ///
- /// RGoel
- private void ProcessConfigElement
- (
- XmlElementWithLocation configElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((configElement?.Name == VSProjectElements.config),
- "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // All of the attributes on the tag get converted to XMake
- // properties, except for the "Name" attribute which becomes part of
- // the "Condition" on the . For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // false
- // 285212672
- // false
- //
- // DEBUG;TRACE
- //
- // true
- // 4096
- // false
- //
- // false
- // bin\Debug\
- // false
- // false
- // true
- // 4
- //
- // -----------------------------------------------------------------------
-
- // Get the "Name" attribute of the element.
- string configName = configElement.GetAttribute(VSProjectAttributes.name);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(configName),
- configElement.Location, "MissingAttribute", VSProjectElements.config, VSProjectAttributes.name);
-
- // In the case of VSD projects, the "Name" attribute will have a pipe in it,
- // followed by the device platform. This last part needs to be removed,
- // leaving just the config name.
- if ((this.language == VSProjectElements.ECSharp) ||
- (this.language == VSProjectElements.EVisualBasic))
- {
- int pipeLocation = configName.IndexOf('|');
- if (pipeLocation != -1)
- {
- configName = configName.Remove(pipeLocation,
- configName.Length - pipeLocation);
- }
- }
-
- // Remove the "Name" attribute from the element, so it doesn't get
- // added as an XMake property.
- configElement.RemoveAttribute(VSProjectAttributes.name);
-
- // PPD@31111: J# Only: We need to remove the AdditionalOptions attribute
- // (and note it down) before we create the property group out of the configElement
- string additionalOptionsValue = null;
- if (VSProjectElements.visualJSharp == this.language)
- {
- additionalOptionsValue = configElement.GetAttribute(VSProjectAttributes.additionalOptions);
- // Dont bother about getting a null value for additionalOptionsValue
- // GetAttribute return String.Empty if the attribute is not present
- configElement.RemoveAttribute(VSProjectAttributes.additionalOptions);
- }
-
- // Create a new property group, and add all of the XML attributes as XMake
- // properties.
- ProjectPropertyGroupElement configPropertyGroup = xmakeProject.AddPropertyGroup();
-
- // Process OutputPath attribute separately to ensure it contains trailing backslash
- string outputPath = configElement.GetAttribute(VSProjectAttributes.outputPath);
- if (!string.IsNullOrEmpty(outputPath))
- {
- if (outputPath[outputPath.Length - 1] != Path.DirectorySeparatorChar)
- {
- outputPath += Path.DirectorySeparatorChar;
- }
-
- configElement.RemoveAttribute(VSProjectAttributes.outputPath);
- configPropertyGroup.AddProperty(VSProjectAttributes.outputPath, ProjectCollection.Escape(outputPath));
- }
-
- // If the "SelectedDevice" or "DeploymentPlatform" attributes exist in the per-user
- // project file, we should get rid of them.
- string selectedDevice = configElement.GetAttribute(VSProjectAttributes.selectedDevice);
- if (isUserFile && (selectedDevice?.Length > 0))
- {
- configElement.RemoveAttribute(VSProjectAttributes.selectedDevice);
- }
-
- string deploymentPlatform = configElement.GetAttribute(VSProjectAttributes.deploymentPlatform);
- if (isUserFile && (deploymentPlatform?.Length > 0))
- {
- configElement.RemoveAttribute(VSProjectAttributes.deploymentPlatform);
- }
-
- // Get rid of the "IncrementalBuild" attribute
- string incrementalBuild = configElement.GetAttribute(VSProjectAttributes.incrementalBuild);
- if (!string.IsNullOrEmpty(incrementalBuild))
- {
- configElement.RemoveAttribute(VSProjectAttributes.incrementalBuild);
- }
-
- // VSWhidbey bug 261464. For VB projects migrated from VS7/Everett, the VB team would
- // like to enable XML documentation by default (this feature was unavailable to VB users
- // in VS7/Everett. To enable for VB, set the DocumentationFile property to .xml
- if ((!this.isUserFile) && (VSProjectElements.visualBasic == this.language))
- {
- string documentationFile = this.assemblyName + XMakeProjectStrings.xmlFileExtension;
- configPropertyGroup.AddProperty(VSProjectAttributes.documentationFile, ProjectCollection.Escape(documentationFile));
- }
-
- // process the rest of Config attributes
- this.AddXMakePropertiesFromXMLAttributes(configPropertyGroup, configElement);
-
- // PPD@31111: J# Only: We now need to parse the additionalOptionsValue for properties and
- // add the individual properties to configPropertyGroup.
- // This needs to be done after the AddXMakePropertiesFromXMLAttributes call above since
- // an property defined in the AdditionalOptions takes precedence.
- if (VSProjectElements.visualJSharp == this.language)
- {
- AdditionalOptionsParser addnlOptParser = new AdditionalOptionsParser();
- addnlOptParser.ProcessAdditionalOptions(additionalOptionsValue, configPropertyGroup);
- }
-
- // VSWhidbey bug 302946. For VB projects migrated from VS7/Everett, the VB team would
- // like to disable the following new warnings for Whidbey: 42016,42017,42018,42019,42032
- // New projects created in Whidbey already have these warnings disabled by default.
- if ((!this.isUserFile) && (VSProjectElements.visualBasic == this.language))
- {
- configPropertyGroup.AddProperty(XMakeProjectStrings.noWarn, XMakeProjectStrings.disabledVBWarnings);
- }
-
- // VSWhidbey bug 472064. For all projects that are converted, if "DebugSymbols" is set for a
- // particular platform/configuration, we set a "DebugType" property if and only if "DebugType" property
- // is not already there. DebugType is set to "full" for DebugSymbols=true, DebugType is set to "none"
- // if DebugSymbols=false, and we don't do anything if DebugSymbols is not present in the source project.
- if (!this.isUserFile)
- {
- string debugType = configElement.GetAttribute(VSProjectAttributes.debugType);
- if (String.IsNullOrEmpty(debugType))
- {
- string debugSymbols = configElement.GetAttribute(XMakeProjectStrings.debugSymbols);
- if (String.Equals(debugSymbols, "true", StringComparison.OrdinalIgnoreCase))
- {
- configPropertyGroup.AddProperty(VSProjectAttributes.debugType, VSProjectAttributes.debugTypeFull);
- }
- else if (String.Equals(debugSymbols, "false", StringComparison.OrdinalIgnoreCase))
- {
- configPropertyGroup.AddProperty(VSProjectAttributes.debugType, VSProjectAttributes.debugTypeNone);
- }
- }
- }
-
- // VSWhidbey bug 472064. For all VC# projects that are converted, we add an ErrorReport
- // property, always set to "prompt"
- if (!this.isUserFile && this.language == VSProjectElements.cSharp)
- {
- configPropertyGroup.AddProperty(VSProjectAttributes.errorReport, VSProjectAttributes.errorReportPrompt);
- }
-
- // Platform of course depends on the language we are dealing with - J# in whidbey supports only x86
- string platform = (this.language != VSProjectElements.visualJSharp)
- ? XMakeProjectStrings.defaultPlatform
- : XMakeProjectStrings.x86Platform;
-
- // Add the "Condition" to the new .
- configPropertyGroup.Condition = XMakeProjectStrings.configplatformPrefix +
- ProjectCollection.Escape(configName) + XMakeProjectStrings.configplatformSeparator +
- ProjectCollection.Escape(platform) + XMakeProjectStrings.configplatformSuffix;
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode configChildNode in configElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((configChildNode.NodeType == XmlNodeType.Comment) ||
- (configChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (configChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation configChildElement = (XmlElementWithLocation)configChildNode;
- switch (configChildElement.Name)
- {
- // The element.
- case VSProjectElements.interopRegistration:
- this.ProcessInteropRegistrationElement((XmlElementWithLocation)configChildElement, configPropertyGroup);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, configChildElement.Location,
- "UnrecognizedChildElement", configChildElement.Name,
- VSProjectElements.config);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(configChildNode.Name, configElement.Name, configElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Platform> element, and everything within it. As it is
- /// doing this, it will add stuff to the xmakeProject, including new
- /// configuration-specific property groups.
- ///
- /// BCham
- private void ProcessPlatformElement
- (
- XmlElementWithLocation platformElement
- )
- {
- if (!IsUserFile)
- {
- // Make sure this is the element.
- error.VerifyThrow((platformElement?.Name == VSProjectElements.platform),
- "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // The platform listed in the element will be the platform
- // used for the Whidbey project.
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- //
- //
- //
- // -----------------------------------------------------------------------
-
- // Get the "Name" attribute of the element.
- platformForVSD = platformElement.GetAttribute(VSProjectAttributes.name);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(platformForVSD),
- platformElement.Location, "MissingAttribute", VSProjectElements.platform, VSProjectAttributes.name);
-
- // Create a new property group, and add all of the XML attributes as XMake
- // properties.
- ProjectPropertyGroupElement platformPropertyGroup = xmakeProject.AddPropertyGroup();
-
- string platformID;
- string platformFamily;
-
- frameworkVersionForVSD = XMakeProjectStrings.vOne;
-
- switch (platformForVSD)
- {
- case VSProjectElements.PocketPC:
- platformID = "3C41C503-53EF-4c2a-8DD4-A8217CAD115E";
- platformFamily = "PocketPC";
- break;
-
- case VSProjectElements.Smartphone:
- platformID = "4DE813A2-67E0-4a00-945C-3188240A8243";
- platformFamily = "Smartphone";
- break;
-
- case VSProjectElements.WindowsCE:
- default:
-
- // If we're dealing with a platform other than the three that Everett ships with, we'll assign it as Windows CE
-
- platformID = "E2BECB1F-8C8C-41ba-B736-9BE7D946A398";
- platformFamily = "WindowsCE";
-
- // We don't ship with a v1.0 WindowsCE platform. Default to v2.0 instead.
-
- frameworkVersionForVSD = XMakeProjectStrings.vTwo;
- break;
- }
-
- // Add the properties for PlatformID and PlatformFamilyName
-
- platformPropertyGroup.AddProperty(XMakeProjectStrings.platformID, platformID);
- platformPropertyGroup.AddProperty(XMakeProjectStrings.platformFamilyName, platformFamily);
-
- // Since we're here, we know this is a VSD project. Therefore, let's
- // add a property for the deployment target path. Note, we only need a suffix.
- // The prefix will be defaulted to based on the selected device.
-
- platformPropertyGroup.AddProperty(XMakeProjectStrings.deployTargetSuffix, "$(AssemblyName)");
-
- // And, we should also set the Target Framework version. For
- // VSD projects, we want to stay with v1.0
-
- platformPropertyGroup.AddProperty(XMakeProjectStrings.TargetFrameworkVersion, frameworkVersionForVSD);
- }
- }
-
- ///
- /// Processes the <InteropRegistration> element, and everything within it.
- /// As it is doing this, it will add extra properties to the configuration's
- /// property group.
- ///
- /// RGoel
- private void ProcessInteropRegistrationElement
- (
- XmlElementWithLocation interopRegistrationElement,
- ProjectPropertyGroupElement configPropertyGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((interopRegistrationElement?.Name == VSProjectElements.interopRegistration),
- "Expected element.");
-
- // Make sure we've been given a valid configuration property group.
- error.VerifyThrow(configPropertyGroup != null,
- "Expected configuration's property group.");
-
- // All of the attributes on the tag get converted to XMake
- // properties. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // ...
- // ...
- // >
- //
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // ...
- // ...
- // ...
- // ...
- // ...
- // true
- // Project1.dll
- // Project1.tlb
- //
- // -----------------------------------------------------------------------
- this.AddXMakePropertiesFromXMLAttributes(configPropertyGroup, interopRegistrationElement);
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(interopRegistrationElement);
- }
-
- ///
- /// Processes the <References> element, and everything within it. As it is
- /// doing this, it will add reference items to a new ProjectItemGroupElement.
- ///
- /// RGoel
- private void ProcessReferencesElement
- (
- XmlElementWithLocation referencesElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((referencesElement?.Name == VSProjectElements.references),
- "Expected element.");
-
- // Make sure the caller has given us a valid xmakeProject object.
- error.VerifyThrow(xmakeProject != null, "Expected valid XMake project object.");
-
- // The tag should have no attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!referencesElement.HasAttributes, referencesElement.Location,
- "NoAttributesExpected", VSProjectElements.references);
-
- // Before we begin processing the individual references, let's make sure
- // we have an SLN file, so we can go look up the project-to-project references.
- // If the caller has not provided us with an SLN file, or if the SLN provided
- // doesn't actually exist on disk yet (which can happen in VS IDE scenarios because
- // the SLN is only in-memory and hasn't been saved yet), then we search for the
- // SLN using a heuristic.
- if (this.solutionFile == null || !File.Exists(this.solutionFile))
- {
- this.solutionFile = null;
- this.SearchForSolutionFile();
- }
- else
- {
- // We've been given a valid SLN file that exists on disk, so just parse
- // it.
- this.solution = new SolutionFile();
- this.solution.FullPath = this.solutionFile;
- this.solution.ParseSolutionFileForConversion();
- this.conversionWarnings.AddRange(this.solution.SolutionParserWarnings);
- }
-
- ProjectItemGroupElement referencesItemGroup = null;
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode referencesChildNode in referencesElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((referencesChildNode.NodeType == XmlNodeType.Comment) ||
- (referencesChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (referencesChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation referencesChildElement = (XmlElementWithLocation)referencesChildNode;
- switch (referencesChildElement.Name)
- {
- // The element.
- case VSProjectElements.reference:
- if (referencesItemGroup == null)
- {
- referencesItemGroup = xmakeProject.AddItemGroup();
- }
-
- this.ProcessReferenceElement(referencesChildElement, referencesItemGroup);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, referencesChildElement.Location,
- "UnrecognizedChildElement", referencesChildElement.Name,
- VSProjectElements.references);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(referencesChildNode.Name, referencesElement.Name, referencesElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Reference> element, and add an appropriate reference
- /// items to the referencesItemGroup.
- ///
- /// RGoel
- private void ProcessReferenceElement
- (
- XmlElementWithLocation referenceElement,
- ProjectItemGroupElement referencesItemGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((referenceElement?.Name == VSProjectElements.reference),
- "Expected element.");
-
- // Make sure the caller has already created an ProjectItemGroupElement for us to
- // put the new items in.
- error.VerifyThrow(referencesItemGroup != null, "Received null ProjectItemGroupElement");
-
- // Before we do anything else, look for the "Platform" attribute.
- // If it's available, we need to remove it, and if it ends in
- // "-Designer", we need to disregard this reference entirely.
-
- string platform = referenceElement.GetAttribute(VSProjectAttributes.platform);
- if (!string.IsNullOrEmpty(platform))
- {
- if (platform.IndexOf("-Designer", 0, platform.Length, StringComparison.Ordinal) != -1)
- {
- return;
- }
-
- referenceElement.RemoveAttribute(VSProjectAttributes.platform);
- }
-
- ProjectItemElement newReferenceItem;
-
- // Get the "Name" attribute. This is a required attribute in the VS7/
- // Everett format.
- string referenceName = referenceElement.GetAttribute(VSProjectAttributes.name);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(referenceName),
- referenceElement.Location, "MissingAttribute", VSProjectAttributes.name, VSProjectElements.reference);
-
- // Before we go any further, we must special-case some assemblies for VSD projects.
-
- if ((this.language == VSProjectElements.ECSharp) ||
- (this.language == VSProjectElements.EVisualBasic))
- {
- if ((this.frameworkVersionForVSD == XMakeProjectStrings.vTwo) &&
- (String.Equals(referenceName, VSProjectElements.SystemDataCommon, StringComparison.OrdinalIgnoreCase)))
- {
- // We need to remove all references to "System.Data.Common" for VSD projects only.
- // Note : We only want to do this for projects that will be updated to v2.0
- // System.Data.Common is still valid for v1.0 upgraded projects.
- return;
- }
- else if (String.Equals(referenceName, VSProjectElements.SystemSR, StringComparison.OrdinalIgnoreCase))
- {
- // We always want to remove all references to "System.SR"
- return;
- }
- }
-
- if ((this.language == VSProjectElements.EVisualBasic) &&
- (String.Equals(referenceName, VSProjectElements.MSCorLib, StringComparison.OrdinalIgnoreCase)))
- {
- // We also want to get rid of all 'mscorlib' references for VB projects only.
- return;
- }
-
- // We need to find out what type of reference this is -- a .NET assembly
- // reference, a COM reference, or a project reference. In the XMake format,
- // we use separate item types for each of these.
-
- // See if there's a "Guid" attribute on the element. If so,
- // it's a classic COM reference.
- string comReferenceGuid = referenceElement.GetAttribute(VSProjectAttributes.guid);
-
- // See if there's a "Project" guid attribute. If so, it's a project
- // reference.
- string referencedProjectGuid = referenceElement.GetAttribute(VSProjectAttributes.project);
-
- if (!string.IsNullOrEmpty(comReferenceGuid) &&
- (comReferenceGuid != "{00000000-0000-0000-0000-000000000000}"))
- {
- newReferenceItem = ConvertClassicComReference(referenceElement, referencesItemGroup, referenceName);
- }
- else if (!string.IsNullOrEmpty(referencedProjectGuid))
- {
- newReferenceItem = ConvertProjectToProjectReference(referenceElement, referencesItemGroup, referenceName, ref referencedProjectGuid);
- }
- else
- {
- newReferenceItem = ConvertAssemblyReference(referenceElement, referencesItemGroup, referenceName);
- }
-
- // Add all the rest of the attributes on the element to the new
- // XMake item.
- foreach (XmlAttribute referenceAttribute in referenceElement.Attributes)
- {
- newReferenceItem.AddMetadata(referenceAttribute.Name, ProjectCollection.Escape(referenceAttribute.Value));
- }
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(referenceElement);
- }
-
- ///
- /// Given an element corresponding to a COM reference, create the appropriate element in the new project
- ///
- ///
- ///
- ///
- ///
- private static ProjectItemElement ConvertClassicComReference(XmlElementWithLocation referenceElement, ProjectItemGroupElement referencesItemGroup, string referenceName)
- {
- // This is a classic COM reference.
-
- // This gets added as a new XMake item of type "COMReference".
- // The "Include" attribute will contain the reference name,
- // and all the other attributes remain the same. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // {0EF79DA1-6555-11D2-A889-00AA006C2A9A}
- // 1
- // 0
- // 0
- // tlbimp
- //
- // -----------------------------------------------------------------------
-
- // Remove the "Name" attribute so we don't add it again at the end.
- referenceElement.RemoveAttribute(VSProjectAttributes.name);
-
- // Add a new item to XMake of type "COMReference".
- return referencesItemGroup.AddItem(XMakeProjectStrings.comReference, ProjectCollection.Escape(referenceName));
- }
-
- ///
- /// Given an element corresponding to a P2P reference, create the appropriate element in the new project
- ///
- ///
- ///
- ///
- ///
- ///
- private ProjectItemElement ConvertProjectToProjectReference(XmlElementWithLocation referenceElement, ProjectItemGroupElement referencesItemGroup, string referenceName, ref string referencedProjectGuid)
- {
- // This is a project-to-project reference.
- // This gets added as a new XMake item of type "ProjectReference".
- // The "Include" attribute should be the relative path from the
- // current project to the referenced project file. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // XMakeTasks
- // {44342961-78F4-4F98-AFD6-720DA6E648A2}
- // {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- //
- // -----------------------------------------------------------------------
-
- // Apparently, sometimes project reference guids contain additional goo with relative project path.
- // Just strip it off. The project system does the same thing, and by doing this early we make
- // sure that we have the correct guid attribute in the project file and ResolveNonMSBuildReferences
- // does not complain about invalid characters there which causes all the references to fail to resolve.
- int barIndex = referencedProjectGuid.IndexOf('|');
- if (barIndex != -1)
- {
- referencedProjectGuid = referencedProjectGuid.Remove(barIndex);
- referenceElement.SetAttribute(VSProjectAttributes.project, referencedProjectGuid);
- }
-
- string pathToReferencedProject = this.GetRelativePathToReferencedProject(referencedProjectGuid);
-
- if (pathToReferencedProject != null)
- {
- // For VSD Projects, we want to transform all Everett ( .csdproj & .vbdproj ) project 2 project references into
- // Whidbey ( .csproj & .vbproj ) references.
- if (String.Equals(Path.GetExtension(pathToReferencedProject),
- XMakeProjectStrings.csdprojFileExtension,
- StringComparison.OrdinalIgnoreCase))
- {
- pathToReferencedProject = Path.ChangeExtension(pathToReferencedProject, XMakeProjectStrings.csprojFileExtension);
- }
- else if (String.Equals(Path.GetExtension(pathToReferencedProject),
- XMakeProjectStrings.vbdprojFileExtension,
- StringComparison.OrdinalIgnoreCase))
- {
- pathToReferencedProject = Path.ChangeExtension(pathToReferencedProject, XMakeProjectStrings.vbprojFileExtension);
- }
- }
-
- // Add a new item to XMake of type "ProjectReference". If we were able to find
- // the relative path to the project, use it for the "Include", otherwise just use
- // the project name.
- string value = pathToReferencedProject ?? referenceName;
- return referencesItemGroup.AddItem(XMakeProjectStrings.projectReference, ProjectCollection.Escape(value));
- }
-
- ///
- /// Given an element corresponding to a .NET Assembly reference, create the appropriate element in the new project
- ///
- ///
- ///
- ///
- ///
- private ProjectItemElement ConvertAssemblyReference(XmlElementWithLocation referenceElement, ProjectItemGroupElement referencesItemGroup, string referenceName)
- {
- // This is a regular .NET assembly reference.
-
- // This gets added as a new XMake item of type "Reference". The "Include"
- // attribute is the assembly name, and all the other attributes remain
- // the same. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // System.Xml
- // ..\..\binaries\x86chk\bin\i386\System.Xml.dll
- //
- // -----------------------------------------------------------------------
-
- // Get the "AssemblyName" attribute. If not found, just use the value from the
- // "Name" attribute. This is what the project loading code does in VS.
- string assemblyName = referenceElement.GetAttribute(VSProjectAttributes.assemblyName);
- if (string.IsNullOrEmpty(assemblyName))
- {
- assemblyName = referenceName;
- }
- else
- {
- // Remove the "AssemblyName" attribute so we don't add it again at
- // the end.
- referenceElement.RemoveAttribute(VSProjectAttributes.assemblyName);
- }
-
- // MyType should only be added when System.Windows.Forms is present. If this
- // reference is seen, then set a flag so we can later add MyType.
- if (String.Equals("System.Windows.Forms", assemblyName, StringComparison.OrdinalIgnoreCase))
- {
- hasWindowsFormsReference = true;
- }
-
- // Remove hint paths that we think are to RTM or Everett framework assemblies
- string hintPath = referenceElement.GetAttribute(VSProjectAttributes.hintPath);
- if (hintPath != null)
- {
- hintPath = hintPath.ToUpper(CultureInfo.InvariantCulture);
- if (hintPath.IndexOf(LegacyFrameworkPaths.RTMFrameworkPath, StringComparison.Ordinal) != -1 ||
- hintPath.IndexOf(LegacyFrameworkPaths.EverettFrameworkPath, StringComparison.Ordinal) != -1 ||
- hintPath.IndexOf(LegacyFrameworkPaths.JSharpRTMFrameworkPath, StringComparison.Ordinal) != -1)
- {
- referenceElement.RemoveAttribute(VSProjectAttributes.hintPath);
- }
- }
-
- return referencesItemGroup.AddItem(XMakeProjectStrings.reference, ProjectCollection.Escape(assemblyName));
- }
-
- ///
- /// To convert project-to-project references correctly, we need some data
- /// out of the solution file. If we weren't given a solution file, then
- /// we search the project's directory and every parent directory all the
- /// way up to the root for the corresponding SLN file.
- ///
- /// RGoel
- private void SearchForSolutionFile
- (
- )
- {
- error.VerifyThrow(this.solutionFile == null, "Solution file already passed in!");
- error.VerifyThrow(this.projectGuid != null, "Need project Guid to find solution file.");
-
- // Start by looking for a solution file in the directory of the original project file.
- DirectoryInfo searchDirectory = new DirectoryInfo(Path.GetDirectoryName(Path.GetFullPath(this.oldProjectFile)));
-
- while (searchDirectory != null)
- {
- // Get a list of all the .SLN files in the current search directory.
- FileInfo[] slnFiles = searchDirectory.GetFiles("*.sln");
-
- // Open each .SLN file and parse it. We're searching for a .SLN
- // file that contains the current project that we're converting.
- foreach (FileInfo slnFile in slnFiles)
- {
- // Check that the extension really is ".SLN", because the above call to
- // GetFiles will also return files such as blah.SLN1 and bloo.SLN2.
- if (String.Equals(".sln", slnFile.Extension, StringComparison.OrdinalIgnoreCase))
- {
- // Parse the .SLN file.
- SolutionFile solutionParser = new SolutionFile();
- solutionParser.FullPath = slnFile.FullName;
-
- try
- {
- solutionParser.ParseSolutionFile();
- this.conversionWarnings.AddRange(solutionParser.SolutionParserWarnings);
-
- // Determine if our current project guid (for the project we're converting)
- // is listed in the .SLN file.
- if (solutionParser.GetProjectUniqueNameByGuid(this.projectGuid) != null)
- {
- // If we found our project listed, then this is the solution we will
- // use to help us convert the project-to-project references.
- this.solutionFile = slnFile.FullName;
- this.solution = solutionParser;
- return;
- }
- }
- catch (InvalidProjectFileException)
- {
- // If the SLN wasn't valid, that's fine ... just skip it, and
- // move on to the next one.
- }
- }
- }
-
- // Go up one directory, and search there. Stop when we hit the root.
- searchDirectory = searchDirectory.Parent;
- }
-
- // If we don't find a solution file that contains our project, that's okay...
- // we can still proceed. It just means that the converted project-to-project
- // references won't have the relative path to the referenced project. This
- // may prevent command-line builds from being fully functional, but it's
- // not the end of the world.
- }
-
- ///
- /// Given a 'from' path and a 'to' path, compose a relative path from 'from'
- /// to 'to'.
- ///
- /// jomof
- internal static string RelativePathTo(string from, string to)
- {
- error.VerifyThrow(from.IndexOf("*", StringComparison.Ordinal) == -1, "Bug: RelativePathTo can't handle wild cards.");
- error.VerifyThrow(to.IndexOf("*", StringComparison.Ordinal) == -1, "Bug: RelativePathTo can't handle wild cards.");
- from = Path.GetFullPath(from);
- to = Path.GetFullPath(to);
-
- Uri uriFrom = new Uri(from);
- Uri uriTo = new Uri(to);
- Uri relative = uriFrom.MakeRelativeUri(uriTo);
- string result = Uri.UnescapeDataString(relative.ToString());
-
- // The URI class returns forward slashes instead of backslashes. Replace
- // them now, and return the final path.
- return result.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
- }
-
- ///
- /// Given a project guid for a referenced project, this method computes
- /// the relative path to that referenced project file from the current
- /// project file that is being converted. In order to do this, we need
- /// some information out of the SLN file.
- ///
- /// RGoel
- private string GetRelativePathToReferencedProject
- (
- string referencedProjectGuid
- )
- {
- error.VerifyThrow(referencedProjectGuid != null, "Need valid project guid.");
-
- // If we don't have a pointer to the SLN file that contains this project,
- // then we really have no hope of finding the relative path to the
- // referenced project.
- if (this.solution == null)
- {
- // Log a warning that indicates that the complete solution file was not used
- string warning = ResourceUtilities.FormatString(
- AssemblyResources.GetString("CouldNotFindCompleteSolutionFile"),
- referencedProjectGuid);
- conversionWarnings.Add(warning);
- return null;
- }
-
- // Find the referenced project guid in the SLN file.
- string relativePathFromSolutionToReferencedProject =
- this.solution.GetProjectRelativePathByGuid(referencedProjectGuid);
-
- if (relativePathFromSolutionToReferencedProject == null)
- {
- // If the referenced project does not exist in the solution, we can't
- // get its relative path. This is not a conversion error; it just means
- // the converted project file won't have the relative path to the
- // referenced project. This may prevent some command-line build
- // scenarios from working completely.
- string warning = ResourceUtilities.FormatString(
- AssemblyResources.GetString("ProjectNotListingInSolutionFile"),
- referencedProjectGuid, this.solution.FullPath);
- conversionWarnings.Add(warning);
- return null;
- }
-
- if (relativePathFromSolutionToReferencedProject.StartsWith("http", StringComparison.OrdinalIgnoreCase))
- {
- // We've discovered a P2P reference to a web project. This feature is no
- // longer supported in Whidbey. We will remove the
- // P2P reference to the web project and issue a warning into the upgrade log
- // telling the user he needs to fix this up himself.
- string warning = ResourceUtilities.FormatString(
- AssemblyResources.GetString("UnsupportedProjectToProjectWebReference"),
- relativePathFromSolutionToReferencedProject);
- conversionWarnings.Add(warning);
- return null;
- }
-
- // Get the full path to the referenced project. Compute this by combining
- // the full path to the SLN file with the relative path specified within
- // the SLN file.
- string fullPathToReferencedProject = Path.Combine(
- Path.GetDirectoryName(this.solutionFile),
- relativePathFromSolutionToReferencedProject);
-
- // Now compute the relative path from the current project to the referenced
- // project.
- return RelativePathTo(this.oldProjectFile, fullPathToReferencedProject);
- }
-
- ///
- /// Processes the <Imports> element, and everything within it. As it is
- /// doing this, it will add "Import" items to a new ProjectItemGroupElement.
- ///
- /// RGoel
- private void ProcessImportsElement
- (
- XmlElementWithLocation importsElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((importsElement?.Name == VSProjectElements.imports),
- "Expected element.");
-
- // Make sure the caller gave us a valid xmakeProject to stuff
- // our new items into.
- error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object.");
-
- // The tag should have no attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!importsElement.HasAttributes, importsElement.Location,
- "NoAttributesExpected", VSProjectElements.imports);
-
- ProjectItemGroupElement importsItemGroup = null;
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode importsChildNode in importsElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((importsChildNode.NodeType == XmlNodeType.Comment) ||
- (importsChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (importsChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation importsChildElement = (XmlElementWithLocation)importsChildNode;
- switch (importsChildNode.Name)
- {
- // The element.
- case VSProjectElements.import:
- if (importsItemGroup == null)
- {
- importsItemGroup = xmakeProject.AddItemGroup();
- }
-
- this.ProcessImportElement((XmlElementWithLocation)importsChildElement, importsItemGroup);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, importsChildElement.Location,
- "UnrecognizedChildElement", importsChildElement.Name,
- VSProjectElements.imports);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(importsChildNode.Name, importsElement.Name, importsElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Import> element, and add an appropriate reference
- /// items to the importsItemGroup.
- ///
- /// RGoel
- private void ProcessImportElement
- (
- XmlElementWithLocation importElement,
- ProjectItemGroupElement importsItemGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((importElement?.Name == VSProjectElements.import),
- "Expected element.");
-
- // Make sure the caller has already created an ProjectItemGroupElement for us to
- // put the new items in.
- error.VerifyThrow(importsItemGroup != null, "Received null ProjectItemGroupElement");
-
- // Get the required "Namespace" attribute.
- string importNamespace = importElement.GetAttribute(VSProjectAttributes.importNamespace);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(importNamespace),
- importElement.Location, "MissingAttribute", VSProjectAttributes.importNamespace, VSProjectElements.import);
- // Remove the "Namespace" attribute, so it doesn't show up in our loop later.
- importElement.RemoveAttribute(VSProjectAttributes.importNamespace);
-
- // The element gets converted to XMake as an item of type "Import".
- // The "Namespace" attribute becomes the "Include" for the new item. For
- // example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // -----------------------------------------------------------------------
- importsItemGroup.AddItem(XMakeProjectStrings.import, ProjectCollection.Escape(importNamespace));
-
- // There should be no other attributes on the element (besides
- // "Namespace" which we already took care of). But loop through them
- // anyway, so we can emit a useful error message.
- foreach (XmlAttributeWithLocation importAttribute in importElement.Attributes)
- {
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, importAttribute.Location, "UnrecognizedAttribute",
- importAttribute.Name, VSProjectElements.import);
- }
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(importElement);
- }
-
- ///
- /// Processes the <Files> element, and everything within it. As it is
- /// doing this, it will add the appropriate items to a new ProjectItemGroupElement.
- ///
- /// RGoel
- private void ProcessFilesElement
- (
- XmlElementWithLocation filesElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((filesElement?.Name == VSProjectElements.files),
- "Expected element.");
-
- // Make sure the caller gave us a valid xmakeProject to stuff
- // our new items into.
- error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object.");
-
- // The tag should have no attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!filesElement.HasAttributes, filesElement.Location,
- "NoAttributesExpected", VSProjectElements.files);
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode filesChildNode in filesElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((filesChildNode.NodeType == XmlNodeType.Comment) ||
- (filesChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (filesChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation filesChildElement = (XmlElementWithLocation)filesChildNode;
- switch (filesChildNode.Name)
- {
- // The element.
- case VSProjectElements.include:
- this.ProcessIncludeElement(filesChildElement);
- break;
-
- // The element. Actually, the element is not supported
- // by VS. That is, VS completely ignores anything under the
- // element. Yet, some really old project files have this tag in there,
- // even though it doesn't do anything. So let's at least not fail if
- // the project file contains this.
- case VSProjectElements.exclude:
- string warning = AssemblyResources.GetString("ExcludeFoundInProject");
- conversionWarnings.Add(warning);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, filesChildElement.Location,
- "UnrecognizedChildElement", filesChildNode.Name,
- VSProjectElements.files);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(filesChildNode.Name, filesElement.Name, filesElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Include> element, and everything within it. As it is
- /// doing this, it will add the appropriate items to a new ProjectItemGroupElement.
- ///
- /// RGoel
- private void ProcessIncludeElement
- (
- XmlElementWithLocation includeElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((includeElement?.Name == VSProjectElements.include),
- "Expected element.");
-
- // Make sure the caller gave us a valid xmakeProject to stuff
- // our new items into.
- error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object.");
-
- // The tag should have no attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!includeElement.HasAttributes, includeElement.Location,
- "NoAttributesExpected", VSProjectElements.include);
-
- ProjectItemGroupElement filesItemGroup = null;
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode includeChildNode in includeElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((includeChildNode.NodeType == XmlNodeType.Comment) ||
- (includeChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (includeChildNode.NodeType == XmlNodeType.Element)
- {
- if (filesItemGroup == null)
- {
- filesItemGroup = xmakeProject.AddItemGroup();
- }
-
- XmlElementWithLocation includeChildElement = (XmlElementWithLocation)includeChildNode;
- switch (includeChildElement.Name)
- {
- // The element.
- case VSProjectElements.file:
- this.ProcessFileElement(includeChildElement, filesItemGroup);
- break;
-
- // The element.
- case VSProjectElements.folder:
- this.ProcessFolderElement(includeChildElement, filesItemGroup);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, includeChildElement.Location,
- "UnrecognizedChildElement", includeChildNode.Name,
- VSProjectElements.include);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(includeChildNode.Name, includeElement.Name, includeElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <File> element, and adds an appropriate item to the
- /// filesItemGroup.
- ///
- /// RGoel
- private void ProcessFileElement
- (
- XmlElementWithLocation fileElement,
- ProjectItemGroupElement filesItemGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((fileElement?.Name == VSProjectElements.file),
- "Expected element.");
-
- // Make sure the caller has already created an ProjectItemGroupElement for us to
- // put the new items in.
- error.VerifyThrow(filesItemGroup != null, "Received null ProjectItemGroupElement");
-
- // Get the required "RelPath" attribute.
- string relPath = fileElement.GetAttribute(VSProjectAttributes.relPath);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(relPath),
- fileElement.Location, "MissingAttribute", VSProjectAttributes.relPath, VSProjectElements.file);
- // Remove the "RelPath" attribute, so we don't end up adding it twice.
- fileElement.RemoveAttribute(VSProjectAttributes.relPath);
-
- // Get the "Link" attribute. This is for linked items only.
- string linkPath = fileElement.GetAttribute(VSProjectAttributes.link);
- // Remove the "Link" attribute, so we don't end up adding it twice.
- fileElement.RemoveAttribute(VSProjectAttributes.link);
-
- // Get the "BuildAction" attribute. If it doesn't exist, figure out
- // what the build action is based on the file extension. This is
- // what the project loading code does in VS.
- string buildAction = fileElement.GetAttribute(VSProjectAttributes.buildAction);
- if (string.IsNullOrEmpty(buildAction))
- {
- buildAction = VSProjectAttributes.buildActionNone;
- }
- // Remove the "BuildAction" attribute, so we don't end up adding it twice.
- fileElement.RemoveAttribute(VSProjectAttributes.buildAction);
-
- ProjectItemElement newFileItem;
-
- // Bug Whidbey #248965. If a .resx file is completely empty, do not include a reference
- // to it in the upgraded project file.
- if (!
- (String.Equals(Path.GetExtension(relPath), ".resx", StringComparison.OrdinalIgnoreCase)
- && IsFilePresentButEmpty(relPath, linkPath))
- )
- {
- // Add the new item to XMake.
- if (string.IsNullOrEmpty(linkPath))
- {
- // Normal item.
-
- // The element gets converted to XMake as a new item, where
- // the item type is the BuildAction, and the "Include" contains
- // the relative path to the item. For
- // example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // Code
- //
- // -----------------------------------------------------------------------
- newFileItem = filesItemGroup.AddItem(buildAction, ProjectCollection.Escape(relPath));
- }
- else
- {
- // Linked item.
-
- // The element gets converted to XMake as a new item, where
- // the item type is the BuildAction, the "Include" contains
- // the physical relative path to the item, and the non-XMake "Link"
- // attribute contains the project-relative path for item (for display
- // purposes in the Solution Explorer). For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // Properties\PropertyGroupCollection.cs
- // Code
- //
- // -----------------------------------------------------------------------
- newFileItem = filesItemGroup.AddItem(buildAction, ProjectCollection.Escape(linkPath));
- newFileItem.AddMetadata(XMakeProjectStrings.link, ProjectCollection.Escape(relPath));
- }
-
- // Add all the rest of the attributes on the element to the new
- // XMake item.
- foreach (XmlAttribute fileAttribute in fileElement.Attributes)
- {
- newFileItem.AddMetadata(fileAttribute.Name, ProjectCollection.Escape(fileAttribute.Value));
- }
-
- // If this is a VSD(devices) project and we're dealing with a content file,
- // mark it to copy if newer.
- if (((this.language == VSProjectElements.ECSharp) ||
- (this.language == VSProjectElements.EVisualBasic)) &&
- (String.Equals(buildAction, XMakeProjectStrings.content, StringComparison.OrdinalIgnoreCase)))
- {
- newFileItem.AddMetadata(XMakeProjectStrings.copytooutput,
- XMakeProjectStrings.preservenewest);
- }
- }
- else
- {
- string warning = ResourceUtilities.FormatString(
- AssemblyResources.GetString("EmptyResxRemoved"),
- relPath);
- conversionWarnings.Add(warning);
- }
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(fileElement);
- }
-
- ///
- /// Checks whether a file has content. If it is empty, returns true.
- /// If file does not exist we may be waiting for it to download asynchronously
- /// via source control so return false to leave it in the project
- ///
- /// danmose
- private bool IsFilePresentButEmpty(string relPath, string linkPath)
- {
- // relpath is the filename
- // linkPath, if it exists, is the relative path from the project, or the absolute full path
- string path;
- if (string.IsNullOrEmpty(linkPath))
- {
- path = Path.Combine(Path.GetDirectoryName(oldProjectFile), relPath);
- }
- else
- {
- if (Path.IsPathRooted(linkPath)) // absolute
- {
- path = linkPath;
- }
- else // relative
- {
- path = Path.Combine(Path.GetDirectoryName(oldProjectFile), linkPath);
- }
- }
-
- if (!File.Exists(path))
- {
- // File does not exist - may be waiting to be download asynchronously via source control
- // so return false to leave it in the project
- return false;
- }
-
- long length;
- try
- {
- FileInfo fi = new FileInfo(path);
- length = fi.Length;
- }
- catch (Exception e) // Catching Exception, but rethrowing unless it's a well-known exception.
- {
- if (ExceptionHandling.NotExpectedException(e))
- {
- throw;
- }
- // if we can't say for sure it's empty, play safe and return false
- return false;
- }
-
- return length == 0;
- }
-
- ///
- /// Processes the <Folder> element, and adds an appropriate item to the
- /// filesItemGroup.
- ///
- /// RGoel
- private void ProcessFolderElement
- (
- XmlElementWithLocation folderElement,
- ProjectItemGroupElement filesItemGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((folderElement?.Name == VSProjectElements.folder),
- "Expected element.");
-
- // Make sure the caller has already created an ProjectItemGroupElement for us to
- // put the new items in.
- error.VerifyThrow(filesItemGroup != null, "Received null ProjectItemGroupElement");
-
- // Get the required "RelPath" attribute.
- string relPath = folderElement.GetAttribute(VSProjectAttributes.relPath);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(relPath),
- folderElement.Location, "MissingAttribute", VSProjectAttributes.relPath, VSProjectElements.folder);
- // Remove the "RelPath" attribute, so we don't end up adding it twice.
- folderElement.RemoveAttribute(VSProjectAttributes.relPath);
-
- // We need to find out what type of folder this is -- a web references
- // folder, a web reference URL, or just an empty project folder.
-
- // See if there's a "WebReferences" attribute on the element. If so,
- // and the value is set to "True", then it's a web reference folder.
- string webReferences = folderElement.GetAttribute(VSProjectAttributes.webReferences);
- // Remove the "WebReferences" attribute, so we don't end up adding it twice.
- folderElement.RemoveAttribute(VSProjectAttributes.webReferences);
-
- // See if there's a "WebReferenceURL" attribute. If so, it's a web reference
- // URL.
- string webReferenceUrl = folderElement.GetAttribute(VSProjectAttributes.webReferenceUrl);
- // Remove the "WebReferenceURL" attribute, so we don't end up adding it twice.
- folderElement.RemoveAttribute(VSProjectAttributes.webReferenceUrl);
-
- ProjectItemElement newFolderItem;
-
- if ((webReferences != null) && (String.Equals(webReferences, "true", StringComparison.OrdinalIgnoreCase)))
- {
- // This is a web reference folder.
-
- // The element gets converted to XMake as an item of type
- // "WebReferences". The "Include" will contain the relative path.
- // For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // -----------------------------------------------------------------------
- newFolderItem = filesItemGroup.AddItem(XMakeProjectStrings.webReferences,
- ProjectCollection.Escape(relPath));
- }
- else if (!string.IsNullOrEmpty(webReferenceUrl))
- {
- // This is an actual web reference URL.
-
- // The element gets converted to XMake as an item of type
- // "WebReferenceURL". The "Include" will contain the URL.
- // For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // Web References\mobileakipman\
- // Static
- //
- // -----------------------------------------------------------------------
- newFolderItem = filesItemGroup.AddItem(XMakeProjectStrings.webReferenceUrl,
- ProjectCollection.Escape(webReferenceUrl));
- newFolderItem.AddMetadata(XMakeProjectStrings.relPath, ProjectCollection.Escape(relPath));
-
- // Whidbey projects have some new properties to control the behavior of the
- // proxy generation. For projects migrated from Everett, we want to force
- // the proxy generation to mimic the Everett behavior, so that people's projects
- // still work the same as they did in Everett. (These properties did not
- // exist in Everett.) See spec at:
- // http://devdiv/SpecTool/Documents/Whidbey/VSCore/Solution%20Project%20Build/FeatureSpecs/Project-WebReferences.doc
- if (!this.newWebReferencePropertiesAdded)
- {
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.webRefEnableProperties,
- (this.language == VSProjectElements.visualJSharp) ? "false" : "true");
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.webRefEnableSqlTypes, "false");
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.webRefEnableLegacyEventing, "true");
-
- this.newWebReferencePropertiesAdded = true;
- }
- }
- else
- {
- // This is just a project folder that happens not to have any files in it.
-
- // The element gets converted to XMake as an item of type "Folder".
- // However, we do need to remove the trailing backslash, because XMake
- // interprets that as a recursion (bug # 58591). For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // -----------------------------------------------------------------------
-
- // Remove the trailing backslash. XMake interprets trailing backslashes
- // as a recursive wildcard. This will be fixed in M2 -- bug # 58591
- if (relPath.EndsWith("\\", StringComparison.Ordinal))
- {
- relPath = relPath.Remove(relPath.Length - 1, 1);
- }
-
- newFolderItem = filesItemGroup.AddItem(XMakeProjectStrings.folder,
- ProjectCollection.Escape(relPath));
- }
-
- // Add all the rest of the attributes on the element to the new
- // XMake item.
- foreach (XmlAttribute folderAttribute in folderElement.Attributes)
- {
- newFolderItem.AddMetadata(folderAttribute.Name, ProjectCollection.Escape(folderAttribute.Value));
- }
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(folderElement);
- }
-
- ///
- /// Processes the <StartupServices> element, and everything within it. As
- /// it is doing this, it will add new "StartupService" items to a new ProjectItemGroupElement.
- ///
- /// RGoel
- private void ProcessStartupServicesElement
- (
- XmlElementWithLocation startupServicesElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((startupServicesElement?.Name == VSProjectElements.startupServices),
- "Expected element.");
-
- // Make sure the caller gave us a valid xmakeProject to stuff
- // our new items into.
- error.VerifyThrow(xmakeProject != null, "Expected valid xmake project object.");
-
- // The tag should have no attributes.
- ProjectErrorUtilities.VerifyThrowInvalidProject(!startupServicesElement.HasAttributes, startupServicesElement.Location,
- "NoAttributesExpected", VSProjectElements.startupServices);
-
- ProjectItemGroupElement startupServicesItemGroup = null;
-
- // Loop through all the direct child elements of the element.
- foreach (XmlNode startupServicesChildNode in startupServicesElement)
- {
- // Handle XML comments under the the node (just ignore them).
- if ((startupServicesChildNode.NodeType == XmlNodeType.Comment) ||
- (startupServicesChildNode.NodeType == XmlNodeType.Whitespace))
- {
- continue;
- }
-
- if (startupServicesChildNode.NodeType == XmlNodeType.Element)
- {
- XmlElementWithLocation startupServicesChildElement = (XmlElementWithLocation)startupServicesChildNode;
- switch (startupServicesChildElement.Name)
- {
- // The element.
- case VSProjectElements.service:
- if (startupServicesItemGroup == null)
- {
- startupServicesItemGroup = xmakeProject.AddItemGroup();
- }
-
- this.ProcessServiceElement(startupServicesChildElement, startupServicesItemGroup);
- break;
-
- default:
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, startupServicesChildElement.Location,
- "UnrecognizedChildElement", startupServicesChildNode.Name,
- VSProjectElements.startupServices);
- break;
- }
- }
- else
- {
- ProjectXmlUtilities.ThrowProjectInvalidChildElement(startupServicesChildNode.Name, startupServicesElement.Name, startupServicesElement.Location);
- }
- }
- }
-
- ///
- /// Processes the <Service> element, and add an appropriate reference
- /// items to the startupServicesItemGroup.
- ///
- /// RGoel
- private void ProcessServiceElement
- (
- XmlElementWithLocation serviceElement,
- ProjectItemGroupElement startupServicesItemGroup
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((serviceElement?.Name == VSProjectElements.service),
- "Expected element.");
-
- // Make sure the caller has already created an ProjectItemGroupElement for us to
- // put the new items in.
- error.VerifyThrow(startupServicesItemGroup != null, "Received null ProjectItemGroupElement");
-
- // Get the required "ID" attribute.
- string id = serviceElement.GetAttribute(VSProjectAttributes.id);
- ProjectErrorUtilities.VerifyThrowInvalidProject(!string.IsNullOrEmpty(id), serviceElement.Location,
- "MissingAttribute", VSProjectAttributes.id, VSProjectElements.service);
- // Remove the "ID" attribute, so it doesn't show up in our loop later.
- serviceElement.RemoveAttribute(VSProjectAttributes.id);
-
- // The element gets converted to XMake as an item of type "Service".
- // The "ID" attribute becomes the "Include" for the new item. For
- // example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // -----------------------------------------------------------------------
- startupServicesItemGroup.AddItem(XMakeProjectStrings.service, ProjectCollection.Escape(id));
-
- // There should be no other attributes on the element (besides
- // "ID" which we already took care of). But loop through them
- // anyway, so we can emit a useful error message.
- foreach (XmlAttributeWithLocation serviceAttribute in serviceElement.Attributes)
- {
- ProjectErrorUtilities.VerifyThrowInvalidProject(false, serviceAttribute.Location, "UnrecognizedAttribute",
- serviceAttribute.Name, VSProjectElements.service);
- }
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(serviceElement);
- }
-
- ///
- /// Processes the <OtherProjectSettings> element, and everything within it.
- /// As it is doing this, it will add stuff to the globalPropertyGroup.
- ///
- /// RGoel
- private void ProcessOtherProjectSettingsElement
- (
- XmlElementWithLocation otherProjectSettingsElement
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((otherProjectSettingsElement?.Name == VSProjectElements.otherProjectSettings),
- "Expected element.");
-
- // Make sure the caller gave us a valid globalPropertyGroup to stuff
- // our properties into.
- error.VerifyThrow(globalPropertyGroup != null, "Expected valid global ProjectPropertyElementGroup.");
-
- // All of the attributes on the tag get converted to XMake
- // properties. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- //
- //
- // 0
- // ProjectFiles
- // 0
- //
- // -----------------------------------------------------------------------
- this.AddXMakePropertiesFromXMLAttributes(this.globalPropertyGroup, otherProjectSettingsElement);
-
- // There should be no children of the element.
- ProjectXmlUtilities.VerifyThrowProjectNoChildElements(otherProjectSettingsElement);
- }
-
- ///
- /// Processes the <UserProperties> element, and everything within it.
- /// Basically, this element and its contents end up going verbatim into
- /// the <ProjectExtensions> section of the newly converted MSBuild project
- /// file.
- ///
- /// The one slight exception is that we do something special for Trinity
- /// conversion. Specifically, if we detect that this is a White Rabbit
- /// project, we add the flavor GUID for Triumph.
- ///
- ///
- ///
- /// rgoel
- private void ProcessUserPropertiesElement
- (
- XmlElementWithLocation userPropertiesElement,
- out bool isTriumphProject
- )
- {
- // Make sure this is the element.
- error.VerifyThrow((userPropertiesElement?.Name == VSProjectElements.userProperties),
- "Expected element.");
-
- isTriumphProject = false;
-
- // All of the node goes into the section
- // verbatim. The one exception is that if we detect a White Rabbit project,
- // then we add the flavor GUID for Triumph. For example,
- // -----------------------------------------------------------------------
- // Everett format:
- // ===============
- //
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- //
- //
- // ...
- // {BAA0C2D2-18E2-41B9-852F-F413020CAA33};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
- // ...
- //
- // ...
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- // -----------------------------------------------------------------------
-
- string visualStudioProjectExtensions = GetProjectExtensionsString(XMakeProjectStrings.visualStudio);
- visualStudioProjectExtensions += userPropertiesElement.OuterXml;
-
- // If there are any attributes on the element that indicate that
- // this was a White Rabbit project, add the Triumph flavor GUID.
- if (
- (userPropertiesElement.Attributes[VSProjectAttributes.officeDocumentPath] != null) ||
- (userPropertiesElement.Attributes[VSProjectAttributes.officeDocumentType] != null) ||
- (userPropertiesElement.Attributes[VSProjectAttributes.officeProject] != null)
- )
- {
- isTriumphProject = true;
-
- // We need the language-specific Guid as well.
- string languageGuid = String.Empty;
-
- if (this.language == VSProjectElements.cSharp)
- {
- languageGuid = XMakeProjectStrings.cSharpGuid;
- }
- else if (this.language == VSProjectElements.visualBasic)
- {
- languageGuid = XMakeProjectStrings.visualBasicGuid;
- }
- else if (this.language == VSProjectElements.visualJSharp)
- {
- languageGuid = XMakeProjectStrings.visualJSharpGuid;
- }
- else
- {
- error.VerifyThrow(false, "This project is not recognized as one of the following 3 languages: C#, VB, VJ#");
- }
-
- // Add a new global property called ProjectTypeGuids.
- this.globalPropertyGroup.AddProperty(XMakeProjectStrings.projectTypeGuids,
- "{" + XMakeProjectStrings.triumphProjectTypeGuid + "};{" + languageGuid + "}");
-
- // Add the Office document as a "None" item in the converted project file.
- XmlAttribute officeDocumentPathAttribute = userPropertiesElement.Attributes[VSProjectAttributes.officeDocumentPath];
- if (officeDocumentPathAttribute != null)
- {
- string officeDocumentPath = officeDocumentPathAttribute.Value;
- if (!string.IsNullOrEmpty(officeDocumentPath))
- {
- string projectFileDirectory = Path.GetDirectoryName(Path.GetFullPath(this.oldProjectFile));
- string officeDocumentFullPath = Path.GetFullPath(Path.Combine(projectFileDirectory, officeDocumentPath));
-
- // If the office document is in the project directory ...
- if (String.Equals(projectFileDirectory, Path.GetDirectoryName(officeDocumentFullPath), StringComparison.OrdinalIgnoreCase))
- {
- // If the office document actually exists on disk ...
- if (File.Exists(officeDocumentFullPath))
- {
- // Add the office document as a "None" item to the converted project.
- ProjectItemGroupElement officeDocumentItemGroup = this.xmakeProject.AddItemGroup();
- officeDocumentItemGroup.AddItem("None", ProjectCollection.Escape(officeDocumentPath));
- }
- }
- }
- }
- }
-
- SetProjectExtensionsString(XMakeProjectStrings.visualStudio, visualStudioProjectExtensions);
- }
-
- ///
- /// Fix hard-coded fully qualified paths in Code Analysis properties.
- ///
- /// Due to a bug in Whidbey configuration cloning, some Code Analysis
- /// properties in Whidbey project files contain fully qualified paths.
- /// They need to be detected and removed during project conversion so
- /// that Code Analysis will work on converted Whidbey projects.
- ///
- /// duanek
- /// true if changes were required, false otherwise
- // -----------------------------------------------------------------------
- // XMake format:
- // =============
- //
- // ...
- //
- // ...
- // C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools\FxCop\\rules
- // ...
- //
- // ...
- //
- // -----------------------------------------------------------------------
- private bool FixCodeAnalysisPaths()
- {
- bool changedProject = false;
-
- // Iterate over all nodes
- // Look for a node
- foreach (ProjectPropertyElement ProjectPropertyElement in xmakeProject.Properties)
- {
- if (ProjectPropertyElement.Name == XMakeProjectStrings.codeAnalysisRuleAssemblies)
- {
- // We do not want to blindly remove this property since it
- // is valid for the user to modify it in the project file.
-
- // The default value in Microsoft.CodeAnalysis.Targets
- // is a rooted path ending in "FxCop\\rules".
- if (Path.IsPathRooted(ProjectPropertyElement.Value))
- {
- if (ProjectPropertyElement.Value.EndsWith(@"FxCop\\rules", StringComparison.Ordinal))
- {
- ProjectPropertyElement.Parent.RemoveChild(ProjectPropertyElement);
- changedProject = true;
- }
- }
-
- break;
- }
- }
-
- return changedProject;
- }
-
- ///
- /// Find the first property with the provided name in the ProjectRootElement.
- /// If none is found, returns null.
- ///
- private ProjectPropertyElement FindPropertyIfPresent(ProjectRootElement project, string name)
- {
- foreach (ProjectPropertyElement property in project.Properties)
- {
- if (String.Equals(property.Name, name, StringComparison.OrdinalIgnoreCase))
- {
- return property;
- }
- }
-
- return null;
- }
-
- ///
- /// Get the project extensions string with a particular ID,
- /// or empty string if it does not exist or there is no project extensions at all
- ///
- private string GetProjectExtensionsString(string id)
- {
- ProjectExtensionsElement element = xmakeProject.ProjectExtensions;
-
- return (element == null) ? String.Empty : element[id];
- }
-
- ///
- /// Set a project extensions string with the provided Id,
- /// even if there is no project extensions tag at present
- ///
- private void SetProjectExtensionsString(string id, string content)
- {
- ProjectExtensionsElement element = xmakeProject.ProjectExtensions;
-
- if (element == null)
- {
- element = xmakeProject.CreateProjectExtensionsElement();
- xmakeProject.AppendChild(element);
- }
-
- element[id] = content;
- }
- }
-}
diff --git a/src/Deprecated/Conversion/README.md b/src/Deprecated/Conversion/README.md
deleted file mode 100644
index 3e39338920b..00000000000
--- a/src/Deprecated/Conversion/README.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Microsoft.Build.Conversion.Core
-
-⚠️ This package is **deprecated** and should not be referenced. It will be removed in a future version of MSBuild.
-
-Contains `Microsoft.Build.Conversion.Core.dll`, which is provided with MSBuild for compatibility purposes.
diff --git a/src/Deprecated/Conversion/Resources/Strings.resx b/src/Deprecated/Conversion/Resources/Strings.resx
deleted file mode 100644
index 7aa5726a4f8..00000000000
--- a/src/Deprecated/Conversion/Resources/Strings.resx
+++ /dev/null
@@ -1,190 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- MSB2013: The project-to-project reference with GUID {0} could not be converted because a valid .SLN file containing all projects could not be found.
- {StrBegin="MSB2013: "}
-
-
- MSB2016: Found an empty .RESX file in the project ({0}). Removing it from the converted project.
- {StrBegin="MSB2016: "}
-
-
- MSB2015: Found an <Exclude> element in the original project file. This cannot be converted to Visual Studio .NET and is being ignored.
- {StrBegin="MSB2015: "}
-
-
- MSB2001: Element <{0}> does not contain the required attribute "{1}".
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2002: The file name of the new project must be specified.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
-
- MSB2003: The file name of the old project must be specified.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
-
- MSB2004: Element <{0}> cannot contain more than one language node.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
-
- MSB2005: Element <{0}> cannot contain attributes.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2006: The project file does not contain the root element <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2007: Visual Studio cannot find the project file "{0}".
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
-
- MSB2014: The project-to-project reference with GUID {0} cannot be converted because it is not listed in the file '{1}'.
- {StrBegin="MSB2014: "}
-
-
- MSB2008: This Visual Studio project system cannot convert "{0}" projects. It can only be used to convert C#, VB, and VJ# client projects.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
-
- MSB2009: Attribute "{0}" of element <{1}> is not valid.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2010: Child element <{0}> of element <{1}> is not valid.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2011: Element <{0}> is not valid.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
-
- MSB2012: Project-to-project references to web projects are no longer supported and therefore cannot be converted. Please remove the reference to project {0} and add it again.
- {StrBegin="MSB2012: "}
-
-
-
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.cs.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.cs.xlf
deleted file mode 100644
index 71cedc89897..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.cs.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: Meziprojektový odkaz s identifikací GUID {0} nebylo možno převést, protože nebyl nalezen platný soubor SLN obsahující všechny projekty.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: V projektu byl nalezen prázdný soubor RESX ({0}). Soubor bude z převedeného projektu odebrán.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: V původním souboru projektu byl nalezen element <Exclude>. Tento element nelze převést do formátu aplikace Visual Studio .NET, a proto bude ignorován.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: Element <{0}> neobsahuje požadovaný atribut {1}.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Je nutné zadat název souboru nového projektu.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Je nutné zadat název souboru starého projektu.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: Element <{0}> nemůže obsahovat více než jeden uzel jazyka.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: Element <{0}> nemůže obsahovat atributy.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: Soubor projektu neobsahuje kořenový element <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Aplikaci Visual Studio se nepodařilo nalézt soubor projektu {0}.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: Meziprojektový odkaz s identifikací GUID {0} nebylo možno převést, protože není uveden v souboru {1}.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Tento systém projektů Visual Studio nemůže převést projekty {0}. Lze jej použít pouze k převodu klientských projektů v jazycích C#, Visual Basic a Visual J#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: Atribut {0} elementu <{1}> není platný.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: Podřízený element <{0}> elementu <{1}> není platný.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: Element <{0}> není platný.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Meziprojektové odkazy na webové projekty již nejsou podporovány, a proto nemohou být převedeny. Odeberte odkaz na projekt {0} a přidejte jej znovu.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.de.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.de.xlf
deleted file mode 100644
index 06d47da226f..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.de.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Ein <Exclude>-Element wurde in der ursprünglichen Projektdatei gefunden. Dieses Element kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: Das <{0}>-Element enthält nicht das erforderliche {1}-Attribut.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: Das <{0}>-Element darf nur einen Sprachknoten enthalten.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: Das <{0}>-Element darf keine Attribute enthalten.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: In der Projektdatei ist das <{0}>-Stammelement nicht enthalten.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: Das {0}-Attribut des <{1}>-Elements ist ungültig.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: Das untergeordnete <{0}>-Element des <{1}>-Elements ist ungültig.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: Das <{0}>-Element ist ungültig.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.es.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.es.xlf
deleted file mode 100644
index 89d087f8822..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.es.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: La referencia entre proyectos con GUID {0} no se pudo convertir porque no se encuentra un archivo .SLN válido con todos los proyectos.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Se encontró un archivo .RESX vacío en el proyecto ({0}). Se quitará del proyecto convertido.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Se encontró un elemento <Exclude> en el archivo del proyecto original. No se puede convertir a Visual Studio .NET y se omitirá.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: El elemento <{0}> no contiene el atributo necesario "{1}".
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Debe especificarse el nombre de archivo del nuevo proyecto.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Debe especificarse el nombre de archivo del proyecto anterior.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: El elemento <{0}> no puede contener más de un nodo de lenguaje.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: El elemento <{0}> no puede contener atributos.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: El archivo del proyecto no contiene el elemento raíz <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio no encuentra el archivo del proyecto "{0}".
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: La referencia entre proyectos con GUID {0} no se puede convertir porque no aparece en el archivo '{1}'.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Este sistema de proyectos de Visual Studio no puede convertir proyectos de "{0}". Solo se puede usar para convertir proyectos de cliente C#, VB y VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: El atributo "{0}" del elemento <{1}> no es válido.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: El elemento secundario <{0}> del elemento <{1}> no es válido.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: El elemento <{0}> no es válido.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: La referencia entre proyectos a los proyectos web ya no se admite y, en consecuencia, no se puede convertir. Quite la referencia al proyecto {0} y agréguela de nuevo.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.fr.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.fr.xlf
deleted file mode 100644
index dac7ff2b947..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.fr.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: Impossible de convertir la référence entre projets avec le GUID {0} car le fichier .SLN valide qui contient tous les projets est introuvable.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Fichier .RESX vide trouvé dans le projet ({0}). Suppression de ce fichier dans le projet converti.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Élément <Exclude> trouvé dans le fichier projet d'origine. Sa conversion à Visual Studio .NET étant impossible, il est ignoré.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: L'élément <{0}> ne contient pas l'attribut "{1}" requis.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Le nom de fichier du nouveau projet doit être spécifié.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Le nom de fichier de l'ancien projet doit être spécifié.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: L'élément <{0}> ne peut pas contenir plusieurs nœuds de langage.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: L'élément <{0}> ne peut pas contenir d'attributs.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: Le fichier projet ne contient pas l'élément racine <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio ne peut pas trouver le fichier projet "{0}".
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: Impossible de convertir la référence entre projets avec le GUID {0}, car elle n'est pas listée dans le fichier '{1}'.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Ce système de projet Visual Studio ne peut pas convertir les projets "{0}". Il ne permet de convertir que les projets clients C#, VB et VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: L'attribut "{0}" de l'élément <{1}> n'est pas valide.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: L'élément enfant <{0}> de l'élément <{1}> n'est pas valide.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: L'élément <{0}> n'est pas valide.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Les références entre projets aux projets Web ne sont plus prises en charge et ne peuvent donc pas être converties. Supprimez la référence au projet {0}, puis ajoutez-la à nouveau.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.it.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.it.xlf
deleted file mode 100644
index 4e8cb64f37f..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.it.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: non è stato possibile convertire il riferimento da progetto a progetto con GUID {0} perché non è stato trovato un file con estensione sln valido contenente tutti i progetti.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: nel progetto ({0}) è stato trovato un file con estensione resx vuoto. Tale file verrà rimosso dal progetto convertito.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: nel file di progetto originale è stato trovato un elemento <Exclude>. Tale elemento non può essere convertito in Visual Studio .NET e verrà ignorato.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: l'elemento <{0}> non contiene l'attributo obbligatorio "{1}".
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: è necessario specificare il nome file del nuovo progetto.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: è necessario specificare il nome file del vecchio progetto.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: l'elemento <{0}> non può contenere più di un nodo lingua.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: l'elemento <{0}> non può contenere attributi.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: il file di progetto non contiene l'elemento radice <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: il file di progetto "{0}" non è stato trovato.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: non è possibile convertire il riferimento da progetto a progetto con GUID {0} perché non è elencato nel file '{1}'.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: non è possibile convertire "{0}" progetti con il sistema del progetto Visual Studio. Tale sistema può essere usato solo per convertire progetti client C#, VB e VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: l'attributo "{0}" dell'elemento <{1}> non è valido.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: l'elemento figlio <{0}> dell'elemento <{1}> non è valido.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: elemento <{0}> non valido.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: i riferimenti da progetto a progetto a progetti Web non sono più supportati e pertanto non possono essere convertiti. Rimuovere il riferimento al progetto {0} e aggiungerlo di nuovo.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.ja.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.ja.xlf
deleted file mode 100644
index e3355e3c588..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.ja.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: すべてのプロジェクトを含む有効な .SLN ファイルが見つからなかったため、GUID {0} を伴うプロジェクト間参照を変換できませんでした。
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: プロジェクト ({0}) で空の .RESX ファイルが見つかりました。変換されたプロジェクトからそのファイルを削除しています。
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: 元のプロジェクト ファイルで <Exclude> 要素が見つかりました。これは Visual Studio .NET に変換することはできないため、無視されます。
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: 要素 <{0}> には必要な属性 "{1}" が含まれていません。
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: 新しいプロジェクトの名前を指定してください。
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: 古いプロジェクトの名前を指定してください。
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: 要素 <{0}> には 1 つ以上の言語ノードを含めることはできません。
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: 要素 <{0}> には属性を含めることはできません。
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: プロジェクト ファイルにはルート要素 <{0}> がありません。
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio では、プロジェクト ファイル "{0}" が見つかりませんでした。
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: ファイル '{1}' のリストにないため、GUID {0} を伴うプロジェクト間参照を変換できません。
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: この Visual Studio プロジェクト システムでは、"{0}" プロジェクトを変換できません。C#、VB、および VJ# クライアント プロジェクト以外はこのシステムを使って変換できません。
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: 要素 <{1}> の属性 "{0}" は有効ではありません。
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: 要素 <{1}> の子要素 <{0}> は有効ではありません。
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: 要素 <{0}> は有効ではありません。
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Web プロジェクトへのプロジェクト間参照は、現在サポートされていないため、変換することができません。プロジェクト {0} への参照を削除してから、再度追加してください。
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.ko.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.ko.xlf
deleted file mode 100644
index 17379a48e22..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.ko.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: 모든 프로젝트를 포함하는 올바른 .SLN 파일을 찾을 수 없으므로 GUID가 {0}인 프로젝트 간 참조를 변환할 수 없습니다.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: 프로젝트({0})에 빈 .RESX 파일이 있습니다. 변환된 프로젝트에서 이 파일을 제거합니다.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: 원래 프로젝트 파일에 <Exclude> 요소가 있습니다. 이 요소는 Visual Studio .NET으로 변환할 수 없으므로 무시됩니다.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: <{0}> 요소에 필요한 "{1}" 특성이 없습니다.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: 새 프로젝트의 파일 이름을 지정해야 합니다.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: 이전 프로젝트의 파일 이름을 지정해야 합니다.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: <{0}> 요소는 언어 노드를 둘 이상 포함할 수 없습니다.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: <{0}> 요소는 특성을 포함할 수 없습니다.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: 프로젝트 파일에 <{0}> 루트 요소가 없습니다.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio에서 프로젝트 파일 "{0}"을(를) 찾을 수 없습니다.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: GUID가 {0}인 프로젝트 간 참조는 '{1}' 파일에 나열되어 있지 않으므로 변환할 수 없습니다.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: 이 Visual Studio 프로젝트 시스템에서 "{0}" 프로젝트를 변환할 수 없습니다. C#, VB 및 VJ# 클라이언트 프로젝트만 변환할 수 있습니다.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: <{1}> 요소의 "{0}" 특성이 잘못되었습니다.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: <{1}> 요소의 <{0}> 자식 요소가 잘못되었습니다.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: <{0}> 요소가 잘못되었습니다.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: 웹 프로젝트에 대한 프로젝트 간 참조는 더 이상 지원되지 않으므로 변환할 수 없습니다. {0} 프로젝트에 대한 참조를 제거한 후 다시 추가하십시오.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.pl.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.pl.xlf
deleted file mode 100644
index 7a064c4613b..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.pl.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: Nie można przekonwertować odwołania między projektami o identyfikatorze GUID {0}, ponieważ nie odnaleziono prawidłowego pliku SLN zawierającego wszystkie projekty.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Odnaleziono pusty plik RESX w projekcie ({0}). Zostanie on usunięty z przekonwertowanego projektu.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Znaleziono element <Exclude> w oryginalnym pliku projektu. Nie można go przekonwertować na format Visual Studio .NET i zostanie on zignorowany.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: Element <{0}> nie zawiera wymaganego atrybutu „{1}”.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Należy określić nazwę pliku nowego projektu.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Należy określić nazwę pliku starego projektu.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: Element <{0}> nie może zawierać więcej niż jeden węzeł języka.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: Element <{0}> nie może zawierać atrybutów.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: Plik projektu nie zawiera elementu głównego <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Program Visual Studio nie może odnaleźć pliku projektu „{0}”.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: Nie można przekonwertować odwołania między projektami o identyfikatorze GUID {0}, ponieważ nie jest ono wymienione w pliku „{1}”.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Ten system projektów programu Visual Studio nie może konwertować projektów „{0}”. Można go używać tylko do konwertowania projektów klienckich C#, VB i VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: Atrybut „{0}” elementu <{1}> jest nieprawidłowy.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: Element podrzędny <{0}> elementu <{1}> jest nieprawidłowy.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: Element <{0}> jest nieprawidłowy.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Odwołania między projektami do projektów sieci Web nie są już obsługiwane i dlatego nie można ich konwertować. Usuń odwołanie do projektu {0} i dodaj je ponownie.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.pt-BR.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.pt-BR.xlf
deleted file mode 100644
index 7f50ac9166c..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.pt-BR.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: A referência de projeto-a-projeto com GUID {0} não foi convertida porque um arquivo .SLN válido contendo todos os projetos não foi encontrado.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Foi encontrado um arquivo .RESX vazio no projeto ({0}). Removendo-o do projeto convertido.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Foi encontrado um elemento <Exclude> no arquivo de projeto original. Ele não pode ser convertido para o Visual Studio .NET e será ignorado.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: O elemento <{0}> não contém o atributo "{1}" necessário.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: É necessário especificar o nome de arquivo do projeto novo.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: É necessário especificar o nome de arquivo do projeto antigo.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: O elemento <{0}> não pode conter mais de um nó de idioma.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: O elemento <{0}> não pode conter atributos.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: O arquivo de projeto não contém o elemento raiz <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: O Visual Studio não pode localizar o arquivo de projeto "{0}".
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: A referência de projeto-a-projeto com GUID {0} não foi convertida porque ela não está na lista do arquivo "{1}".
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Esse sistema de projeto do Visual Studio não pode converter projetos "{0}". Ele só pode ser usado para converter projetos de cliente C#, VB e VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: O atributo "{0}" do elemento <{1}> não é válido.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: O elemento filho <{0}> do elemento <{1}> não é válido.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: O elemento <{0}> não é válido.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Não há mais suporte para as referências projeto-a-projeto a projetos da Web e por isso não é possível convertê-las. Remova a referência ao projeto {0} e adicione-a novamente.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.ru.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.ru.xlf
deleted file mode 100644
index 57f064b07e7..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.ru.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: не удалось преобразовать ссылку с проекта на проект с GUID {0}, поскольку не удалось найти допустимый файл .SLN, содержащий все проекты.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: в проекте ({0}) обнаружен пустой файл .RESX. Идет его удаление из преобразованного проекта.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: обнаружен элемент <Exclude> в исходном файле проекта. Не удается выполнить преобразование в формат Visual Studio .NET.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: элемент <{0}> не содержит обязательного атрибута "{1}".
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: необходимо указать имя файла нового проекта.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: необходимо указать имя файла старого проекта.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: элемент <{0}> не может содержать более одного узла language.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: элемент <{0}> не может содержать атрибуты.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: файл проекта не содержит корневой элемент <{0}>.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio не удалось найти файл проекта "{0}".
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: нельзя преобразовать ссылку одного проекта на другой с GUID {0}, поскольку она отсутствует в файле "{1}".
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: эта система проектов Visual Studio не может выполнять преобразование проектов "{0}". Она может использоваться только для преобразования клиентских проектов C#, VB и VJ#.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: недопустимый атрибут "{0}" для элемента "{1}".
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: недопустимый дочерний элемент <{0}> элемента <{1}>.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: недопустимый элемент <{0}>.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: ссылки одного проекта на другой в веб-проектах больше не поддерживаются, и таким образом, не могут быть преобразованы. Удалите ссылку на проект {0} и добавьте ее повторно.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.tr.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.tr.xlf
deleted file mode 100644
index 46398f68e02..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.tr.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: Tüm projeleri içeren geçerli bir .SLN dosyası bulunamadığından, GUID değeri {0} olan projeden projeye başvuru dönüştürülemedi.
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: Projede boş bir .RESX dosyası bulundu ({0}). Bu dosya dönüştürülen projeden kaldırılıyor.
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: Özgün proje dosyasında <Exclude> öğesi bulundu. Bu, Visual Studio .NET'e dönüştürülemez; yoksayılıyor.
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: <{0}> öğesi gereken "{1}" özniteliğini içermiyor.
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: Yeni projenin dosya adı belirtilmelidir.
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: Eski projenin dosya adı belirtilmelidir.
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: <{0}> öğesi birden çok dil düğümü içeremez.
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: <{0}> öğesi öznitelik içeremez.
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: Proje dosyası <{0}> kök öğesini içermiyor.
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio "{0}" proje dosyasını bulamıyor.
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: GUID değeri {0} olan projeden projeye başvuru '{1}' dosyasında listelenmediğinden dönüştürülemiyor.
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: Bu Visual Studio proje sistemi "{0}" projelerini dönüştüremez. Bu yalnızca C#, VB ve VJ# istemci projelerini dönüştürmek için kullanılabilir.
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: <{1}> öğesinin "{0}" özniteliği geçerli değil.
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: <{1}> öğesinin <{0}> alt öğesi geçerli değil.
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: <{0}> öğesi geçerli değil.
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: Web projelerine yönelik projeden projeye yapılan başvurular artık desteklenmiyor ve bu nedenle dönüştürülemez. Lütfen {0} projesine yönelik başvuruyu kaldırın ve sonra yeniden ekleyin.
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.xlf
deleted file mode 100644
index b0867aebae9..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.xlf
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
-
- {StrBegin="MSB2013: "}
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- {StrBegin="MSB2016: "}
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- {StrBegin="MSB2015: "}
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- {StrBegin="MSB2014: "}
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- {StrBegin="MSB2012: "}
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hans.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hans.xlf
deleted file mode 100644
index e49ab19ee4d..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hans.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: 未能转换 GUID 为 {0} 的项目到项目引用,因为找不到包含所有项目的有效 .SLN 文件。
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: 在项目({0})中找到一个空的 .RESX 文件。 将从转换后的项目中将它移除。
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: 在原始项目文件中找到一个 <Exclude> 元素。 无法将它转换为 Visual Studio .NET,因此将它忽略。
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: 元素 <{0}> 未包含必需的特性“{1}”。
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: 必须指定新项目的文件名。
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: 必须指定旧项目的文件名。
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: 元素 <{0}> 不能包含多个语言节点。
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: 元素 <{0}> 不能包含特性。
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: 项目文件未包含根元素 <{0}>。
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio 找不到项目文件“{0}”。
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: 无法转换 GUID 为 {0} 的项目到项目引用,因为文件“{1}”中没有列出该引用。
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: 此 Visual Studio 项目系统无法转换“{0}”项目。 它只能用于转换 C#、VB 和 VJ# 客户端项目。
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: 元素 <{1}> 的特性“{0}”无效。
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: 元素 <{1}> 的子元素 <{0}> 无效。
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: 元素 <{0}> 无效。
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: 不再支持对 Web 项目的项目到项目引用,因此无法转换此类引用。 请移除对项目 {0} 的引用,然后重新添加它。
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hant.xlf b/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hant.xlf
deleted file mode 100644
index e99a3a187a1..00000000000
--- a/src/Deprecated/Conversion/Resources/xlf/Strings.zh-Hant.xlf
+++ /dev/null
@@ -1,169 +0,0 @@
-
-
-
-
-
- 231
- 107.05
- 107.05
- 0
- 0
-
-
- 0
- 26
- 112
- 0
- 0
- 93
- 0
-
-
-
-
-
- MSB2013: 無法轉換 GUID 為 {0} 的專案對專案間參考,因為找不到包含所有專案的有效 .SLN 檔。
- {StrBegin="MSB2013: "}
-
- MSB2013: Der Interprojektverweis mit der GUID {0} konnte nicht konvertiert werden, da keine gültige SLN-Datei mit allen Projekten gefunden wurde.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2016: 在專案 ({0}) 中找到空的 .RESX 檔。
- {StrBegin="MSB2016: "}
-
- MSB2016: Eine leere RESX-Datei wurde im Projekt "({0})" gefunden. Die Datei wird aus dem konvertierten Projekt entfernt.
-
- fuzzyMatch="100" wordcount="16" adjWordcount="4" curWordcount="4" tmLabel="N''"
-
-
-
- MSB2015: 在原始專案檔中找到 <Exclude> 項目。無法將它轉換為 Visual Studio .NET,已忽略。
- {StrBegin="MSB2015: "}
-
- MSB2015: Gefunden Sie ein < Exclude > Element in der Projektdatei. Dies kann nicht in Visual Studio .NET konvertiert werden und wird ignoriert.
-
- fuzzyMatch="15" wordcount="23" adjWordcount="19.55" curWordcount="19.55"
-
-
-
- MSB2001: 項目 <{0}> 未包含必要的屬性 "{1}"。
- {StrBegin="MSB2001: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2001: Element <{0}> enthält nicht das erforderliche Attribut "{1}".
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2002: 必須指定新專案的檔名。
- {StrBegin="MSB2002: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2002: Der Dateiname des neuen Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2003: 必須指定舊專案的檔名。
- {StrBegin="MSB2003: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2003: Der Dateiname des alten Projekts muss angegeben werden.
-
- fuzzyMatch="100" wordcount="11" adjWordcount="2.75" curWordcount="2.75" tmLabel="N''"
-
-
-
- MSB2004: 項目 <{0}> 不可以包含一個以上的語言節點。
- {StrBegin="MSB2004: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted. The {0} in this case is going to be "VisualStudioProject".
-
- MSB2004: Element <{0}> darf nicht mehr als einen Sprachknoten enthalten.
-
- fuzzyMatch="15" wordcount="11" adjWordcount="9.35" curWordcount="9.35"
-
-
-
- MSB2005: 項目 <{0}> 不可以包含屬性。
- {StrBegin="MSB2005: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2005: Element <{0}> darf keine Attribute enthalten.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2006: 專案檔未包含根項目 <{0}>。
- {StrBegin="MSB2006: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2006: Die Projektdatei enthält kein Stammelement <{0}>.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2007: Visual Studio 找不到專案檔 "{0}"。
- {StrBegin="MSB2007: "}This error shouldn't be possible when converting through Visual Studio, but we have it just in case.
-
- MSB2007: Die Projektdatei "{0}" wurde nicht gefunden.
-
- fuzzyMatch="100" wordcount="9" adjWordcount="2.25" curWordcount="2.25" tmLabel="N''"
-
-
-
- MSB2014: 無法轉換 GUID 為 {0} 的專案對專案間參考,因為它未列在檔案 '{1}' 中。
- {StrBegin="MSB2014: "}
-
- MSB2014: Der Interprojektverweis mit der GUID {0} kann nicht konvertiert werden, da er nicht in der Datei "{1}" enthalten ist.
-
- fuzzyMatch="100" wordcount="19" adjWordcount="4.75" curWordcount="4.75" tmLabel="N''"
-
-
-
- MSB2008: 這個 Visual Studio 專案系統無法轉換 "{0}" 專案。它只能用來轉換 C#、Visual Basic 和 Visual J# 用戶端專案。
- {StrBegin="MSB2008: "}It appears we've been asked to convert a project that either wasn't created by the Visual Studio managed client project system (C#, VB, J#), or that has been hand-modified or corrupted. You would get this error if this conversion utility was invoked on a VC++ project (.VCPROJ) for example. In this case, the {0} would be replaced with "Visual C++".
-
- MSB2008: Mit diesem Visual Studio-Projektsystem können keine {0}-Projekte konvertiert werden. Mit diesem System können nur C#-, VB- und VJ#-Clientprojekte konvertiert werden.
-
- fuzzyMatch="100" wordcount="23" adjWordcount="5.75" curWordcount="5.75" tmLabel="N''"
-
-
-
- MSB2009: 項目 <{1}> 的屬性 "{0}" 無效。
- {StrBegin="MSB2009: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2009: Das Attribut "{0}" des Elements <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="10" adjWordcount="8.5" curWordcount="8.5"
-
-
-
- MSB2010: 項目 <{1}> 的子項目 <{0}> 無效。
- {StrBegin="MSB2010: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2010: Untergeordnete Element <{0}> Element <{1}> ist ungültig.
-
- fuzzyMatch="15" wordcount="12" adjWordcount="10.2" curWordcount="10.2"
-
-
-
- MSB2011: 項目 <{0}> 無效。
- {StrBegin="MSB2011: "}It appears we've been asked to convert a project that either wasn't created by Visual Studio, or that has been hand-modified or corrupted.
-
- MSB2011: Element <{0}> ist ungültig.
-
- fuzzyMatch="15" wordcount="7" adjWordcount="5.95" curWordcount="5.95"
-
-
-
- MSB2012: 已不再支援 Web 專案的專案對專案間參考,所以無法轉換。請移除專案 {0} 的參考,然後再將它加入。
- {StrBegin="MSB2012: "}
-
- MSB2012: Interprojektverweise auf Webprojekte werden nicht mehr unterstützt und können daher nicht konvertiert werden. Entfernen Sie den Verweis auf das Projekt "{0}", und fügen Sie es erneut hinzu.
-
- fuzzyMatch="101" wordcount="26" adjWordcount="0" curWordcount="0" tmLabel="N''"
-
-
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Directory.Build.props b/src/Deprecated/Directory.Build.props
deleted file mode 100644
index 18fa095b5f7..00000000000
--- a/src/Deprecated/Directory.Build.props
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
- true
-
-
\ No newline at end of file
diff --git a/src/Deprecated/Engine.UnitTests/App.config.tt b/src/Deprecated/Engine.UnitTests/App.config.tt
deleted file mode 100644
index e6471619cb9..00000000000
--- a/src/Deprecated/Engine.UnitTests/App.config.tt
+++ /dev/null
@@ -1,40 +0,0 @@
-
-<#@ include file="BrandNames.tt" #>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Deprecated/Engine.UnitTests/BatchingEngine_Tests.cs b/src/Deprecated/Engine.UnitTests/BatchingEngine_Tests.cs
deleted file mode 100644
index affbc14d425..00000000000
--- a/src/Deprecated/Engine.UnitTests/BatchingEngine_Tests.cs
+++ /dev/null
@@ -1,308 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Xml;
-using System.Collections;
-using System.Text.RegularExpressions;
-
-using NUnit.Framework;
-
-using Microsoft.Build.BuildEngine;
-using System.Collections.Generic;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BatchingEngineTests
- {
- ///
- /// Helper method so we can keep the real Expander.ExpandItemsIntoString private.
- ///
- ///
- ///
- ///
- /// RGoel
- private static string ExpandItemsIntoString
- (
- ItemBucket bucket,
- string expression
- )
- {
-
- Expander itemExpander = new Expander(new ReadOnlyLookup(bucket.Lookup), null, ExpanderOptions.ExpandItems);
- return itemExpander.ExpandAllIntoString(expression, (new XmlDocument()).CreateAttribute("foo"));
- }
-
- ///
- /// Helper method so we can keep the real Expander.ExpandMetadataAndProperties private.
- ///
- ///
- ///
- ///
- /// RGoel
- private static string ExpandMetadataAndProperties
- (
- ItemBucket bucket,
- string expression
- )
- {
- Expander itemExpander = new Expander(bucket.Expander, ExpanderOptions.ExpandPropertiesAndMetadata);
- return itemExpander.ExpandAllIntoString(expression, (new XmlDocument()).CreateAttribute("foo"));
- }
-
- [Test]
- public void GetBuckets()
- {
- List parameters = new List();
- parameters.Add("@(File);$(unittests)");
- parameters.Add("$(obj)\\%(Filename).ext");
- parameters.Add("@(File->'%(extension)')"); // attributes in transforms don't affect batching
-
- Hashtable itemsByType = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- BuildItemGroup items = new BuildItemGroup();
- items.AddNewItem("File", "a.foo");
- items.AddNewItem("File", "b.foo");
- items.AddNewItem("File", "c.foo");
- items.AddNewItem("File", "d.foo");
- items.AddNewItem("File", "e.foo");
- itemsByType["FILE"] = items;
-
- items = new BuildItemGroup();
- items.AddNewItem("Doc", "a.doc");
- items.AddNewItem("Doc", "b.doc");
- items.AddNewItem("Doc", "c.doc");
- items.AddNewItem("Doc", "d.doc");
- items.AddNewItem("Doc", "e.doc");
- itemsByType["DOC"] = items;
-
- BuildPropertyGroup properties = new BuildPropertyGroup();
- properties.SetProperty("UnitTests", "unittests.foo");
- properties.SetProperty("OBJ", "obj");
-
- ArrayList buckets = BatchingEngine.PrepareBatchingBuckets(new XmlDocument().CreateElement("Foo"), parameters, CreateLookup(itemsByType, properties));
-
- Assertion.AssertEquals(5, buckets.Count);
-
- foreach (ItemBucket bucket in buckets)
- {
- // non-batching data -- same for all buckets
- XmlAttribute tempXmlAttribute = (new XmlDocument()).CreateAttribute("attrib");
- tempXmlAttribute.Value = "'$(Obj)'=='obj'";
-
- Assertion.Assert(BuildEngine.Utilities.EvaluateCondition(tempXmlAttribute.Value,
- tempXmlAttribute, bucket.Expander, null, ParserOptions.AllowAll, null, null));
- Assertion.AssertEquals("a.doc;b.doc;c.doc;d.doc;e.doc", ExpandItemsIntoString(bucket, "@(doc)"));
- Assertion.AssertEquals("unittests.foo", ExpandMetadataAndProperties(bucket, "$(bogus)$(UNITTESTS)"));
- }
-
- Assertion.AssertEquals("a.foo", ExpandItemsIntoString((ItemBucket)buckets[0], "@(File)"));
- Assertion.AssertEquals(".foo", ExpandItemsIntoString((ItemBucket)buckets[0], "@(File->'%(Extension)')"));
- Assertion.AssertEquals("obj\\a.ext", ExpandMetadataAndProperties((ItemBucket)buckets[0], "$(obj)\\%(Filename).ext"));
-
- // we weren't batching on this attribute, so it has no value
- Assertion.AssertEquals(String.Empty, ExpandMetadataAndProperties((ItemBucket)buckets[0], "%(Extension)"));
-
- items = ((ItemBucket)buckets[0]).Expander.ExpandSingleItemListExpressionIntoItemsLeaveEscaped("@(file)", null);
- Assertion.AssertNotNull(items);
- Assertion.AssertEquals(1, items.Count);
-
- int invalidProjectFileExceptions = 0;
- try
- {
- // This should throw because we don't allow item lists to be concatenated
- // with other strings.
- items = ((ItemBucket)buckets[0]).Expander.ExpandSingleItemListExpressionIntoItemsLeaveEscaped("@(file);$(unitests)", null);
- }
- catch (InvalidProjectFileException)
- {
- invalidProjectFileExceptions++;
- }
-
- // We do allow separators in item vectors, this results in an item group with a single flattened item
- items = ((ItemBucket)buckets[0]).Expander.ExpandSingleItemListExpressionIntoItemsLeaveEscaped("@(file, ',')", null);
- Assertion.AssertNotNull(items);
- Assertion.AssertEquals(1, items.Count);
- Assertion.AssertEquals("a.foo", items[0].FinalItemSpec);
-
- Assertion.AssertEquals(1, invalidProjectFileExceptions);
- }
-
- ///
- /// Tests the real simple case of using an unqualified metadata reference %(Culture),
- /// where there are only two items and both of them have a value for Culture, but they
- /// have different values.
- ///
- /// RGoel
- [Test]
- public void ValidUnqualifiedMetadataReference()
- {
- List parameters = new List();
- parameters.Add("@(File)");
- parameters.Add("%(Culture)");
-
- Hashtable itemsByType = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- BuildItemGroup items = new BuildItemGroup();
- itemsByType["FILE"] = items;
-
- BuildItem a = items.AddNewItem("File", "a.foo");
- BuildItem b = items.AddNewItem("File", "b.foo");
- a.SetMetadata("Culture", "fr-fr");
- b.SetMetadata("Culture", "en-en");
-
- BuildPropertyGroup properties = new BuildPropertyGroup();
-
- ArrayList buckets = BatchingEngine.PrepareBatchingBuckets(new XmlDocument().CreateElement("Foo"), parameters, CreateLookup(itemsByType, properties));
- Assertion.AssertEquals(2, buckets.Count);
- }
-
- ///
- /// Tests the case where an unqualified metadata reference is used illegally.
- /// It's illegal because not all of the items consumed contain a value for
- /// that metadata.
- ///
- /// RGoel
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidUnqualifiedMetadataReference()
- {
- List parameters = new List();
- parameters.Add("@(File)");
- parameters.Add("%(Culture)");
-
- Hashtable itemsByType = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- BuildItemGroup items = new BuildItemGroup();
- itemsByType["FILE"] = items;
-
- BuildItem a = items.AddNewItem("File", "a.foo");
- BuildItem b = items.AddNewItem("File", "b.foo");
- a.SetMetadata("Culture", "fr-fr");
-
- BuildPropertyGroup properties = new BuildPropertyGroup();
-
- // This is expected to throw because not all items contain a value for metadata "Culture".
- // Only a.foo has a Culture metadata. b.foo does not.
- ArrayList buckets = BatchingEngine.PrepareBatchingBuckets(new XmlDocument().CreateElement("Foo"), parameters, CreateLookup(itemsByType, properties));
- }
-
- ///
- /// Tests the case where an unqualified metadata reference is used illegally.
- /// It's illegal because not all of the items consumed contain a value for
- /// that metadata.
- ///
- /// RGoel
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void NoItemsConsumed()
- {
- List parameters = new List();
- parameters.Add("$(File)");
- parameters.Add("%(Culture)");
-
- Hashtable itemsByType = new Hashtable(StringComparer.OrdinalIgnoreCase);
- BuildPropertyGroup properties = new BuildPropertyGroup();
-
- // This is expected to throw because we have no idea what item list %(Culture) refers to.
- ArrayList buckets = BatchingEngine.PrepareBatchingBuckets(new XmlDocument().CreateElement("Foo"), parameters, CreateLookup(itemsByType, properties));
- }
-
- ///
- /// Missing unittest found by mutation testing.
- /// REASON TEST WASN'T ORIGINALLY PRESENT: Missed test.
- ///
- /// This test ensures that two items with duplicate attributes end up in exactly one batching
- /// bucket.
- ///
- [Test]
- public void Regress_Mutation_DuplicateBatchingBucketsAreFoldedTogether()
- {
- List parameters = new List();
- parameters.Add("%(File.Culture)");
-
- Hashtable itemsByType = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- BuildItemGroup items = new BuildItemGroup();
- items.AddNewItem("File", "a.foo");
- items.AddNewItem("File", "b.foo"); // Need at least two items for this test case to ensure multiple buckets might be possible
- itemsByType["FILE"] = items;
-
- BuildPropertyGroup properties = new BuildPropertyGroup();
-
- ArrayList buckets = BatchingEngine.PrepareBatchingBuckets(new XmlDocument().CreateElement("Foo"), parameters, CreateLookup(itemsByType, properties));
-
- // If duplicate buckes have been folded correctly, then there will be exactly one bucket here
- // containing both a.foo and b.foo.
- Assertion.AssertEquals(1, buckets.Count);
- }
-
- [Test]
- public void Simple()
- {
- MockLogger log = ObjectModelHelpers.BuildProjectExpectSuccess(@"
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- log.AssertLogContains("[AToBBatched: a;b]");
- }
-
- ///
- /// Regression test for bug 528104. It is important that the batching engine invokes
- /// the different batches in the same order as the items are declared in the project, especially
- /// when batching is simply being used as a "for loop".
- ///
- /// RGoel
- [Test]
- public void BatcherPreservesItemOrderWithinASingleItemList()
- {
- MockLogger log = ObjectModelHelpers.BuildProjectExpectSuccess(@"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ");
-
- log.AssertLogContains("AToZBatched: a;b;c;d;e;f;g;h;i;j;k;l;m;n;o;p;q;r;s;t;u;v;w;x;y;z");
- log.AssertLogContains("ZToABatched: z;y;x;w;v;u;t;s;r;q;p;o;n;m;l;k;j;i;h;g;f;e;d;c;b;a");
- }
-
- private static Lookup CreateLookup(Hashtable itemsByType, BuildPropertyGroup properties)
- {
- return new Lookup(itemsByType, properties, new ItemDefinitionLibrary(new Project()));
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildItemDefinitionGroupXml_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildItemDefinitionGroupXml_Tests.cs
deleted file mode 100644
index 98e5575a033..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildItemDefinitionGroupXml_Tests.cs
+++ /dev/null
@@ -1,1086 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using System.Xml;
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.BuildEngine.Shared;
-using Metadatum = System.Collections.Generic.KeyValuePair;
-using MetadataDictionary = System.Collections.Generic.Dictionary;
-using ItemDefinitionsDictionary = System.Collections.Generic.Dictionary>;
-using System.IO;
-using System.Reflection;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildItemDefinitionGroupXml_Tests
- {
- [Test]
- public void Basic()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- Assertion.AssertEquals(1, definitions.GetDefaultedMetadataCount("CCompile"));
- Assertion.AssertEquals("DEBUG", definitions.GetDefaultMetadataValue("CCompile", "Defines"));
- }
-
- [Test]
- public void DuplicateMetadataLastOneWins()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlElement meta2 = XmlTestUtilities.AddChildElement(group.ChildNodes[0], "Defines");
- meta2.InnerText = "RETAIL";
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- Assertion.AssertEquals(1, definitions.GetDefaultedMetadataCount("CCompile"));
- Assertion.AssertEquals("RETAIL", definitions.GetDefaultMetadataValue("CCompile", "Defines"));
- }
-
- [Test]
- public void NoDefinitions()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- group.RemoveAll();
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- // No exception
- Assertion.AssertEquals(0, definitions.GetDefaultedMetadataCount("arbitrary"));
- }
-
- [Test]
- public void NoMetadata()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- group.ChildNodes[0].RemoveAll();
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- // No exception
- Assertion.AssertEquals(0, definitions.GetDefaultedMetadataCount("arbitrary"));
- }
-
- [Test]
- public void FalseConditionOnGroup()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group, "Condition", "'v2'=='$(p1)'");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- // No exception
- Assertion.AssertEquals(0, definitions.GetDefaultedMetadataCount("arbitrary"));
- }
-
- [Test]
- public void FalseConditionOnDefinition()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0], "Condition", "'v2'=='$(p1)'");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- // No exception
- Assertion.AssertEquals(0, definitions.GetDefaultedMetadataCount("arbitrary"));
- }
-
- [Test]
- public void FalseConditionOnMetadatum()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0].ChildNodes[0], "Condition", "'v2'=='$(p1)'");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- // No exception
- Assertion.AssertEquals(0, definitions.GetDefaultedMetadataCount("arbitrary"));
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidAttributeOnGroup()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group, "XXXX", "YYY");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidIncludeAttributeOnDefinition()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0], "Include", "YYY");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidExcludeAttributeOnDefinition()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0], "Exclude", "YYY");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidRemoveAttributeOnDefinition()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0], "Remove", "YYY");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidAttributeOnMetadatum()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0].ChildNodes[0], "XXXX", "YYY");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
- }
-
- [Test]
- public void ExpandPropertiesInMetadatumValue()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- group["CCompile"]["Defines"].InnerText = "A_$(p1)_$(p2)_B";
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- Assertion.AssertEquals(1, definitions.GetDefaultedMetadataCount("CCompile"));
- Assertion.AssertEquals("A_v1__B", definitions.GetDefaultMetadataValue("CCompile", "Defines"));
- }
-
- [Test]
- public void TrueConditionOnEverything()
- {
- XmlElement group = GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum();
- XmlTestUtilities.AddAttribute(group.ChildNodes[0], "Condition", "'v1'=='$(p1)'");
- XmlTestUtilities.AddAttribute(group.ChildNodes[0].ChildNodes[0], "Condition", "'v1'=='$(p1)'");
- XmlTestUtilities.AddAttribute(group.ChildNodes[0].ChildNodes[0], "Condition", "'v1'=='$(p1)'");
- ItemDefinitionLibrary definitions = NewAndEvaluateItemDefinitionLibraryXml(group);
-
- Assertion.AssertEquals(1, definitions.GetDefaultedMetadataCount("CCompile"));
- Assertion.AssertEquals("DEBUG", definitions.GetDefaultMetadataValue("CCompile", "Defines"));
- }
-
- #region Project tests
-
- [Test]
- public void BasicItemDefinitionInProject()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- DEBUG
-
-
-
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[a.cpp==DEBUG]", "[b.cpp==DEBUG]");
- }
-
- [Test]
- public void EscapingInItemDefinitionInProject()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- %24(xyz)
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[$(xyz)]");
- }
-
-
- [Test]
- public void ItemDefinitionForOtherItemType()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[]");
- }
-
- [Test]
- public void RedefinitionLastOneWins()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
- n1
-
-
-
-
- m2
- o1
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2-n1-o1]");
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void ItemExpressionInDefaultMetadataValueErrors()
- {
- // We don't allow item expressions on an ItemDefinitionGroup because there are no items when IDG is evaluated.
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- @(x)
-
-
-
- ", logger);
- p.Build("t");
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void UnqualifiedMetadataConditionOnItemDefinitionGroupErrors()
- {
- // We don't allow unqualified metadata on an ItemDefinitionGroup because we don't know what item type it refers to.
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- ", logger);
- p.Build("t");
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void QualifiedMetadataConditionOnItemDefinitionGroupErrors()
- {
- // We don't allow qualified metadata because it's not worth distinguishing from unqualified, when you can just move the condition to the child.
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- ", logger);
- p.Build("t");
- }
-
- [Test]
- public void MetadataConditionOnItemDefinition()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
-
- m1
-
-
- n1
-
-
-
-
- m2
-
-
-
- n2
-
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2]", "[n2]");
- }
-
- [Test]
- public void QualifiedMetadataConditionOnItemDefinitionBothQualifiedAndUnqualified()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
- m2
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2]");
- }
-
- [Test]
- public void FalseMetadataConditionOnItemDefinitionBothQualifiedAndUnqualified()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
- m3
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m1]");
- }
-
- [Test]
- public void MetadataConditionOnItemDefinitionChildBothQualifiedAndUnqualified()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
- n1
-
-
-
-
- m2
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2]");
- }
-
- [Test]
- public void FalseMetadataConditionOnItemDefinitionChildBothQualifiedAndUnqualified()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
- n1
-
-
-
-
- m3
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m1]");
- }
-
- [Test]
- public void MetadataConditionOnItemDefinitionAndChildQualifiedWithUnrelatedItemType()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
- m2
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2]");
- }
-
- ///
- /// Make ItemDefinitionGroup inside a target produce a nice error.
- /// It will normally produce an error due to the invalid child tag, but
- /// we want to error even if there's no child tag. This will make it
- /// easier to support it inside targets in a future version.
- ///
- [Test]
- public void ItemDefinitionInTargetErrors()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
- ", logger);
- bool result = p.Build("t");
-
- Assertion.AssertEquals(false, result);
- logger.AssertLogContains("MSB4163");
- }
-
- // Verify that anyone with a task named "ItemDefinitionGroup" can still
- // use it by fully qualifying the name.
- [Test]
- public void ItemDefinitionGroupTask()
- {
- MockLogger ml = ObjectModelHelpers.BuildProjectExpectSuccess(String.Format(@"
-
-
-
-
-
-
- ", new Uri(Assembly.GetExecutingAssembly().EscapedCodeBase).LocalPath));
-
- Assertion.Assert(ml.FullLog.Contains("In ItemDefinitionGroup task."));
- }
-
- [Test]
- public void MetadataOnItemWins()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- RETAIL
-
-
-
-
-
- DEBUG
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[a.cpp==RETAIL]", "[b.cpp==DEBUG]");
- }
-
- [Test]
- public void MixtureOfItemAndDefaultMetadata()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- 4
-
-
-
-
- DEBUG
-
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[a.cpp==DEBUG]", "[a.cpp==4]");
- }
-
- [Test]
- public void IntrinsicTaskModifyingDefaultMetadata()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
-
- m2
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[m2]");
-
- BuildItemGroup group = p.GetEvaluatedItemsByName("i");
- BuildItem item = group[0];
- string metadataValue = item.GetMetadata("m");
- Assertion.AssertEquals("m2", metadataValue);
-
- p.ResetBuildStatus();
-
- // Should go back to definition
- group = p.GetEvaluatedItemsByName("i");
- item = group[0];
- metadataValue = item.GetMetadata("m");
- Assertion.AssertEquals("m1", metadataValue);
- }
-
- [Test]
- public void IntrinsicTaskConsumingDefaultMetadata()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
-
- n2
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[n2]");
- }
-
- [Test]
- public void DefinitionInImportedFile()
- {
- MockLogger logger = new MockLogger();
- string importedFile = null;
-
- try
- {
- importedFile = Path.GetTempFileName();
- File.WriteAllText(importedFile, @"
-
-
-
- DEBUG
-
-
-
- ");
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
-
-
-
- ", logger);
- p.Build("t");
-
- logger.AssertLogContains("[a.cpp==DEBUG]");
- }
- finally
- {
- ObjectModelHelpers.DeleteTempFiles(new string[] { importedFile });
- }
- }
-
- ///
- /// Item added to project should pick up the item
- /// definitions that project has.
- [Test]
- public void ProjectAddNewItemPicksUpProjectItemDefinitions()
- {
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
-
-
-
- ");
-
- BuildItem item = p.AddNewItem("i", "i1");
-
- Assertion.AssertEquals("m1", item.GetEvaluatedMetadata("m"));
- }
-
- ///
- /// Item added to project should pick up the item
- /// definitions that project has.
- [Test]
- public void ProjectAddNewItemExistingGroupPicksUpProjectItemDefinitions()
- {
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
-
-
-
-
- m2
-
-
-
- ");
-
- BuildItem item1 = p.EvaluatedItems[0];
- BuildItem item2a = p.AddNewItem("i", "i1");
- BuildItem item2b = p.EvaluatedItems[0];
-
- Assertion.AssertEquals("m2", item1.GetEvaluatedMetadata("m"));
- Assertion.AssertEquals("m1", item2a.GetEvaluatedMetadata("m"));
- Assertion.AssertEquals("m1", item2b.GetEvaluatedMetadata("m"));
- }
-
- [Test]
- public void ItemsEmittedByTaskPickUpItemDefinitions()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- n1
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1][n2]");
- }
-
- [Test]
- public void ItemsEmittedByIntrinsicTaskPickUpItemDefinitions()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- n1
-
-
-
-
-
- n2
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1][n2]");
- }
-
- [Test]
- public void MutualReferenceToDefinition1()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- ~%(m)~
-
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1][~m1~]");
- }
-
- [Test]
- public void MutualReferenceToDefinition2()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- ~%(n)~
- n1
-
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[~~][n1]");
- }
-
- [Test]
- public void MutualReferenceToDefinition3()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- %(i.m)
- %(j.m)
-
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1][m1][]");
- }
-
- [Test]
- public void ProjectReevaluationReevaluatesItemDefinitions()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
- CODEANALYSIS
-
-
-
-
-
-
- $(Defines);RETAIL
- $(Defines);DEBUG
-
-
-
-
-
-
- ", logger);
-
- p.SetProperty("BuildFlavor", "ret");
-
- p.Build("t");
-
- logger.AssertLogContains("[a.cpp==CODEANALYSIS;RETAIL]");
-
- BuildItemGroup group = p.GetEvaluatedItemsByName("CppCompile");
- BuildItem item = group[0];
- string metadataValue = item.GetMetadata("Defines");
- Assertion.AssertEquals("CODEANALYSIS;RETAIL", metadataValue);
-
- p.SetProperty("BuildFlavor", "chk");
-
- group = p.GetEvaluatedItemsByName("CppCompile");
- item = group[0];
- metadataValue = item.GetMetadata("Defines");
-
- Assertion.AssertEquals("CODEANALYSIS;DEBUG", metadataValue);
- }
-
- [Test]
- public void MSBuildCallDoesNotAffectCallingProjectsDefinitions()
- {
- string otherProject = null;
-
- try
- {
- otherProject = Path.GetTempFileName();
- string otherProjectContent = @"
-
-
-
-
-
- m2
-
-
-
-
-
- ";
-
- using (StreamWriter writer = new StreamWriter(otherProject))
- {
- writer.Write(otherProjectContent);
- }
-
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
- m1
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[PARENT-before:m1]", "[CHILD:m2]", "[PARENT-after:m1]");
- }
- finally
- {
- File.Delete(otherProject);
- }
- }
-
- [Test]
- public void DefaultMetadataTravelWithTargetOutputs()
- {
- string otherProject = null;
-
- try
- {
- otherProject = Path.GetTempFileName();
- string otherProjectContent = @"
-
-
- m1
-
-
-
-
- n1
-
-
-
-
-
- ";
-
- using (StreamWriter writer = new StreamWriter(otherProject))
- {
- writer.Write(otherProjectContent);
- }
-
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[CHILD:i1:m=m1,n=n1]", "[PARENT:i1:m=m1,n=n1]");
- }
- finally
- {
- File.Delete(otherProject);
- }
- }
-
- #endregion
-
- #region Helpers
-
- private static ItemDefinitionLibrary NewAndEvaluateItemDefinitionLibraryXml(XmlElement group)
- {
- ItemDefinitionLibrary library = new ItemDefinitionLibrary(new Project());
- library.Add(group);
-
- BuildPropertyGroup properties = new BuildPropertyGroup();
- properties.SetProperty("p1", "v1");
- library.Evaluate(properties);
-
- return library;
- }
-
- internal static XmlElement GetBasicItemDefinitionGroupWithOneDefinitionAndOneMetadatum()
- {
- XmlElement group = XmlTestUtilities.CreateBasicElement("ItemDefinitionGroup");
- XmlElement item = XmlTestUtilities.AddChildElement(group, "CCompile");
- XmlTestUtilities.AddChildElementWithInnerText(item, "Defines", "DEBUG");
- return group;
- }
-
- #endregion
- }
-
- public class ItemDefinitionGroup : Microsoft.Build.Utilities.Task
- {
- public override bool Execute()
- {
- Log.LogMessage("In ItemDefinitionGroup task.");
- return true;
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildItemGroupChildXml_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildItemGroupChildXml_Tests.cs
deleted file mode 100644
index 0fd52f93013..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildItemGroupChildXml_Tests.cs
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using System.Xml;
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.BuildEngine.Shared;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildItemGroupChildXml_Tests
- {
- [Test]
- public void ParseBasicRemoveOperation()
- {
- XmlElement xml = CreateBasicRemoveElement();
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemRemove);
-
- Assertion.AssertEquals("i1", child.Remove);
- }
-
- [Test]
- public void ExpectAnyGetModify()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElement("i");
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.Any);
-
- Assertion.AssertEquals(ChildType.BuildItemModify, child.ChildType);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void ExpectAddGetRemove()
- {
- XmlElement xml = CreateBasicRemoveElement();
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemAdd);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void ExpectRemoveGetAdd()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Include", "i1");;
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemRemove);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void ExpectModifyGetAdd()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Include", "i1"); ;
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemModify);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void ExpectModifyGetRemove()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Remove", "i1"); ;
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemModify);
- }
-
- [Test]
- [ExpectedException(typeof(InternalErrorException))]
- public void ExpectInvalid()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Include", "i1");
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.Invalid);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidIncludeAndRemoveTogether()
- {
- XmlElement xml = CreateBasicRemoveElement();
- xml.SetAttribute("Include", "i2");
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemRemove);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidExcludeWithoutInclude()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Exclude", "i1");
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemAdd);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidRemoveWithSomeMetadataChildren()
- {
- XmlElement xml = CreateBasicRemoveElement();
- XmlElement child1 = xml.OwnerDocument.CreateElement("m", XMakeAttributes.defaultXmlNamespace);
- child1.InnerText = "m1";
- xml.AppendChild(child1);
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemRemove);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidlyNamedMetadata()
- {
- XmlElement xml = XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Include", "i1");
- XmlElement child1 = xml.OwnerDocument.CreateElement("m", XMakeAttributes.defaultXmlNamespace);
- XmlElement child2 = xml.OwnerDocument.CreateElement("Filename", XMakeAttributes.defaultXmlNamespace);
- xml.AppendChild(child1);
- xml.AppendChild(child2);
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemAdd);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void RemoveAttributeMissing()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement element = doc.CreateElement("i", XMakeAttributes.defaultXmlNamespace);
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(element, ChildType.BuildItemRemove);
- }
-
- [Test]
- public void ParseModify()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement element = doc.CreateElement("i", XMakeAttributes.defaultXmlNamespace);
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(element, ChildType.BuildItemModify);
-
- Assertion.AssertEquals(ChildType.BuildItemModify, child.ChildType);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidExcludeAndRemoveTogether()
- {
- XmlElement xml = CreateBasicRemoveElement();
- xml.SetAttribute("Exclude", "i2");
- BuildItemGroupChildXml child = new BuildItemGroupChildXml(xml, ChildType.BuildItemRemove);
- }
-
- private static XmlElement CreateBasicRemoveElement()
- {
- return XmlTestUtilities.CreateBasicElementWithOneAttribute("i", "Remove", "i1");
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildItemGroupProxy_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildItemGroupProxy_Tests.cs
deleted file mode 100644
index 62ba6089195..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildItemGroupProxy_Tests.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using Microsoft.Build.Framework;
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.BuildEngine.Shared;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class ItemGroupProxy_Tests
- {
- [Test]
- public void BasicProxying()
- {
- BuildItemGroup ig = new BuildItemGroup();
- BuildItem i1 = new BuildItem("name1", "value1");
- i1.SetMetadata("myMetaName", "myMetaValue");
- BuildItem i2 = new BuildItem("name2", "value2");
- ig.AddItem(i1);
- ig.AddItem(i2);
-
- BuildItemGroupProxy proxy = new BuildItemGroupProxy(ig);
-
- // Gather everything into our own table
- Hashtable list = new Hashtable(StringComparer.OrdinalIgnoreCase);
- foreach (DictionaryEntry item in proxy)
- {
- list.Add(item.Key, item.Value);
- }
-
- // Check we got all the items
- Assertion.AssertEquals(2, list.Count);
- Assertion.AssertEquals("value1", ((TaskItem)list["name1"]).ItemSpec);
- Assertion.AssertEquals("value2", ((TaskItem)list["name2"]).ItemSpec);
-
- // Check they have all their metadata
- int builtInMetadata = FileUtilities.ItemSpecModifiers.All.Length;
- Assertion.AssertEquals(1 + builtInMetadata, ((TaskItem)list["name1"]).MetadataCount);
- Assertion.AssertEquals(0 + builtInMetadata, ((TaskItem)list["name2"]).MetadataCount);
- Assertion.AssertEquals("myMetaValue", ((TaskItem)list["name1"]).GetMetadata("myMetaName"));
- }
-
- [Test]
- public void CantModifyThroughEnumerator()
- {
- BuildItemGroup ig = new BuildItemGroup();
- BuildItem i1 = new BuildItem("name1", "value1");
- i1.SetMetadata("myMetaName", "myMetaValue");
- ig.AddItem(i1);
-
- BuildItemGroupProxy proxy = new BuildItemGroupProxy(ig);
-
- Hashtable list = new Hashtable(StringComparer.OrdinalIgnoreCase);
- foreach (DictionaryEntry item in proxy)
- {
- list.Add(item.Key, item.Value);
- }
-
- // Change the item
- Assertion.AssertEquals("value1", ((TaskItem)list["name1"]).ItemSpec);
- ((TaskItem)list["name1"]).ItemSpec = "newItemSpec";
- ((TaskItem)list["name1"]).SetMetadata("newMetadata", "newMetadataValue");
-
- // We did change our copy
- Assertion.AssertEquals("newItemSpec", ((TaskItem)list["name1"]).ItemSpec);
- Assertion.AssertEquals("newMetadataValue", ((TaskItem)list["name1"]).GetMetadata("newMetadata"));
- Assertion.AssertEquals("myMetaValue", ((TaskItem)list["name1"]).GetMetadata("myMetaName"));
-
- // But get the item again
- list = new Hashtable(StringComparer.OrdinalIgnoreCase);
- foreach (DictionaryEntry item in proxy)
- {
- list.Add(item.Key, item.Value);
- }
-
- // Item value and metadata hasn't changed
- Assertion.AssertEquals("value1", ((TaskItem)list["name1"]).ItemSpec);
- Assertion.AssertEquals("", ((TaskItem)list["name1"]).GetMetadata("newMetadata"));
- Assertion.AssertEquals("myMetaValue", ((TaskItem)list["name1"]).GetMetadata("myMetaName"));
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildItemGroup_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildItemGroup_Tests.cs
deleted file mode 100644
index 423558040e6..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildItemGroup_Tests.cs
+++ /dev/null
@@ -1,578 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using Microsoft.Build.Framework;
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.BuildEngine.Shared;
-using System.Xml;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildItemGroup_Tests
- {
- [Test]
- public void ParameterlessConstructor()
- {
- BuildItemGroup group = new BuildItemGroup();
- Assertion.AssertEquals(String.Empty, group.Condition);
- Assertion.AssertEquals(false, group.IsPersisted);
- Assertion.AssertEquals(0, group.Count);
- Assertion.AssertEquals(false, group.IsImported);
- }
-
- [Test]
- public void XmlDocConstructor()
- {
- XmlDocument doc = new XmlDocument();
- BuildItemGroup group = new BuildItemGroup(doc, true, new Project());
- Assertion.AssertEquals(String.Empty, group.Condition);
- Assert.AreNotEqual(null, group.ItemGroupElement);
- Assertion.AssertEquals(0, group.Count);
- Assertion.AssertEquals(true, group.IsImported);
- }
-
- [Test]
- [ExpectedException(typeof(InternalErrorException))]
- public void XmlDocConstructor2()
- {
- BuildItemGroup group = new BuildItemGroup((XmlDocument)null, true, new Project());
- }
-
- [Test]
- public void XmlElementConstructor()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
-
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
- Assertion.AssertEquals("c", group.Condition);
- Assertion.AssertEquals(ig, group.ItemGroupElement);
- Assertion.AssertEquals(ig.ParentNode, group.ParentElement);
- Assertion.AssertEquals(2, group.Count);
- Assertion.AssertEquals(false, group.IsImported);
- Assertion.AssertEquals("ci1", group[0].Condition);
- Assertion.AssertEquals("i1", group[0].Include);
- Assertion.AssertEquals("ci2", group[1].Condition);
- Assertion.AssertEquals("i2", group[1].Include);
- }
-
- private static XmlElement CreatePersistedItemGroupElement()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement ig = doc.CreateElement("ItemGroup", XMakeAttributes.defaultXmlNamespace);
- XmlAttribute condition = doc.CreateAttribute("Condition");
- condition.Value = "c";
- ig.SetAttributeNode(condition);
-
- XmlElement item1 = doc.CreateElement("i", XMakeAttributes.defaultXmlNamespace);
- XmlAttribute condition1 = doc.CreateAttribute("Condition");
- condition1.Value = "ci1";
- item1.SetAttributeNode(condition1);
- XmlAttribute include1 = doc.CreateAttribute("Include");
- include1.Value = "i1";
- item1.SetAttributeNode(include1);
- ig.AppendChild(item1);
-
- XmlElement item2 = doc.CreateElement("i", XMakeAttributes.defaultXmlNamespace);
- XmlAttribute condition2 = doc.CreateAttribute("Condition");
- condition2.Value = "ci2";
- item2.SetAttributeNode(condition2);
- XmlAttribute include2 = doc.CreateAttribute("Include");
- include2.Value = "i2";
- item2.SetAttributeNode(include2);
- ig.AppendChild(item2);
- return ig;
- }
-
- [Test]
- [ExpectedException(typeof(InternalErrorException))]
- public void XmlElementConstructor2()
- {
- BuildItemGroup group = new BuildItemGroup((XmlElement)null, true, new Project());
- }
-
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void XmlElementConstructor3()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement ig = doc.CreateElement("ItemGroup", XMakeAttributes.defaultXmlNamespace);
- XmlAttribute a = doc.CreateAttribute("x");
- ig.SetAttributeNode(a);
-
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
- }
-
- [Test]
- [ExpectedException(typeof(InternalErrorException))]
- public void XmlElementConstructor4()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement ig = doc.CreateElement("x", XMakeAttributes.defaultXmlNamespace);
- BuildItemGroup group = new BuildItemGroup(ig, true, new Project());
- }
-
- [Test]
- [ExpectedException(typeof(InvalidOperationException))]
- public void SetConditionOnVirtualGroup()
- {
- BuildItemGroup group = new BuildItemGroup();
- group.Condition = "x";
- }
-
- [Test]
- [ExpectedException(typeof(InvalidOperationException))]
- public void SetConditionOnImportedGroup()
- {
- XmlDocument doc = new XmlDocument();
- BuildItemGroup group = new BuildItemGroup(doc, true, new Project());
- group.Condition = "x";
- }
-
- [Test]
- public void SetNullCondition()
- {
- XmlDocument doc = new XmlDocument();
- BuildItemGroup group = new BuildItemGroup(doc, false, new Project());
- group.Condition = null;
- Assertion.AssertEquals(String.Empty, group.Condition);
- }
-
- [Test]
- public void SetEmptyCondition()
- {
- XmlDocument doc = new XmlDocument();
- BuildItemGroup group = new BuildItemGroup(doc, false, new Project());
- group.Condition = String.Empty;
- Assertion.AssertEquals(String.Empty, group.Condition);
- }
-
- [Test]
- public void SetCondition()
- {
- XmlDocument doc = new XmlDocument();
- BuildItemGroup group = new BuildItemGroup(doc, false, new Project());
- group.Condition = "x";
- Assertion.AssertEquals("x", group.Condition);
- }
-
- [Test]
- public void ToArray()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
- BuildItem[] array = group.ToArray();
-
- Assertion.AssertEquals(2, array.Length);
- Assertion.AssertEquals("i1", array[0].Include);
- Assertion.AssertEquals("i2", array[1].Include);
- }
-
- [Test]
- public void Enumerator()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- List items = new List();
- foreach (BuildItem item in group)
- {
- items.Add(item);
- }
-
- Assertion.AssertEquals(2, items.Count);
- Assertion.AssertEquals("i1", items[0].Include);
- Assertion.AssertEquals("i2", items[1].Include);
- }
-
- [Test]
- public void AddNewItem1()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- group.AddNewItem("j", "j1");
- group.AddNewItem("j", "j2;", true /*literal*/);
-
- Assertion.AssertEquals(4, group.Count);
- Assertion.AssertEquals("j1", group[2].Include);
- Assertion.AssertEquals("j2%3b", group[3].Include);
- }
-
- ///
- /// Adding an existing item should cause it to pick up
- /// the project's item definitions
- ///
- [Test]
- public void AddExistingItemAt()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
-
-
-
- ", logger);
-
- BuildItemGroup group = p.AddNewItemGroup();
- BuildItem item = new BuildItem("i", "i1");
- group.AddExistingItemAt(0, item);
- Expander expander = new Expander(new BuildPropertyGroup());
- item.EvaluateAllItemMetadata(expander, ParserOptions.AllowPropertiesAndItemLists, null, null);
-
- Assertion.AssertEquals("m1", item.GetMetadata("m"));
- }
-
- ///
- /// Metadata should be able to refer to metadata above
- ///
- [Test]
- public void MutualReferenceToMetadata()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- %(m);m2
- %(m);m3
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1;m2]");
- }
-
- ///
- /// Metadata should be able to refer to metadata above
- ///
- [Test]
- public void MutualReferenceToMetadataQualified()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
- %(i.m);m2
- %(m);m3
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1;m2]");
- }
-
- ///
- /// Metadata should be able to refer to metadata above
- ///
- [Test]
- public void MutualReferenceToMetadataMixed()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- l1
-
-
-
-
- overridden
- m1
- %(l);%(i.l);n1;%(m);%(i.m);%(o);%(i.o);n2
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[l1;l1;n1;m1;m1;;;n2]");
- }
-
- ///
- /// Metadata should be able to refer to metadata definitions
- ///
- [Test]
- public void MetadataReferenceToMetadataDefinition()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- m1
-
-
-
-
- %(m);m2
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[m1;m2]");
- }
-
- ///
- /// Escaping metadata should prevent it being evaluated
- ///
- [Test]
- public void EscapedMetadataReference()
- {
- MockLogger logger = new MockLogger();
- Project p = ObjectModelHelpers.CreateInMemoryProject(@"
-
-
-
- %25(m)
-
-
-
-
-
-
- ", logger);
-
- p.Build("t");
-
- logger.AssertLogContains("[%(m)]");
- }
-
- [Test]
- public void RemoveItem1()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem i2 = group[1];
- group.RemoveItem(i2);
-
- Assertion.AssertEquals(1, group.Count);
- Assertion.AssertEquals(1, group.ItemGroupElement.ChildNodes.Count);
- Assertion.AssertEquals("i1", group[0].Include);
- Assertion.AssertEquals(null, i2.ParentPersistedItemGroup);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidOperationException))]
- public void RemoveItemNotBelonging()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem item = new BuildItem("x", "x1");
- group.RemoveItem(item);
- }
-
- [Test]
- public void RemoveItemAt1()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem i2 = group[1];
- group.RemoveItemAt(1);
-
- Assertion.AssertEquals(1, group.Count);
- Assertion.AssertEquals(1, group.ItemGroupElement.ChildNodes.Count);
- Assertion.AssertEquals("i1", group[0].Include);
- Assertion.AssertEquals(null, i2.ParentPersistedItemGroup);
- }
-
- // Can't shallow clone a persisted item group
- [Test]
- [ExpectedException(typeof(InvalidOperationException))]
- public void ShallowCloneOfPersistedItemGroup()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItemGroup clone = group.Clone(false);
- }
-
- [Test]
- public void DeepCloneOfPersistedItemGroup()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItemGroup clone = group.Clone(true);
-
- Assertion.AssertEquals(2, clone.Count);
- Assert.AreNotEqual(group.ItemGroupElement, clone.ItemGroupElement);
- Assert.AreNotEqual(group.ParentProject, clone.ParentProject);
- }
-
- [Test]
- public void ShallowCloneOfVirtualItemGroup()
- {
- BuildItemGroup group = new BuildItemGroup();
- group.AddNewItem("i", "i1");
- BuildItem i2 = new BuildItem("i", "i2");
- group.AddItem(i2);
-
- BuildItemGroup group2 = group.Clone(false /*shallow*/);
-
- Assertion.AssertEquals(2, group2.Count);
- Assertion.AssertEquals("i1", group2[0].FinalItemSpec);
- Assertion.Assert(i2.Equals(group2[1]));
- }
-
- [Test]
- public void Clear()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem i1 = group[0];
- group.Clear();
-
- Assertion.AssertEquals(0, group.Count);
- Assertion.AssertEquals(0, ig.ChildNodes.Count);
- Assertion.AssertEquals(null, i1.ParentPersistedItemGroup);
- }
-
- [Test]
- public void RemoveAllIntermediateItems1()
- {
- BuildItemGroup group = new BuildItemGroup(); // virtual group
- XmlElement element = CreatePersistedItemGroupElement();
-
- BuildItem item1 = CreatePersistedBuildItem(element, "i", "i1");
- BuildItem item2 = CreatePersistedBuildItem(element, "i", "i2");
- group.AddExistingItem(item1);
- group.AddExistingItem(item2);
- group.AddNewItem("j", "j1");
- Assertion.AssertEquals(3, group.Count);
-
- group.RemoveAllIntermediateItems();
- Assertion.AssertEquals(2, group.Count);
- }
-
- [Test]
- public void Backup1()
- {
- BuildItemGroup group = new BuildItemGroup(); // virtual group
- XmlElement element = CreatePersistedItemGroupElement();
-
- BuildItem item1 = CreatePersistedBuildItem(element, "i", "i1");
- BuildItem item2 = CreatePersistedBuildItem(element, "i", "i2");
- group.AddExistingItem(item1);
- group.AddExistingItem(item2);
- BuildItem item3 = group.AddNewItem("j", "j1"); // virtual
- Assertion.AssertEquals(3, group.Count);
-
- group.RemoveItemWithBackup(item3);
- group.RemoveItemWithBackup(item1);
- Assertion.AssertEquals(1, group.Count);
-
- group.RemoveAllIntermediateItems();
- Assertion.AssertEquals(2, group.Count);
- }
-
- [Test]
- public void AddItem1()
- {
- XmlElement ig = CreatePersistedItemGroupElement();
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem item = CreatePersistedBuildItem(ig, "i", "i3");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 2); // should be last
-
- item = CreatePersistedBuildItem(ig, "h", "h1");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 3); // should be last, because there were no h's.
-
- item = CreatePersistedBuildItem(ig, "h", "h0");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 3);// should be 2nd last
-
- item = CreatePersistedBuildItem(ig, "i", "i2");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 1); // should be 2nd
-
- item = CreatePersistedBuildItem(ig, "i", "i0");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 0); // should be first
- }
-
- [Test]
- public void AddItemEmptyPersistedGroup()
- {
- XmlDocument doc = new XmlDocument();
- XmlElement ig = doc.CreateElement("ItemGroup", XMakeAttributes.defaultXmlNamespace);
- BuildItemGroup group = new BuildItemGroup(ig, false, new Project());
-
- BuildItem item = CreatePersistedBuildItem(ig, "i", "i3");
- group.AddItem(item);
- VerifyPersistedItemPosition(group, item, 0);
- }
-
- [Test]
- public void AddItemEmptyNonPersistedGroup()
- {
- BuildItemGroup group = new BuildItemGroup();
- BuildItem item = new BuildItem("i", "i1");
- group.AddItem(item);
- Assertion.AssertEquals(item, group[0]); // should be last
- item = new BuildItem("i", "i0");
- group.AddItem(item);
- Assertion.AssertEquals(item, group[1]); // should be last again
- }
-
- private static void VerifyPersistedItemPosition(BuildItemGroup group, BuildItem item, int position)
- {
- Assertion.AssertEquals(group[position].Include, group.ItemGroupElement.ChildNodes[position].Attributes["Include"].Value);
- Assertion.AssertEquals(item.Include, group[position].Include);
- }
-
- private static BuildItem CreatePersistedBuildItem(XmlElement groupElement, string name, string include)
- {
- XmlElement element = groupElement.OwnerDocument.CreateElement(name, XMakeAttributes.defaultXmlNamespace);
- element.SetAttribute("Include", include);
- BuildItem item = new BuildItem(element, false, new ItemDefinitionLibrary(new Project()));
- return item;
- }
-
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildItem_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildItem_Tests.cs
deleted file mode 100644
index b9358208874..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildItem_Tests.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using Microsoft.Build.Framework;
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.BuildEngine.Shared;
-using System.Xml;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildItem_Tests
- {
- [Test]
- public void Basic()
- {
- BuildItem item = new BuildItem("i", "i1");
- Assertion.AssertEquals("i", item.Name);
- Assertion.AssertEquals("i1", item.EvaluatedItemSpec);
- Assertion.AssertEquals("i1", item.FinalItemSpec);
- Assertion.AssertEquals("i1", item.FinalItemSpecEscaped);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void InvalidNamespace()
- {
- string content = @"
-
- m1
- n1
- ";
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(content);
- CreateBuildItemFromXmlDocument(doc);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void MissingInclude()
- {
- string content = @"";
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(content);
- BuildItem item = CreateBuildItemFromXmlDocument(doc);
- }
-
- [Test]
- [ExpectedException(typeof(InvalidProjectFileException))]
- public void MissingInclude2()
- {
- string content = @"";
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(content);
- BuildItem item = CreateBuildItemFromXmlDocument(doc);
- }
-
- [Test]
- public void Metadata()
- {
- string content = @"
-
- $(p)
- n1
- ";
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(content);
- BuildItem item = CreateBuildItemFromXmlDocument(doc);
- Assertion.AssertEquals("i", item.Name);
- BuildPropertyGroup properties = new BuildPropertyGroup();
- properties.SetProperty("p", "p1");
-
- // Evaluated
- Expander expander = new Expander(properties, null, ExpanderOptions.ExpandAll);
- item.EvaluateAllItemMetadata(expander, ParserOptions.AllowPropertiesAndItemLists, null, null);
- Assertion.AssertEquals("p1", item.GetEvaluatedMetadata("m"));
-
- // Unevaluated
- Assertion.AssertEquals("$(p)", item.GetMetadata("m"));
- Assertion.AssertEquals("n1", item.GetMetadata("n"));
-
- // All custom metadata
- ArrayList metadataNames = new ArrayList(item.CustomMetadataNames);
- Assertion.Assert(metadataNames.Contains("n"));
- Assertion.Assert(metadataNames.Contains("m"));
-
- // Custom metadata count only
- Assertion.AssertEquals(2, item.CustomMetadataCount);
-
- // All metadata count
- Assertion.AssertEquals(2 + FileUtilities.ItemSpecModifiers.All.Length, item.MetadataCount);
- }
-
- [Test]
- public void MetadataIncludesItemDefinitionMetadata()
- {
- // Get an item of type "i" that has an item definition library
- // for type "i" that has default value "m1" for metadata "m"
- // and has value "n1" for metadata "n"
- BuildItem item = GetXmlBackedItemWithDefinitionLibrary();
-
- // Evaluated
- Expander expander = new Expander(new BuildPropertyGroup(), null, ExpanderOptions.ExpandAll);
- item.EvaluateAllItemMetadata(expander, ParserOptions.AllowPropertiesAndItemLists, null, null);
- Assertion.AssertEquals("m1", item.GetEvaluatedMetadata("m"));
- Assertion.AssertEquals("n1", item.GetEvaluatedMetadata("n"));
-
- // Unevaluated
- Assertion.AssertEquals("m1", item.GetMetadata("m"));
- Assertion.AssertEquals("n1", item.GetMetadata("n"));
-
- // All custom metadata
- List metadataNames = new List((IList)item.CustomMetadataNames);
- Assertion.AssertEquals("n", (string)metadataNames[0]);
- Assertion.AssertEquals("m", (string)metadataNames[1]);
-
- // Custom metadata count only
- Assertion.AssertEquals(3, item.CustomMetadataCount);
-
- // All metadata count
- Assertion.AssertEquals(item.CustomMetadataCount + FileUtilities.ItemSpecModifiers.All.Length, item.MetadataCount);
- }
-
- [Test]
- public void VirtualClone()
- {
- BuildItem item = new BuildItem("i", "i1");
- BuildItem clone = item.Clone();
-
- Assertion.AssertEquals("i", clone.Name);
- Assertion.AssertEquals("i1", clone.EvaluatedItemSpec);
- Assertion.AssertEquals("i1", clone.FinalItemSpec);
- Assertion.AssertEquals("i1", clone.FinalItemSpecEscaped);
- }
-
- [Test]
- public void RegularClone()
- {
- BuildItem item = GetXmlBackedItemWithDefinitionLibrary();
- BuildItem clone = item.Clone();
-
- Assertion.AssertEquals("i", clone.Name);
- Assertion.AssertEquals("i1", clone.EvaluatedItemSpec);
- Assertion.AssertEquals("i1", clone.FinalItemSpec);
- Assertion.AssertEquals("i1", clone.FinalItemSpecEscaped);
-
- // Make sure the itemdefinitionlibrary is cloned, too
- Assertion.AssertEquals("m1", clone.GetEvaluatedMetadata("m"));
- }
-
- [Test]
- public void CreateClonedParentedItem()
- {
- BuildItem parent = GetXmlBackedItemWithDefinitionLibrary();
- BuildItem child = new BuildItem("i", "i2");
- child.SetMetadata("n", "n2");
-
- BuildItem clone = BuildItem.CreateClonedParentedItem(child, parent);
-
- Assertion.AssertEquals("i", clone.Name);
- Assertion.AssertEquals("i2", clone.EvaluatedItemSpec);
- Assertion.AssertEquals("i2", clone.FinalItemSpec);
- Assertion.AssertEquals("i2", clone.FinalItemSpecEscaped);
-
- // Make sure the itemdefinitionlibrary is cloned, too
- Assertion.AssertEquals("m1", clone.GetEvaluatedMetadata("m"));
- Assertion.AssertEquals("n1", clone.GetEvaluatedMetadata("n"));
- }
-
- internal static BuildItem GetXmlBackedItemWithDefinitionLibrary()
- {
- string content = @"";
- XmlDocument doc = new XmlDocument();
- doc.LoadXml(content);
-
- XmlElement groupElement = XmlTestUtilities.CreateBasicElement("ItemDefinitionGroup");
- XmlElement itemElement = XmlTestUtilities.AddChildElement(groupElement, "i");
- XmlElement metaElement = XmlTestUtilities.AddChildElementWithInnerText(itemElement, "m", "m1");
- XmlElement metaElement2 = XmlTestUtilities.AddChildElementWithInnerText(itemElement, "o", "o1");
-
- ItemDefinitionLibrary library = new ItemDefinitionLibrary(new Project());
- library.Add(groupElement);
- library.Evaluate(null);
-
- BuildItem item = new BuildItem((XmlElement)doc.FirstChild, false, library);
- item.SetMetadata("n", "n1");
- return item;
- }
-
- private static BuildItem CreateBuildItemFromXmlDocument(XmlDocument doc)
- {
- ItemDefinitionLibrary itemDefinitionLibrary = new ItemDefinitionLibrary(new Project());
- itemDefinitionLibrary.Evaluate(new BuildPropertyGroup());
- BuildItem item = new BuildItem((XmlElement)doc.FirstChild, false, itemDefinitionLibrary);
- return item;
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildPropertyGroupProxy_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildPropertyGroupProxy_Tests.cs
deleted file mode 100644
index 471a412087f..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildPropertyGroupProxy_Tests.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using NUnit.Framework;
-using Microsoft.Build.BuildEngine;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildPropertyGroupProxy_Tests
- {
- [Test]
- public void BasicProxying()
- {
- BuildPropertyGroup pg = new BuildPropertyGroup();
- BuildProperty p1 = new BuildProperty("name1", "value1", PropertyType.EnvironmentProperty);
- BuildProperty p2 = new BuildProperty("name2", "value2", PropertyType.GlobalProperty);
- pg.SetProperty(p1);
- pg.SetProperty(p2);
-
- BuildPropertyGroupProxy proxy = new BuildPropertyGroupProxy(pg);
-
- Hashtable list = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- foreach (DictionaryEntry prop in proxy)
- {
- list.Add(prop.Key, prop.Value);
- }
-
- Assertion.Assert(list.Count == 2);
- Assertion.Assert((string)list["name1"] == "value1");
- Assertion.Assert((string)list["name2"] == "value2");
- }
-
- ///
- /// It is essential that there is no way to modify the original
- /// collection through the proxy.
- ///
- [Test]
- public void CantModifyThroughEnumerator()
- {
- BuildPropertyGroup pg = new BuildPropertyGroup();
- // Only NormalProperties are modifiable anyway
- BuildProperty p1 = new BuildProperty("name1", "value1", PropertyType.NormalProperty);
- pg.SetProperty(p1);
-
- BuildPropertyGroupProxy proxy = new BuildPropertyGroupProxy(pg);
-
- Hashtable list = new Hashtable(StringComparer.OrdinalIgnoreCase);
-
- // Get the one property
- foreach (DictionaryEntry prop in proxy)
- {
- list.Add(prop.Key, prop.Value);
- }
-
- // Change the property
- Assertion.Assert((string)list["name1"] == "value1");
- list["name1"] = "newValue";
- Assertion.Assert((string)list["name1"] == "newValue");
-
- // Get the property again
- list = new Hashtable(StringComparer.OrdinalIgnoreCase);
- foreach (DictionaryEntry prop in proxy)
- {
- list.Add(prop.Key, prop.Value);
- }
-
- // Property value hasn't changed
- Assertion.Assert((string)list["name1"] == "value1");
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildRequest_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildRequest_Tests.cs
deleted file mode 100644
index 99734d73427..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildRequest_Tests.cs
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Xml;
-using System.Collections;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
-using NUnit.Framework;
-using System.IO;
-
-using Microsoft.Build.BuildEngine;
-using Microsoft.Build.Framework;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildRequest_Tests
- {
- ///
- /// Test one of the constructors and some of the properties to make sure that they are set
- ///
- [Test]
- public void TestConstructor1andProperties()
- {
-
- int nodeProxyId = 1;
- string projectFileName = "ProjectFileName";
- string[] targetNames = new string[] { "Build" };
- BuildPropertyGroup globalProperties = null;
- int requestId = 1;
-
- BuildRequest firstConstructorRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, globalProperties, null, requestId, false, false);
- Assert.AreEqual(1, firstConstructorRequest.HandleId, "Expected firstConstructorRequest.NodeProxyId to be 1");
- firstConstructorRequest.HandleId = 2;
- Assert.AreEqual(2, firstConstructorRequest.HandleId, "Expected firstConstructorRequest.NodeProxyId to be 2");
- Assert.AreEqual(1, firstConstructorRequest.RequestId, "Expected firstConstructorRequest.RequestId to be 1");
- firstConstructorRequest.RequestId = 2;
- Assert.AreEqual(2, firstConstructorRequest.RequestId, "Expected firstConstructorRequest.RequestId to be 2");
- Assert.IsNull(firstConstructorRequest.GlobalProperties, "Expected firstConstructorRequest.GlobalProperties to be null");
- firstConstructorRequest.GlobalProperties = new BuildPropertyGroup();
- Assert.IsNotNull(firstConstructorRequest.GlobalProperties, "Expected firstConstructorRequest.GlobalProperties to not be null");
- Assert.IsTrue((firstConstructorRequest.TargetNames.Length == 1) && (string.Compare("Build", firstConstructorRequest.TargetNames[0], StringComparison.OrdinalIgnoreCase) == 0), "Expected to have one target with a value of Build in firstConstructorRequest.TargetNames");
- Assert.IsTrue(string.Compare("ProjectFileName", firstConstructorRequest.ProjectFileName, StringComparison.OrdinalIgnoreCase) == 0, "Expected firstConstructorRequest.ProjectFileName to be called ProjecFileName");
-
- globalProperties = new BuildPropertyGroup();
- BuildProperty propertyToAdd = new BuildProperty("PropertyName", "Value");
- globalProperties.SetProperty(propertyToAdd);
-
- firstConstructorRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, globalProperties, null, requestId, false, false);
- Assert.IsNotNull(firstConstructorRequest.GlobalPropertiesPassedByTask, "Expected GlobalPropertiesPassedByTask to not be null");
- Assert.IsNotNull(firstConstructorRequest.GlobalProperties, "Expected GlobalPropertiesPassedByTask to not be null");
- Assert.IsTrue(string.Compare(firstConstructorRequest.GlobalProperties["PropertyName"].Value, "Value", StringComparison.OrdinalIgnoreCase) == 0, "Expected GlobalProperties, propertyname to be equal to value");
-
- string buildProperty = ((Hashtable)firstConstructorRequest.GlobalPropertiesPassedByTask)["PropertyName"] as string;
- Assert.IsTrue(string.Compare(buildProperty, "Value", StringComparison.OrdinalIgnoreCase) == 0, "Expected hashtable to contain a property group with a value of value");
- Assert.IsTrue((firstConstructorRequest.TargetNames.Length == 1) && (string.Compare("Build", firstConstructorRequest.TargetNames[0], StringComparison.OrdinalIgnoreCase) == 0), "Expected to have one target with a value of Build");
- Assert.IsTrue(string.Compare("ProjectFileName", firstConstructorRequest.ProjectFileName, StringComparison.OrdinalIgnoreCase) == 0, "Expected project file to be called ProjecFileName");
-
-
- }
-
- ///
- /// Check the second constructor and more of the properties to make sure they are set
- ///
- [Test]
- public void TestConstructor2andProperties()
- {
-
- int nodeProxyId = 1;
- string projectFileName = "ProjectFileName";
- string[] targetNames = new string[] { "Build" };
- Dictionary dictionary = null;
- int requestId = 1;
-
- // Check that the initial values of the properties are set based on the constructor being run
- BuildRequest secondConstructorRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.AreEqual(1, secondConstructorRequest.HandleId, "Expected NodeProxyId to be 1");
- Assert.AreEqual(1, secondConstructorRequest.RequestId, "Expected RequestId to be 1");
- Assert.IsNull(secondConstructorRequest.GlobalProperties, "Expected GlobalProperties to be null");
- Assert.IsNull(secondConstructorRequest.GlobalPropertiesPassedByTask, "Expected GlobalPropertiesPassedByTask to be null");
- Assert.IsTrue((secondConstructorRequest.TargetNames.Length == 1) && (string.Compare("Build", secondConstructorRequest.TargetNames[0], StringComparison.OrdinalIgnoreCase) == 0), "Expected to have one target with a value of Build");
- Assert.IsTrue(string.Compare("ProjectFileName", secondConstructorRequest.ProjectFileName, StringComparison.OrdinalIgnoreCase) == 0, "Expected project file to be called ProjecFileName");
- Assert.IsNull(secondConstructorRequest.ParentEngine, "Expected parent Engine to be null");
- Assert.IsNull(secondConstructorRequest.OutputsByTarget, "Expected outputs by target to be null");
- Assert.IsFalse(secondConstructorRequest.BuildSucceeded, "Expected BuildSucceeded to be false");
- Assert.AreEqual(secondConstructorRequest.BuildSettings, BuildSettings.None, "Expected BuildSettings to be none");
- Assert.IsNull(secondConstructorRequest.ProjectToBuild, "Expected ProjectToBuild to be null");
- Assert.IsFalse(secondConstructorRequest.FireProjectStartedFinishedEvents, " Expected FireProjectStartedFinishedEvents to be false");
- Assert.IsTrue(secondConstructorRequest.IsGeneratedRequest, "Expected GeneratedRequest to be true");
-
- // Test that if a nodeProxyId is set to NodeProxy.invalidEngineHandle then we should get a not null dependency chain
- secondConstructorRequest = new BuildRequest(EngineCallback.invalidEngineHandle, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.IsFalse(secondConstructorRequest.IsGeneratedRequest, "Expected GeneratedRequest to be false");
-
- // Create a dictionary and hash table so that we can test the second constructor more
- dictionary = new Dictionary();
- dictionary.Add("PropertyName", "Value");
- Hashtable propertyHash = new Hashtable();
- propertyHash.Add("PropertyName", "Value");
-
- // If a dictionary is passed then it will be converted to a hashtable by copying the items out, we shoud
- // therefore make sure that the hashtable has the correct items inside of it
- secondConstructorRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- string buildPropertyValue = ((Hashtable)secondConstructorRequest.GlobalPropertiesPassedByTask)["PropertyName"] as string;
- Assert.IsTrue(string.Compare(buildPropertyValue, "Value", StringComparison.OrdinalIgnoreCase) == 0, "Expected buildPropertyValue to be value");
-
- // If a hashtable is passed then the GlobalPropertiesPassedByTask are set to that hashtable
- secondConstructorRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, propertyHash, null, requestId, false, false);
- Assert.AreEqual(propertyHash, ((Hashtable)secondConstructorRequest.GlobalPropertiesPassedByTask), "Expected propertyHash to be equal to GlobalPropertiesPassedByTask");
-
- //Change the parentNode to verify the working of isExternalRequest
- secondConstructorRequest.IsExternalRequest = false;
- Assert.IsFalse(secondConstructorRequest.IsExternalRequest, "Expected IsExternalRequest to return false");
- secondConstructorRequest.IsExternalRequest = true;
- Assert.IsTrue(secondConstructorRequest.IsExternalRequest, "Expected IsExternalRequest to return true");
-
- // Verify that the parentEngine can be set through a property
- secondConstructorRequest.ParentEngine = new Engine();
- Assert.IsNotNull(secondConstructorRequest.ParentEngine, "Expected parent Engine to not be null");
- }
-
- ///
- /// Check to make sure that the nonserialized defaults are reset to their correct values
- ///
- [Test]
- public void RestoreNonSerializedDefaults()
- {
-
- int nodeProxyId = 1;
- string projectFileName = "ProjectFileName";
- string[] targetNames = new string[] { "Build" };
- Dictionary dictionary = null;
- int requestId = 1;
-
- // Check that the initial values of the properties are set based on the constructor being run
- BuildRequest buildRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- buildRequest.RestoreNonSerializedDefaults();
- Assert.IsNotNull(buildRequest.OutputsByTarget, "Expected OutputsByTarget to not be null");
- Assert.IsNotNull(buildRequest.ResultByTarget, "Expected ResultByTarget to not be null");
- Assert.IsNull(buildRequest.ProjectToBuild, "Expected ProjectToBuild to be null");
- Assert.IsTrue(buildRequest.BuildSettings == BuildSettings.None, "Expected BuildSettings to be none");
- Assert.IsTrue(buildRequest.FireProjectStartedFinishedEvents, "Expected FireProjectStartedFinishedEvents to be true");
- Assert.AreEqual(EngineCallback.invalidNode, buildRequest.NodeIndex, "Expected NodeIndex to be -2");
- Assert.IsFalse(buildRequest.BuildCompleted, "Expected buildCompleted to be false");
- Assert.IsFalse(buildRequest.BuildSucceeded, "Expected BuildSucceeded to be false");
- }
-
- ///
- /// Try some different targetNames combinations and make sure the concatonated list is correct
- ///
- [Test]
- public void GetTargetNamesList()
- {
- int nodeProxyId = 1;
- string projectFileName = "ProjectFileName";
- string[] targetNames = null;
-
- Dictionary dictionary = null;
- int requestId = 1;
-
- // Test the case where we pass in null targets
- BuildRequest buildRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.IsNull(buildRequest.GetTargetNamesList(), "Expected GetTargetNamesList to be null");
-
- // Test the case where we pass in one target
- targetNames = new string[] { "Build" };
- buildRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.IsTrue(string.Compare("Build", buildRequest.GetTargetNamesList(),StringComparison.OrdinalIgnoreCase)==0, "Expected to see Build as the targetNamesList");
-
- //Test the case where we pass in multiple targets
- targetNames = new string[] {"Build","Build2"};
- buildRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.IsTrue(string.Compare("Build;Build2;", buildRequest.GetTargetNamesList(),StringComparison.OrdinalIgnoreCase)==0, "Expected to see Build;Build2; as the targetNamesList");
- }
-
- ///
- /// See if a non null buildresult is returned, since there are already BuildResult tests we do not care what is inside it
- ///
- [Test]
- public void GetBuildResult()
- {
- int nodeProxyId = 1;
- string projectFileName = "ProjectFileName";
- string[] targetNames = null;
-
- Dictionary dictionary = null;
- int requestId = 1;
-
- // Test the case where we pass in null targets
- BuildRequest buildRequest = new BuildRequest(nodeProxyId, projectFileName, targetNames, (IDictionary)dictionary, null, requestId, false, false);
- Assert.IsNotNull(buildRequest.GetBuildResult(),"Expected GetBuildResult to return a non null BuildRequest");
- }
-
- [Test]
- public void InitializeFromCachedResult()
- {
- BuildResult result = new BuildResult(null, new Hashtable(StringComparer.OrdinalIgnoreCase), true, 0, 1, 1, true, string.Empty, string.Empty, 0, 0, 0);
- BuildRequest request = new BuildRequest();
- request.InitializeFromCachedResult(result);
- Assert.IsTrue(request.OutputsByTarget == result.OutputsByTarget);
- Assert.IsTrue(request.BuildSucceeded);
- Assert.IsTrue(request.BuildCompleted);
- Assert.IsTrue(request.RestoredFromCache);
- Assert.IsTrue(string.Compare(request.DefaultTargets, result.DefaultTargets, StringComparison.OrdinalIgnoreCase) == 0);
- Assert.IsTrue(string.Compare(request.InitialTargets, result.InitialTargets, StringComparison.OrdinalIgnoreCase) == 0);
- }
-
- [Test]
- public void GetBuildRequestTimingData()
- {
- BuildRequest request = new BuildRequest();
- long time = DateTime.Now.Ticks;
- request.StartTime = time;
- Assert.IsTrue(request.StartTime == time);
- request.ProcessingStartTime = time;
- Assert.IsTrue(request.ProcessingStartTime == time);
- request.ProcessingTotalTime = time;
- Assert.IsTrue(request.ProcessingTotalTime == time);
- Assert.IsNotNull(request.GetBuildResult());
- }
-
-
- [Test]
- public void TestCustomSerialization()
- {
- string projectFileName = "ProjectFileName";
- string[] targetNames = new string[] { "Build" };
- BuildPropertyGroup globalProperties = null;
- string toolsVersion = "Tool35";
- int requestId = 1;
- int handleId = 4;
-
- globalProperties = new BuildPropertyGroup();
- BuildProperty propertyToAdd = new BuildProperty("PropertyName", "Value");
- globalProperties.SetProperty(propertyToAdd);
- BuildRequest request1 = new BuildRequest(handleId, projectFileName, targetNames, globalProperties, toolsVersion, requestId, true, true);
- request1.ParentBuildEventContext = new BuildEventContext(1, 2, 3, 4);
-
- BuildRequest request2 = new BuildRequest(handleId, projectFileName, null, globalProperties, toolsVersion, requestId, true, true);
- request2.GlobalProperties = null;
- request2.ProjectFileName = null;
- request2.DefaultTargets = null;
- request2.InitialTargets = null;
- request2.UseResultsCache = false;
- request2.ParentBuildEventContext = null;
-
- MemoryStream stream = new MemoryStream();
- BinaryWriter writer = new BinaryWriter(stream);
- BinaryReader reader = new BinaryReader(stream);
- try
- {
- stream.Position = 0;
- request1.WriteToStream(writer);
- long streamWriteEndPosition = stream.Position;
- request2.WriteToStream(writer);
- long streamWriteEndPosition2 = stream.Position;
- stream.Position = 0;
- BuildRequest request3 = BuildRequest.CreateFromStream(reader);
- long streamReadEndPosition = stream.Position;
- Assert.IsTrue(streamWriteEndPosition == streamReadEndPosition, "Stream end positions should be equal");
- Assert.IsTrue(request1.HandleId == request3.HandleId, "Expected HandleId to Match");
- Assert.IsTrue(request1.RequestId == request3.RequestId, "Expected Request to Match");
- Assert.IsTrue(string.Compare(request1.ProjectFileName, request3.ProjectFileName, StringComparison.OrdinalIgnoreCase) == 0, "Expected ProjectFileName to Match");
- Assert.IsTrue(string.Compare(targetNames[0], request3.TargetNames[0], StringComparison.OrdinalIgnoreCase) == 0, "Expected TargetNames to Match");
- Assert.IsTrue(string.Compare(toolsVersion, request3.ToolsetVersion, StringComparison.OrdinalIgnoreCase) == 0, "Expected ToolsetVersion to Match");
- Assert.IsTrue(request3.TargetNames.Length == 1, "Expected there to be one TargetName");
- Assert.IsTrue(request3.UnloadProjectsOnCompletion, "Expected UnloadProjectsOnCompletion to be true");
- Assert.IsTrue(request3.UseResultsCache, "Expected UseResultsCache to be true");
- Assert.IsTrue(string.Compare(request3.GlobalProperties["PropertyName"].Value,"Value",StringComparison.OrdinalIgnoreCase)==0);
- Assert.AreEqual(request1.ParentBuildEventContext, request3.ParentBuildEventContext, "Expected BuildEventContext to Match");
-
- BuildRequest request4 = BuildRequest.CreateFromStream(reader);
- streamReadEndPosition = stream.Position;
- Assert.IsTrue(streamWriteEndPosition2 == streamReadEndPosition, "Stream end positions should be equal");
- Assert.IsTrue(request2.HandleId == request4.HandleId, "Expected HandleId to Match");
- Assert.IsTrue(request2.RequestId == request4.RequestId, "Expected Request to Match");
- Assert.IsNull(request4.ProjectFileName);
- Assert.IsNull(request4.TargetNames);
- Assert.IsNull(request4.GlobalProperties);
- Assert.IsNull(request4.ParentBuildEventContext);
- }
- finally
- {
- reader.Close();
- writer = null;
- stream = null;
- }
- }
- }
-}
diff --git a/src/Deprecated/Engine.UnitTests/BuildResult_Tests.cs b/src/Deprecated/Engine.UnitTests/BuildResult_Tests.cs
deleted file mode 100644
index 4a0f621d03c..00000000000
--- a/src/Deprecated/Engine.UnitTests/BuildResult_Tests.cs
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-
-// THE ASSEMBLY BUILT FROM THIS SOURCE FILE HAS BEEN DEPRECATED FOR YEARS. IT IS BUILT ONLY TO PROVIDE
-// BACKWARD COMPATIBILITY FOR API USERS WHO HAVE NOT YET MOVED TO UPDATED APIS. PLEASE DO NOT SEND PULL
-// REQUESTS THAT CHANGE THIS FILE WITHOUT FIRST CHECKING WITH THE MAINTAINERS THAT THE FIX IS REQUIRED.
-
-using System;
-using System.Xml;
-using System.Collections;
-using System.Text.RegularExpressions;
-using System.Collections.Generic;
-using System.IO;
-
-using NUnit.Framework;
-
-using Microsoft.Build.BuildEngine;
-
-namespace Microsoft.Build.UnitTests
-{
- [TestFixture]
- public class BuildResult_Tests
- {
- // A build result where the taskoutputs are null
- private BuildResult resultNoOutputs;
-
- // A build result where the task outputs are acutal values
- private BuildResult resultWithOutputs;
-
- // Create an uninitialized item to test one of the code paths in build result
- private BuildItem buildItem1 = new BuildItem(null, "Item1");
- // Create an initialized item
- private BuildItem buildItem2 = new BuildItem("BuildItem2", "Item2");
-
- [SetUp]
- public void Initialize()
- {
- // Create some items and place them in a dictionary
- // Add some include information so that when we check the final
- // item spec we can verify that the item was recreated properly
- buildItem1.Include = "TestInclude1";
- buildItem2.Include = "TestInclude2";
-
- BuildItem[] taskItems = new BuildItem[2];
- taskItems[0] = buildItem1;
- taskItems[1] = buildItem2;
-
- Dictionary