Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs/tools
diff options
context:
space:
mode:
authorAnkit Jain <radical@corewars.org>2010-02-01 20:28:11 +0300
committerAnkit Jain <radical@corewars.org>2010-02-01 20:28:11 +0300
commitf66eb3966a5b5479d1b22a75d75ad97ba660350d (patch)
tree340fea34596b23a26402015f9cdbb05500f17885 /mcs/tools
parent178e8b39d84b04c0c2310cf301f97ad46e641572 (diff)
Backport xbuild and Microsoft.Build.* from trunk.
In tools/xbuild/Test: 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * ParametersTest.cs: /noautorsp + test for each property value 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * xbuild.tests/ParametersTest.cs * xbuild.tests/xbuild.tests.csproj: NUnit tests for the Parameters class In tools/xbuild: 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * Main.cs * Parameters.cs: response file might be specified in double quotes. 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * Makefile * xbuild_test.dll.sources * xbuild.sln * Test/*: added NUnit tests (Test/xbuild.tests) 2009-12-22 Ankit Jain <jankit@novell.com> Fix bug #566087. * xbuild/Microsoft.CSharp.targets: Use $(NoWarn) . 2009-12-14 Ankit Jain <jankit@novell.com> * Parameters.cs (TryProcessMultiOption): New. (ProcessTarget): (ProcessProperty): Refactor to use TryProcessMultiOption, and accept ":" in target name or property name/value pair. 2009-12-14 Ankit Jain <jankit@novell.com> Fix bug #562056. * Parameters.cs: Property name/value pairs can be separated by ':'. 2009-11-26 Ankit Jain <jankit@novell.com> * xbuild/Microsoft.Common.targets (PostBuildEvent): If $(RunPostBuildEvent) is empty, treat it as OnBuildSuccess. Simplify condition. 2009-11-25 Ankit Jain <jankit@novell.com> * xbuild/Microsoft.Common.targets: Emit list of files written during the build to the obj/$(Config) rather than obj/, to keep them per config. Bug reported by : Greg F <kog@epiphanic.org> 2009-11-10 Ankit Jain <jankit@novell.com> * xbuild/Microsoft.Common.targets(AL): * xbuild/Microsoft.CSharp.targets (CSC): * xbuild/Microsoft.VisualBasic.targets (Vbc): Set ToolExe and ToolPath to corresponding properties, allowing them to be overridden. 2009-11-09 Ankit Jain <jankit@novell.com> * xbuild/Microsoft.Common.targets: Set default TargetFrameworkVersion. Replace TargetFrameworkPath with TargetFrameworkDirectories, and set according to the TargetFrameworkVersion. In tools/xbuild/tests: 2009-11-26 Ankit Jain <jankit@novell.com> * standalone/Project1/final-outputs.txt: Update. In class/Microsoft.Build.Engine/Test/Microsoft.Build.BuildEngine: 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * BuildChooseTest.cs * BuildPropertyTest.cs: test cases for nested Choose elements and different property evaluation scenarios. In class/Microsoft.Build.Engine/Test/various: 2009-12-22 Ankit Jain <jankit@novell.com> * Items.cs (TestItemsWithWildcards): Add Exclude also, update test accordingly. In class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine: 2009-12-22 Ankit Jain <jankit@novell.com> Fix bug #565849. * DirectoryScanner.cs (Excludes): Change from string to ITaskItem[] . * BuildItem.cs: Track api changes. 2009-12-02 Ankit Jain <jankit@novell.com> Fix bug #559990. * Engine.cs (UnloadAllProjects): Don't remove items from the collection being iterated over. Patch by Laurent Etiemble <laurent.etiemble@gmail.com> 2009-11-28 Ankit Jain <jankit@novell.com> Fix bug #547753. * BatchingImplBase.cs (DumpBucket*): New. Useful for debugging. * Project.cs (Batch): New. Contains the perBatchItems and the commonItems for the batch. Use a stack of batches, instead of directly setting the current batch items. (PushBatch): New. (PopBatch): New. (SetBatchedItems): Make this private. (GlobalProperties.set): Re-evaluating the project is not required for this. * TargetBatchingImpl.cs: Use the new Push/PopBatch instead of directly setting the batches. * TaskBatchingImpl.cs: Likewise. Refactor slightly to PopBatch in finally block. * Target.cs (Build): Reset the current batch to nil before evaluating and building this target. 2009-11-28 Ankit Jain <jankit@novell.com> * Project.cs (TryGetEvaluatedItemByNameBatched): Item could be available in either perBatchItemsByName or commonItemsByName or the evaluatedItemsByName collection. Allows the use of items which are not batched, but are consumed in case of batching. 2009-11-26 Ankit Jain <jankit@novell.com> * TargetBatchingImpl.cs (BuildTargetNeeded): Expand metadata refs also, for Inputs and Outputs. 2009-10-13 Ankit Jain <jankit@novell.com> * DirectoryScanner.cs: * ExpressionCollection.cs: * GroupingCollection.cs: * Project.cs: * Target.cs: Fix warnings. In class/Microsoft.Build.Engine: 2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * Microsoft.Build.BuildEngine/BuildWhen.cs * Microsoft.Build.BuildEngine/PropertyReference.cs: support for nested Choose elements + fixed bug where the project reference would be null during condition evaluation. 2010-01-12 Rodrigo B. de Oliveira <rodrigo@unity3d.com> * Microsoft.Build.BuildEngine/BuildWhen.cs * Test/Microsoft.Build.BuildEngine/BuildChooseTest.cs: Support for PropertyGroup as a child of When and Otherwise In class/Microsoft.Build.Framework/Mono.XBuild.Framework: 2009-10-13 Ankit Jain <jankit@novell.com> * AssemblyLoadInfo.cs: Fix warning. In class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks: 2009-12-22 Ankit Jain <jankit@novell.com> * CreateItemTest.cs (TestItemsWithWildcards): New. 2009-11-28 Ankit Jain <jankit@novell.com> * TaskBatchingTest.cs: Add new tests for batching. 2009-11-28 Ankit Jain <jankit@novell.com> * TaskBatchingTest.cs: Add new tests for batching, use on unbatched items in a batching scenario. In class/Microsoft.Build.Tasks: 2009-12-22 Ankit Jain <jankit@novell.com> * Microsoft.Build.Tasks.dll.sources: Add DirectoryScanner.cs from Build.Engine, required by CreateItem. In class/Microsoft.Build.Tasks/Microsoft.Build.Tasks: 2009-12-22 Ankit Jain <jankit@novell.com> Fix bug #565849. * CreateItem.cs: Use DirectoryScanner to handle wildcards. (IsExcluded): Remove. 2009-11-26 Ankit Jain <jankit@novell.com> * ManagedCompiler.cs (AddResponseFileCommands): *mcs doesn't support /debug:pdbonly, so map it to /debug:full . 2009-11-10 Ankit Jain <jankit@novell.com> * ToolTask.cs (ToolExe): New. * Csc.cs: * AL.cs: Use ToolExe instead of ToolName to construct tool's full path. 2009-11-09 Ankit Jain <jankit@novell.com> * GetFrameworkPath.cs (FrameworkVersion11Path): (FrameworkVersion20Path): (FrameworkVersion30Path): (FrameworkVersion35Path): New. 2009-10-13 Ankit Jain <jankit@novell.com> * ResolveAssemblyReference.cs: Fix warnings. 2009-10-13 Ankit Jain <jankit@novell.com> * ResolveAssemblyReference.cs: Log only unique conflict warnings. In class/Microsoft.Build.Utilities/Microsoft.Build.Utilities: 2009-11-25 Ankit Jain <jankit@novell.com> * ToolLocationHelper.cs: Set directory for 3.0 framework to "2.0" 2009-11-09 Ankit Jain <jankit@novell.com> * TargetDotNetFrameworkVersion.cs (Version30): (Version35): New. * ToolLocationHelper.cs: Support 3.0 and 3.5 also. 2009-10-13 Ankit Jain <jankit@novell.com> * TaskLoggingHelper.cs: * ToolTask.cs: Fix warnings. svn path=/branches/mono-2-6/mcs/; revision=150655
Diffstat (limited to 'mcs/tools')
-rw-r--r--mcs/tools/xbuild/ChangeLog54
-rw-r--r--mcs/tools/xbuild/Main.cs4
-rw-r--r--mcs/tools/xbuild/Makefile3
-rw-r--r--mcs/tools/xbuild/Parameters.cs68
-rw-r--r--mcs/tools/xbuild/Test/ChangeLog9
-rw-r--r--mcs/tools/xbuild/Test/xbuild.tests/ParametersTest.cs58
-rw-r--r--mcs/tools/xbuild/Test/xbuild.tests/xbuild.tests.csproj50
-rw-r--r--mcs/tools/xbuild/tests/ChangeLog4
-rw-r--r--mcs/tools/xbuild/tests/standalone/Project01/final-outputs.txt18
-rw-r--r--mcs/tools/xbuild/xbuild.sln11
-rw-r--r--mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets7
-rw-r--r--mcs/tools/xbuild/xbuild/Microsoft.Common.targets28
-rw-r--r--mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets3
13 files changed, 277 insertions, 40 deletions
diff --git a/mcs/tools/xbuild/ChangeLog b/mcs/tools/xbuild/ChangeLog
index 3032b94bcbe..a20763ac604 100644
--- a/mcs/tools/xbuild/ChangeLog
+++ b/mcs/tools/xbuild/ChangeLog
@@ -1,3 +1,57 @@
+2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com>
+
+ * Main.cs
+ * Parameters.cs: response file might be specified in double quotes.
+
+2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com>
+
+ * Makefile
+ * xbuild_test.dll.sources
+ * xbuild.sln
+ * Test/*: added NUnit tests (Test/xbuild.tests)
+
+2009-12-22 Ankit Jain <jankit@novell.com>
+
+ Fix bug #566087.
+ * xbuild/Microsoft.CSharp.targets: Use $(NoWarn) .
+
+2009-12-14 Ankit Jain <jankit@novell.com>
+
+ * Parameters.cs (TryProcessMultiOption): New.
+ (ProcessTarget):
+ (ProcessProperty): Refactor to use TryProcessMultiOption,
+ and accept ":" in target name or property name/value pair.
+
+2009-12-14 Ankit Jain <jankit@novell.com>
+
+ Fix bug #562056.
+ * Parameters.cs: Property name/value pairs can be separated by ':'.
+
+2009-11-26 Ankit Jain <jankit@novell.com>
+
+ * xbuild/Microsoft.Common.targets (PostBuildEvent): If
+ $(RunPostBuildEvent) is empty, treat it as OnBuildSuccess.
+ Simplify condition.
+
+2009-11-25 Ankit Jain <jankit@novell.com>
+
+ * xbuild/Microsoft.Common.targets: Emit list of files written
+ during the build to the obj/$(Config) rather than obj/, to keep
+ them per config. Bug reported by : Greg F <kog@epiphanic.org>
+
+2009-11-10 Ankit Jain <jankit@novell.com>
+
+ * xbuild/Microsoft.Common.targets(AL):
+ * xbuild/Microsoft.CSharp.targets (CSC):
+ * xbuild/Microsoft.VisualBasic.targets (Vbc): Set ToolExe and ToolPath to
+ corresponding properties, allowing them to be overridden.
+
+2009-11-09 Ankit Jain <jankit@novell.com>
+
+ * xbuild/Microsoft.Common.targets: Set default TargetFrameworkVersion.
+ Replace TargetFrameworkPath with TargetFrameworkDirectories, and set
+ according to the TargetFrameworkVersion.
+
2009-10-12 Ankit Jain <jankit@novell.com>
* xbuild/Microsoft.Common.targets: For referenced projects,
diff --git a/mcs/tools/xbuild/Main.cs b/mcs/tools/xbuild/Main.cs
index 346e9a210b0..8c8cd6c3095 100644
--- a/mcs/tools/xbuild/Main.cs
+++ b/mcs/tools/xbuild/Main.cs
@@ -137,6 +137,10 @@ namespace Mono.XBuild.CommandLine {
ErrorUtilities.ReportError (0, show_stacktrace ? ile.ToString () : ile.Message);
}
+ catch (CommandLineException cle) {
+ ErrorUtilities.ReportError(cle.ErrorCode, show_stacktrace ? cle.ToString() : cle.Message);
+ }
+
catch (Exception) {
throw;
}
diff --git a/mcs/tools/xbuild/Makefile b/mcs/tools/xbuild/Makefile
index 1672dd2550b..e9d89da3131 100644
--- a/mcs/tools/xbuild/Makefile
+++ b/mcs/tools/xbuild/Makefile
@@ -1,6 +1,7 @@
thisdir = tools/xbuild
SUBDIRS =
include ../../build/rules.make
+HAS_NUNIT_TEST = yes
LOCAL_MCS_FLAGS = -r:Microsoft.Build.Framework.dll -r:Microsoft.Build.Utilities.dll -r:Microsoft.Build.Engine.dll
PROGRAM = xbuild.exe
@@ -36,4 +37,6 @@ EXTRA_DISTFILES = \
xbuild/MSBuild/Microsoft.Build.Core.xsd \
xbuild/Microsoft.VisualBasic.targets \
xbuild/Microsoft.WebApplication.targets
+
+
diff --git a/mcs/tools/xbuild/Parameters.cs b/mcs/tools/xbuild/Parameters.cs
index 1f36902f43d..f5d413c0485 100644
--- a/mcs/tools/xbuild/Parameters.cs
+++ b/mcs/tools/xbuild/Parameters.cs
@@ -89,9 +89,9 @@ namespace Mono.XBuild.CommandLine {
flatArguments.Add (s);
continue;
}
- string responseFilename = Path.GetFullPath (s.Substring (1));
+ string responseFilename = Path.GetFullPath (UnquoteIfNeeded (s.Substring (1)));
if (responseFiles.ContainsKey (responseFilename))
- ErrorUtilities.ReportError (1, String.Format ("We already have {0} file.", responseFilename));
+ ReportError (1, String.Format ("We already have {0} file.", responseFilename));
responseFiles [responseFilename] = responseFilename;
LoadResponseFile (responseFilename);
}
@@ -108,11 +108,11 @@ namespace Mono.XBuild.CommandLine {
string[] proj_files = Directory.GetFiles (Directory.GetCurrentDirectory (), "*proj");
if (sln_files.Length == 0 && proj_files.Length == 0)
- ErrorUtilities.ReportError (3, "Please specify the project or solution file " +
+ ReportError (3, "Please specify the project or solution file " +
"to build, as none was found in the current directory.");
if (sln_files.Length + proj_files.Length > 1)
- ErrorUtilities.ReportError (5, "Please specify the project or solution file " +
+ ReportError (5, "Please specify the project or solution file " +
"to build, as more than one solution or project file was found " +
"in the current directory");
@@ -123,10 +123,17 @@ namespace Mono.XBuild.CommandLine {
} else if (remainingArguments.Count == 1) {
projectFile = (string) remainingArguments [0];
} else {
- ErrorUtilities.ReportError (4, "Too many project files specified");
+ ReportError (4, "Too many project files specified");
}
}
-
+
+ private string UnquoteIfNeeded(string arg)
+ {
+ if (arg.StartsWith("\""))
+ return arg.Substring(1, arg.Length - 2);
+ return arg;
+ }
+
void LoadResponseFile (string filename)
{
StreamReader sr = null;
@@ -168,9 +175,8 @@ namespace Mono.XBuild.CommandLine {
sb.Length = 0;
}
}
- } catch (Exception) {
- // FIXME: we lose exception message
- ErrorUtilities.ReportError (2, "Error during loading response file.");
+ } catch (Exception x) {
+ ReportError (2, "Error during loading response file.", x);
} finally {
if (sr != null)
sr.Close ();
@@ -224,34 +230,54 @@ namespace Mono.XBuild.CommandLine {
internal void ProcessTarget (string s)
{
- string[] temp = s.Split (':');
- targets = temp [1].Split (';');
+ TryProcessMultiOption (s, "Target names must be specified as /t:Target1;Target2",
+ out targets);
}
internal bool ProcessProperty (string s)
{
- string[] parameter, splittedProperties, property;
- parameter = s.Split (':');
- if (parameter.Length != 2) {
- ErrorUtilities.ReportError (5, "Property name and value expected as /p:<prop name>=<prop value>");
+ string[] splitProperties;
+ if (!TryProcessMultiOption (s, "Property name and value expected as /p:<prop name>=<prop value>",
+ out splitProperties))
return false;
- }
- splittedProperties = parameter [1].Split (';');
- foreach (string st in splittedProperties) {
+ foreach (string st in splitProperties) {
if (st.IndexOf ('=') < 0) {
- ErrorUtilities.ReportError (5,
+ ReportError (5,
"Invalid syntax. Property name and value expected as " +
"<prop name>=[<prop value>]");
return false;
}
- property = st.Split ('=');
+ string [] property = st.Split ('=');
properties.SetProperty (property [0], property.Length == 2 ? property [1] : "");
}
return true;
}
-
+
+ bool TryProcessMultiOption (string s, string error_message, out string[] values)
+ {
+ values = null;
+ int colon = s.IndexOf (':');
+ if (colon + 1 == s.Length) {
+ ReportError (5, error_message);
+ return false;
+ }
+
+ values = s.Substring (colon + 1).Split (';');
+ return true;
+ }
+
+ private void ReportError (int errorCode, string message)
+ {
+ throw new CommandLineException (message, errorCode);
+ }
+
+ private void ReportError (int errorCode, string message, Exception cause)
+ {
+ throw new CommandLineException (message, cause, errorCode);
+ }
+
internal void ProcessLogger (string s)
{
loggers.Add (new LoggerInfo (s));
diff --git a/mcs/tools/xbuild/Test/ChangeLog b/mcs/tools/xbuild/Test/ChangeLog
new file mode 100644
index 00000000000..e6462d2ccd5
--- /dev/null
+++ b/mcs/tools/xbuild/Test/ChangeLog
@@ -0,0 +1,9 @@
+2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com>
+
+ * ParametersTest.cs: /noautorsp + test for each property value
+
+2010-01-21 Rodrigo B. de Oliveira <rodrigo@unity3d.com>
+
+ * xbuild.tests/ParametersTest.cs
+ * xbuild.tests/xbuild.tests.csproj:
+ NUnit tests for the Parameters class
diff --git a/mcs/tools/xbuild/Test/xbuild.tests/ParametersTest.cs b/mcs/tools/xbuild/Test/xbuild.tests/ParametersTest.cs
new file mode 100644
index 00000000000..821b6ad654b
--- /dev/null
+++ b/mcs/tools/xbuild/Test/xbuild.tests/ParametersTest.cs
@@ -0,0 +1,58 @@
+// (C) 2009 Rodrigo B. de Oliveira
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#if NET_2_0
+using NUnit.Framework;
+using Mono.XBuild.CommandLine;
+using System.IO;
+
+namespace xbuild.tests
+{
+ [TestFixture]
+ public class ParametersTest
+ {
+ /// <summary>
+ /// Tests TeamCity style xbuild integration.
+ /// </summary>
+ [Test]
+ public void TeamCityStyleResponseFile ()
+ {
+ var responseFile = Path.GetTempFileName ();
+ var contents =
+ "/p:idea_build_agent_port=\"9090\" " +
+ "/p:idea_build_server_build_id=\"13852\" " +
+ "/p:path_separator=\":\"";
+ File.WriteAllText (responseFile, contents);
+ var parameters = new Parameters ("bin");
+ parameters.ParseArguments (
+ new [] { "/noautorsp", string.Format ("@\"{0}\"", responseFile), "\"project.xml\""});
+
+ var properties = parameters.Properties;
+ Assert.AreEqual(3, properties.Count);
+ Assert.AreEqual("9090", properties["idea_build_agent_port"].Value);
+ Assert.AreEqual("13852", properties["idea_build_server_build_id"].Value);
+ Assert.AreEqual(":", properties["path_separator"].Value);
+ }
+ }
+}
+
+#endif
+
diff --git a/mcs/tools/xbuild/Test/xbuild.tests/xbuild.tests.csproj b/mcs/tools/xbuild/Test/xbuild.tests/xbuild.tests.csproj
new file mode 100644
index 00000000000..381dd821b1d
--- /dev/null
+++ b/mcs/tools/xbuild/Test/xbuild.tests/xbuild.tests.csproj
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{929D9BCD-2280-4B6D-AD69-0FD089E344C2}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <RootNamespace>xbuild.tests</RootNamespace>
+ <AssemblyName>xbuild.tests</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug</OutputPath>
+ <DefineConstants>DEBUG;NET_2_0</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>none</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Release</OutputPath>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <ConsolePause>false</ConsolePause>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\xbuild.csproj">
+ <Project>{89938F1A-C851-41D5-96D2-C329E00887B6}</Project>
+ <Name>xbuild</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <MonoDevelop>
+ <Properties InternalTargetFrameworkVersion="3.5" />
+ </MonoDevelop>
+ </ProjectExtensions>
+ <ItemGroup>
+ <Compile Include="ParametersTest.cs" />
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/mcs/tools/xbuild/tests/ChangeLog b/mcs/tools/xbuild/tests/ChangeLog
index 40d6f28af18..dc342c6435e 100644
--- a/mcs/tools/xbuild/tests/ChangeLog
+++ b/mcs/tools/xbuild/tests/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-26 Ankit Jain <jankit@novell.com>
+
+ * standalone/Project1/final-outputs.txt: Update.
+
2009-10-08 Ankit Jain <jankit@novell.com>
* standalone/Project1: Add a new Lib5 project, and add
diff --git a/mcs/tools/xbuild/tests/standalone/Project01/final-outputs.txt b/mcs/tools/xbuild/tests/standalone/Project01/final-outputs.txt
index d2045e0b720..d0d7ac881d8 100644
--- a/mcs/tools/xbuild/tests/standalone/Project01/final-outputs.txt
+++ b/mcs/tools/xbuild/tests/standalone/Project01/final-outputs.txt
@@ -6,13 +6,14 @@
./Lib1/bin/Release/Lib1.deploy.txt
./Lib1/bin/Release/Lib1.dll
./Lib1/bin/Release/Lib1.dll.config
+./Lib1/bin/Release/Lib1.dll.mdb
./Lib1/bin/Release/Lib2.dll
./Lib1/bin/Release/Lib2.dll.mdb
./Lib1/bin/Release/lib2_folder/Lib2.deploy.txt
./Lib1/bin/Release/Lib3.dll
+./Lib1/bin/Release/Lib3.dll.mdb
./Lib1/bin/Release/Lib4.dll
./Lib1/bin/Release/Lib4.dll.mdb
-./Lib1/obj/Lib1.csproj.FilesWrittenAbsolute.txt
./Lib1/obj/Release/en-US/Lib1.resources.dll
./Lib1/obj/Release/fr-CA/Lib1.resources.dll
./Lib1/obj/Release/fr-FR/Lib1.resources.dll
@@ -20,7 +21,9 @@
./Lib1/obj/Release/Lib1.Book.fr-CA.resources
./Lib1/obj/Release/Lib1.Book.resources
./Lib1/obj/Release/Lib1.Choco.foo.resources
+./Lib1/obj/Release/Lib1.csproj.FilesWrittenAbsolute.txt
./Lib1/obj/Release/Lib1.dll
+./Lib1/obj/Release/Lib1.dll.mdb
./Lib1/obj/Release/Lib1.InvalidCulture.foo.txt
./Lib1/obj/Release/Lib1.Lib1.foo.txt
./Lib1/obj/Release/Lib1.Publisher.fr-CA.resources
@@ -38,6 +41,7 @@
./Lib2/obj/Debug/Lib2.Book.fr-CA.resources
./Lib2/obj/Debug/Lib2.Book.resources
./Lib2/obj/Debug/Lib2.Choco.foo.resources
+./Lib2/obj/Debug/Lib2.csproj.FilesWrittenAbsolute.txt
./Lib2/obj/Debug/Lib2.dll
./Lib2/obj/Debug/Lib2.dll.mdb
./Lib2/obj/Debug/Lib2.InvalidCulture.bar.txt
@@ -45,15 +49,16 @@
./Lib2/obj/Debug/Lib2.Publisher.fr-CA.resources
./Lib2/obj/Debug/Lib2.Publisher.fr-FR.resources
./Lib2/obj/Debug/Lib2.Publisher.resources
-./Lib2/obj/Lib2.csproj.FilesWrittenAbsolute.txt
./Lib3/bin/Release/Lib3.dll
-./Lib3/obj/Lib3.csproj.FilesWrittenAbsolute.txt
+./Lib3/bin/Release/Lib3.dll.mdb
+./Lib3/obj/Release/Lib3.csproj.FilesWrittenAbsolute.txt
./Lib3/obj/Release/Lib3.dll
+./Lib3/obj/Release/Lib3.dll.mdb
./Lib4/bin/Debug/Lib4.dll
./Lib4/bin/Debug/Lib4.dll.mdb
+./Lib4/obj/Debug/Lib4.csproj.FilesWrittenAbsolute.txt
./Lib4/obj/Debug/Lib4.dll
./Lib4/obj/Debug/Lib4.dll.mdb
-./Lib4/obj/Lib4.csproj.FilesWrittenAbsolute.txt
./Lib5/bin/Debug/en-US/Lib5.resources.dll
./Lib5/bin/Debug/fr-CA/Lib5.resources.dll
./Lib5/bin/Debug/fr-FR/Lib5.resources.dll
@@ -68,6 +73,7 @@
./Lib5/obj/Debug/Lib5.Book.fr-CA.resources
./Lib5/obj/Debug/Lib5.Book.resources
./Lib5/obj/Debug/Lib5.Choco.foo.resources
+./Lib5/obj/Debug/Lib5.csproj.FilesWrittenAbsolute.txt
./Lib5/obj/Debug/Lib5.dll
./Lib5/obj/Debug/Lib5.dll.mdb
./Lib5/obj/Debug/Lib5.InvalidCulture.foo.txt
@@ -75,7 +81,6 @@
./Lib5/obj/Debug/Lib5.Publisher.fr-CA.resources
./Lib5/obj/Debug/Lib5.Publisher.fr-FR.resources
./Lib5/obj/Debug/Lib5.Publisher.resources
-./Lib5/obj/Lib5.csproj.FilesWrittenAbsolute.txt
./Project01/bin/Debug/abc.dll
./Project01/bin/Debug/bar.dll
./Project01/bin/Debug/en-US/Lib1.resources.dll
@@ -86,6 +91,7 @@
./Project01/bin/Debug/fr-FR/Lib2.resources.dll
./Project01/bin/Debug/Lib1.deploy.txt
./Project01/bin/Debug/Lib1.dll
+./Project01/bin/Debug/Lib1.dll.mdb
./Project01/bin/Debug/Lib2.dll
./Project01/bin/Debug/Lib2.dll.mdb
./Project01/bin/Debug/lib2_folder/Lib2.deploy.txt
@@ -93,6 +99,6 @@
./Project01/bin/Debug/Lib4.dll.mdb
./Project01/bin/Debug/Project01.exe
./Project01/bin/Debug/Project01.exe.mdb
+./Project01/obj/Debug/Main.csproj.FilesWrittenAbsolute.txt
./Project01/obj/Debug/Project01.exe
./Project01/obj/Debug/Project01.exe.mdb
-./Project01/obj/Main.csproj.FilesWrittenAbsolute.txt
diff --git a/mcs/tools/xbuild/xbuild.sln b/mcs/tools/xbuild/xbuild.sln
index 6f596626902..bd8abd1f270 100644
--- a/mcs/tools/xbuild/xbuild.sln
+++ b/mcs/tools/xbuild/xbuild.sln
@@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xbuild", "xbuild.csproj", "
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine.Test", "..\..\class\Microsoft.Build.Engine\Microsoft.Build.Engine.Test.csproj", "{A2F451CD-8701-434A-A562-EF1809E2DB7D}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xbuild.tests", "Test\xbuild.tests\xbuild.tests.csproj", "{929D9BCD-2280-4B6D-AD69-0FD089E344C2}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -26,6 +28,12 @@ Global
{89938F1A-C851-41D5-96D2-C329E00887B6}.DebugMS|Any CPU.Build.0 = DebugMS|Any CPU
{89938F1A-C851-41D5-96D2-C329E00887B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{89938F1A-C851-41D5-96D2-C329E00887B6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.DebugMS|Any CPU.ActiveCfg = Debug|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.DebugMS|Any CPU.Build.0 = Debug|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {929D9BCD-2280-4B6D-AD69-0FD089E344C2}.Release|Any CPU.Build.0 = Release|Any CPU
{A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2F451CD-8701-434A-A562-EF1809E2DB7D}.DebugMS|Any CPU.ActiveCfg = DebugMS|Any CPU
@@ -33,6 +41,9 @@ Global
{A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = ..\..\class\Microsoft.Build.Engine\Microsoft.Build.Engine.csproj
+ EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets b/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
index 087bd4b1486..783cc74b2cb 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.CSharp.targets
@@ -33,7 +33,7 @@
DebugType="$(DebugType)"
DefineConstants="$(DefineConstants)"
DelaySign="$(DelaySign)"
- DisabledWarnings="$(_DisabledWarnings)"
+ DisabledWarnings="$(NoWarn)"
DocumentationFile="@(DocFileItem)"
EmitDebugInformation="$(DebugSymbols)"
ErrorReport="$(ErrorReport)"
@@ -62,8 +62,9 @@
WarningsAsErrors="$(WarningsAsErrors)"
Win32Icon="$(Win32Icon)"
Win32Resource="$(Win32Resource)"
- Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)" />
- <!-- ToolPath="$(CscToolPath)" -->
+ Resources="@(ManifestResourceWithNoCulture);@(ManifestNonResxWithNoCultureOnDisk);@(CompiledLicenseFile)"
+ ToolExe="$(CscToolExe)"
+ ToolPath="$(CscToolPath)" />
</Target>
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
index 0fd768864e6..0fc3faed53f 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.Common.targets
@@ -16,6 +16,7 @@
<OutputPath Condition="'$(OutputPath)' != '' and !HasTrailingSlash('$(OutputPath)')">$(OutputPath)\</OutputPath>
<OutputPath Condition=" '$(Platform)'=='' and '$(Configuration)'=='' and '$(OutputPath)'=='' ">bin\Debug\</OutputPath>
<WarningLevel Condition="'$(WarningLevel)' == ''" >2</WarningLevel>
+ <TargetFrameworkVersion Condition="'$(TargetFrameworkVersion)' == ''">v2.0</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup>
@@ -82,7 +83,15 @@
/>
<GetFrameworkPath>
- <Output TaskParameter="Path" PropertyName="TargetFrameworkPath"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion35Path"
+ ItemName="TargetFrameworkDirectories"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion30Path"
+ ItemName="TargetFrameworkDirectories"/>
+ <Output Condition="'$(TargetFrameworkVersion)' == 'v2.0' or '$(TargetFrameworkVersion)' == 'v3.0' or '$(TargetFrameworkVersion)' == 'v3.5'"
+ TaskParameter="FrameworkVersion20Path"
+ ItemName="TargetFrameworkDirectories"/>
</GetFrameworkPath>
</Target>
@@ -125,7 +134,7 @@
AssemblyFiles="@(ChildProjectReferences)"
SearchPaths="$(AssemblySearchPaths)"
CandidateAssemblyFiles="@(Content);@(None)"
- TargetFrameworkDirectories="$(TargetFrameworkPath)"
+ TargetFrameworkDirectories="@(TargetFrameworkDirectories)"
AllowedAssemblyExtensions="$(AllowedReferenceAssemblyFileExtensions)"
AllowedRelatedFileExtensions="$(AllowedReferenceRelatedFileExtensions)"
FindDependencies="true"
@@ -366,6 +375,8 @@
DelaySign="$(DelaySign)"
EmbedResources = "@(ManifestResourceWithCulture);@(ManifestNonResxWithCultureOnDisk)"
KeyFile="$(KeyOriginatorFile)"
+ ToolExe="$(AlToolExe)"
+ ToolPath="$(AlToolPath)"
OutputAssembly = "$(IntermediateOutputPath)%(Culture)\$(AssemblyName).resources.dll" >
<Output TaskParameter="OutputAssembly" ItemName="FileWrites"/>
</AL>
@@ -546,13 +557,12 @@
<!-- this gets invoked in two cases, from CoreBuildDependsOn, if the build completes
successfully, OR from OnError in CoreBuild, if the build failed and $(RunPostBuildEvent)
- is 'Always' or 'OnOutputUpdated' -->
+ is 'Always' or 'OnOutputUpdated'. Invoke $(PostBuildEvent) if its either Empty (== OnBuildSuccess)
+ or OnBuildSuccess or Always OR (OnOutputUpdated and output assembly got updated) -->
<Target Name="PostBuildEvent"
Condition="'$(PostBuildEvent)' != '' and
- ('$(RunPostBuildEvent)' == 'Always' or '$(RunPostBuildEvent)' == 'OnBuildSuccess' or
- ('$(RunPostBuildEvent)' == 'OnOutputUpdated' and
- '$(_AssemblyModifiedTimeBeforeCompile)' != '$(_AssemblyModifiedTimeAfterCompile)')
- )"
+ ('$(RunPostBuildEvent)' != 'OnOutputUpdated' or
+ '$(_AssemblyModifiedTimeBeforeCompile)' != '$(_AssemblyModifiedTimeAfterCompile)')"
DependsOnTargets="$(PostBuildEventDependsOn)">
<Exec WorkingDirectory="$(OutDir)" Command="$(PostBuildEvent)" />
@@ -598,7 +608,7 @@
<Target Name="_RecordCleanFile"
DependsOnTargets="_GetCompileOutputsForClean">
<WriteLinesToFile
- File="$(BaseIntermediateOutputPath)$(CleanFile)"
+ File="$(IntermediateOutputPath)$(CleanFile)"
Lines="@(FileWrites->'%(FullPath)')"
Overwrite="true"/>
</Target>
@@ -626,7 +636,7 @@
<!-- Get the list of files written, for clean -->
<Target Name="_GetCleanFileWrites"
DependsOnTargets="_GetCompileOutputsForClean">
- <ReadLinesFromFile File="$(BaseIntermediateOutputPath)$(CleanFile)">
+ <ReadLinesFromFile File="$(IntermediateOutputPath)$(CleanFile)">
<Output TaskParameter="Lines" ItemName="FileWrites"/>
</ReadLinesFromFile>
</Target>
diff --git a/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets b/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
index 2a7f91152b2..eb3c3fd96ad 100644
--- a/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
+++ b/mcs/tools/xbuild/xbuild/Microsoft.VisualBasic.targets
@@ -77,8 +77,9 @@
WarningsNotAsErrors="$(WarningsNotAsErrors)"
Win32Icon="$(Win32Icon)"
Win32Resource="$(Win32Resource)"
+ ToolExe="$(VbcToolExe)"
+ ToolPath="$(VbcToolPath)"
/>
- <!-- ToolPath="$(CscToolPath)" -->
</Target>