* AL.cs: Added Output attribute to OutputAssembly.
* AppDomainIsolatedTaskExtension.cs: Added LoadInSeparateAppDomain
attribute.
* Copy.cs: Added Output attribute to DestinationFiles and Required to
SourceFiles.
* CreateItem.cs, CreateProperty.cs: Changed string to string[].
* Csc.cs: Added PdbFile property.
* Error.cs: Added Code and HelpKeyword properties.
* Exec.cs: Changed TaskExtension to ToolTaskExtension.
* GenerateResource.cs: Added NeverLockType and PublicClass properties.
* GenerateTrustInfo.cs: Added Required to TargetZone and Output to
TrustInfoFile.
* GetFrameworkPath.cs, GetFrameworkSdkPath: Added Output to Path.
* MSBuild.cs: Changed string to string[].
* ReadLinesFromFile.cs: Added Required to File.
* RegiserAssembly.cs: Added AssemblyListFile and CreateCodeBase
properties.
* UnregisterAssembly.cs: Added AssemblyListFile property.
* WriteLinesToFile.cs: Added Required to Lines.
svn path=/trunk/mcs/; revision=57304
Assembly/AssemblyInfo.cs
Microsoft.Build.Tasks/AL.cs
Microsoft.Build.Tasks/AppDomainIsolatedTaskExtension.cs
+Microsoft.Build.Tasks/CombinePath.cs
Microsoft.Build.Tasks/CommandLineBuilderExtension.cs
Microsoft.Build.Tasks/Copy.cs
Microsoft.Build.Tasks/CreateItem.cs
}
[Required]
+ [Output]
public ITaskItem OutputAssembly {
get { return (ITaskItem) Bag ["OutputAssembly"]; }
set { Bag ["OutputAssembly"] = value; }
#if NET_2_0
+using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace Microsoft.Build.Tasks {
+ [LoadInSeparateAppDomain]
public abstract class AppDomainIsolatedTaskExtension : AppDomainIsolatedTask {
public new TaskLoggingHelper Log {
get {
+2006-02-26 Marek Sieradzki <marek.sieradzki@gmail.com>
+
+ * AL.cs: Added Output attribute to OutputAssembly.
+ * AppDomainIsolatedTaskExtension.cs: Added LoadInSeparateAppDomain
+ attribute.
+ * Copy.cs: Added Output attribute to DestinationFiles and Required to
+ SourceFiles.
+ * CreateItem.cs, CreateProperty.cs: Changed string to string[].
+ * Csc.cs: Added PdbFile property.
+ * Error.cs: Added Code and HelpKeyword properties.
+ * Exec.cs: Changed TaskExtension to ToolTaskExtension.
+ * GenerateResource.cs: Added NeverLockType and PublicClass properties.
+ * GenerateTrustInfo.cs: Added Required to TargetZone and Output to
+ TrustInfoFile.
+ * GetFrameworkPath.cs, GetFrameworkSdkPath: Added Output to Path.
+ * MSBuild.cs: Changed string to string[].
+ * ReadLinesFromFile.cs: Added Required to File.
+ * RegiserAssembly.cs: Added AssemblyListFile and CreateCodeBase
+ properties.
+ * UnregisterAssembly.cs: Added AssemblyListFile property.
+ * WriteLinesToFile.cs: Added Required to Lines.
+
2006-02-25 Marek Sieradzki <marek.sieradzki@gmail.com>
* Csc.cs, ManagedCompiler.cs: Changes required by the new API.
}
}
+ [Output]
public ITaskItem[] DestinationFiles {
get {
return destinationFiles;
}
}
+ [Required]
public ITaskItem[] SourceFiles {
get {
return sourceFiles;
namespace Microsoft.Build.Tasks {
public class CreateItem : TaskExtension {
- string additionalMetadata;
+ string[] additionalMetadata;
ITaskItem[] exclude;
ITaskItem[] include;
return true;
}
- public string AdditionalMetadata {
+ public string[] AdditionalMetadata {
get { return additionalMetadata; }
set { additionalMetadata = value; }
}
set { exclude = value; }
}
+ [Output]
public ITaskItem[] Include {
get { return include; }
set { include = value; }
namespace Microsoft.Build.Tasks {
public class CreateProperty : TaskExtension {
- string value;
- string valueSetByTask;
+ string[] value;
+ string[] valueSetByTask;
public CreateProperty ()
{
return true;
}
- public string Value {
+ public string[] Value {
get { return this.@value; }
set { this.@value = value; }
}
// FIXME: is this value after evaluation?
- public string ValueSetByTask {
+ public string[] ValueSetByTask {
get { return valueSetByTask; }
}
}
set { Bag ["BaseAddress"] = value; }
}
- public bool CheckForOverflowUnderFlow {
- get { return GetBoolParameterWithDefault ("CheckForOverflowUnderFlow", false); }
- set { Bag ["CheckForOverflowUnderFlow"] = value; }
+ public bool CheckForOverflowUnderflow {
+ get { return GetBoolParameterWithDefault ("CheckForOverflowUnderflow", false); }
+ set { Bag ["CheckForOverflowUnderflow"] = value; }
}
public string DisabledWarnings {
get { return GetBoolParameterWithDefault ("NoStandardLib", false); }
set { Bag ["NoStandardLib"] = value; }
}
+
+ public string PdbFile {
+ get { return (string) Bag ["PdbFile"]; }
+ set { Bag ["PdbFile"] = value; }
+ }
public string Platform {
get { return (string) Bag ["Platform"]; }
namespace Microsoft.Build.Tasks {
public sealed class Error : TaskExtension {
- private string text;
+
+ string code;
+ string helpKeyword;
+ string text;
public Error ()
{
return true;
}
+ public string Code {
+ get { return code; }
+ set { code = value; }
+ }
+
+ public string HelpKeyword {
+ get { return helpKeyword; }
+ set { helpKeyword = value; }
+ }
+
public string Text {
- get {
- return text;
- }
- set {
- text = value;
- }
+ get { return text; }
+ set { text = value; }
}
}
}
using Microsoft.Build.Utilities;
namespace Microsoft.Build.Tasks {
- public class Exec : TaskExtension {
+ public class Exec : ToolTaskExtension {
string command;
- int exitCode;
bool ignoreExitCode;
ITaskItem[] outputs;
- int timeout;
+ string stdErrEncoding;
+ string stdOutEncoding;
string workingDirectory;
Process process;
public Exec ()
{
process = new Process ();
- timeout = Int32.MaxValue;
+ //timeout = Int32.MaxValue;
ignoreExitCode = false;
executionTime = 0;
}
process.Start ();
process.WaitForExit ();
- exitCode = process.ExitCode;
+ //exitCode = process.ExitCode;
while ((line = process.StandardOutput.ReadLine ()) != null)
temporaryOutputs.Add (line);
outputs = new ITaskItem [temporaryOutputs.Count];
return false;
}
- if (exitCode != 0 && ignoreExitCode == false)
+ /*if (exitCode != 0 && ignoreExitCode == false)
return false;
- else
+ else*/
return true;
}
+ [MonoTODO]
+ protected override string GenerateFullPathToTool ()
+ {
+ return null;
+ }
+
[Required]
public string Command {
get { return command; }
set { command = value; }
}
- [Output]
- public int ExitCode {
- get { return exitCode; }
- }
-
public bool IgnoreExitCode {
get { return ignoreExitCode; }
set { ignoreExitCode = value; }
set { outputs = value; }
}
- public Encoding StandardErrorEncoding {
+ protected override Encoding StandardErrorEncoding {
get { return Console.Error.Encoding; }
- set { Console.SetError (new StreamWriter(Console.OpenStandardError (), value)); }
+ }
+
+ protected override MessageImportance StandardErrorLoggingImportance {
+ get { return base.StandardErrorLoggingImportance; }
}
- public Encoding StandardOutputEncoding {
+ protected override Encoding StandardOutputEncoding {
get { return Console.Out.Encoding; }
- set { Console.SetOut (new StreamWriter (Console.OpenStandardOutput (), value)); }
}
-
- public int Timeout {
- get { return timeout; }
- set { timeout = value; }
+
+ protected override MessageImportance StandardOutputLoggingImportance {
+ get { return base.StandardOutputLoggingImportance; }
+ }
+
+ //FIXME: what's this?
+ public string StdOutEncoding {
+ get { return stdOutEncoding; }
+ set { stdOutEncoding = value; }
+ }
+
+ //FIXME: what's this?
+ public string StdErrEncoding {
+ get { return stdErrEncoding; }
+ set { stdErrEncoding = value; }
+ }
+
+ // FIXME: crashes the compiler when replaced with return base.ToolName
+ protected override string ToolName {
+ get { return String.Empty; }
}
public string WorkingDirectory {
}
}
-#endif
\ No newline at end of file
+#endif
public sealed class GenerateResource : TaskExtension {
ITaskItem[] filesWritten;
- //bool neverLockTypeAssemblies;
+ bool neverLockTypeAssemblies;
ITaskItem[] outputResources;
+ bool publicClass;
ITaskItem[] references;
ITaskItem[] sources;
ITaskItem stateFile;
}
}
- /*public bool NeverLockTypeAssemblies {
+ [MonoTODO]
+ public bool NeverLockTypeAssemblies {
get {
return neverLockTypeAssemblies;
}
set {
neverLockTypeAssemblies = value;
}
- }*/
+ }
[Output]
public ITaskItem[] OutputResources {
outputResources = value;
}
}
+
+ public bool PublicClass {
+ get { return publicClass; }
+ set { publicClass = value; }
+ }
public ITaskItem[] References {
get {
}
}
+ [Output]
public string StronglyTypedClassName {
get {
return stronglyTypedClassName;
}
}
- public string StronglyTypedFilename {
+ public string StronglyTypedFileName {
get {
return stronglyTypedFilename;
}
}
}
- [Required]
public string TargetZone {
get {
return targetZone;
}
[Required]
+ [Output]
public ITaskItem TrustInfoFile {
get {
return trustInfoFile;
#if NET_2_0
-using Microsoft.Build.Tasks;
+using Microsoft.Build.Framework;
namespace Microsoft.Build.Tasks {
public class GetFrameworkPath : TaskExtension {
return true;
}
+ [Output]
public string Path {
get {
return path;
#if NET_2_0
-using Microsoft.Build.Tasks;
+using Microsoft.Build.Framework;
namespace Microsoft.Build.Tasks {
public class GetFrameworkSdkPath : TaskExtension {
return true;
}
+ [Output]
public string Path {
get {
return path;
public class MSBuild : TaskExtension {
ITaskItem[] projects;
- string properties;
+ string[] properties;
bool rebaseOutputs;
bool runEachTargetSeparately;
bool stopOnFirstFailure;
}
}
- public string Properties {
+ public string[] Properties {
get {
return properties;
}
}
}
+ [Output]
public ITaskItem[] TargetOutputs {
get {
return targetOutputs;
}
+ [Required]
public ITaskItem File {
get {
return file;
public class RegisterAssembly : AppDomainIsolatedTaskExtension, ITypeLibExporterNotifySink {
ITaskItem[] assemblies;
+ ITaskItem assemblyListFile;
bool createCodeBase;
- ITaskItem stateFile;
ITaskItem[] typeLibFiles;
public RegisterAssembly ()
}
}
- public bool CreateCodeBase {
+ public ITaskItem AssemblyListFile {
get {
- return createCodeBase;
+ return assemblyListFile;
}
set {
- createCodeBase = value;
+ assemblyListFile = value;
}
}
- public ITaskItem StateFile {
+ public bool CreateCodeBase {
get {
- return stateFile;
+ return createCodeBase;
}
set {
- stateFile = value;
+ createCodeBase = value;
}
}
+ [Output]
public ITaskItem[] TypeLibFiles {
get {
return typeLibFiles;
namespace Microsoft.Build.Tasks {
public class UnregisterAssembly : AppDomainIsolatedTaskExtension {
- private ITaskItem[] assemblies;
- private ITaskItem stateFile;
- private ITaskItem[] typeLibFiles;
+
+ ITaskItem[] assemblies;
+ ITaskItem assemblyListFile;
+ ITaskItem[] typeLibFiles;
public UnregisterAssembly ()
{
}
}
- public ITaskItem StateFile {
+ public ITaskItem AssemblyListFile {
get {
- return stateFile;
+ return assemblyListFile;
}
set {
- stateFile = value;
+ assemblyListFile = value;
}
}
}
}
- [Required]
public ITaskItem[] Lines {
get {
return lines;