public void ILMergeTest() { string outputFile = @"C:\myAssembly.dll"; if (File.Exists(outputFile)) { File.Delete(outputFile); } // Initialise Instance var target = new TfsBuildExtensions.Activities.Framework.ILMerge { Action = ILMergeAction.Merge, OutputFile = outputFile }; // Declare additional parameters var parameters = new Dictionary <string, object> { { "InputAssemblies", new[] { @"D:\Projects\teambuild2010contrib\MAIN\Source\Activities.ILMerge.Tests\TestFiles\ClassLibrary1.dll", @"D:\Projects\teambuild2010contrib\MAIN\Source\Activities.ILMerge.Tests\TestFiles\ClassLibrary2.dll" } }, }; // Create a WorkflowInvoker and add the IBuildDetail Extension WorkflowInvoker invoker = new WorkflowInvoker(target); invoker.Invoke(parameters); // Test the result Assert.IsTrue(File.Exists(outputFile)); }
public void ILMergeTest() { string outputFile = @"C:\myAssembly.dll"; if (File.Exists(outputFile)) { File.Delete(outputFile); } // Initialise Instance var target = new TfsBuildExtensions.Activities.Framework.ILMerge { Action = ILMergeAction.Merge, OutputFile = outputFile }; // Declare additional parameters var parameters = new Dictionary<string, object> { { "InputAssemblies", new[] { @"D:\Projects\teambuild2010contrib\MAIN\Source\Activities.ILMerge.Tests\TestFiles\ClassLibrary1.dll", @"D:\Projects\teambuild2010contrib\MAIN\Source\Activities.ILMerge.Tests\TestFiles\ClassLibrary2.dll" } }, }; // Create a WorkflowInvoker and add the IBuildDetail Extension WorkflowInvoker invoker = new WorkflowInvoker(target); invoker.Invoke(parameters); // Test the result Assert.IsTrue(File.Exists(outputFile)); }