When i am bulding a SSIS task project getting below error
using System;
using System.IO;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;
using System.Net;
using System.ServiceModel;
using System.Data;
using System.IO.Packaging;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Spreadsheet;
using X14 = DocumentFormat.OpenXml.Office2010.Excel;
namespace Microsoft.MyTask.SSIS.Tasks
{
[DtsTask
(
Description = "Custom SSIS My Task ",
DisplayName = "Convert My Task",
TaskType = "MyTask",
RequiredProductLevel = DTSProductLevel.None,
TaskContact = "ConvertExcelToCSV; Microsoft"
)]
public class MyTask : Task
{
string username = Environment.UserName;
string path = "F:\\MyTask\\MyTask.txt";
public void Write()
{
FileStream fs = null;
if (!File.Exists(path))
{
using (fs = File.Create(path))
{
}
}
if (File.Exists(path))
{
using (StreamWriter sw = new StreamWriter(path))
{
sw.Write("Started :" + DateTime.UtcNow.ToString() + Environment.NewLine);
sw.Write("cd U:\\jashobanta" + Environment.NewLine);
sw.Write("@ftp -i -s:\"%~f0\"&GOTO:EOF" + Environment.NewLine);
sw.Write("open mvsb" + Environment.NewLine);
sw.Write("Sanjay :" + Environment.NewLine);
sw.Write("Sharma :" + Environment.NewLine);
sw.Write("get 'DEVJKC9.PARMCARD.BACKUP(STORES)' ftp.txt" + Environment.NewLine);
sw.Write("bye");
sw.Write(Environment.NewLine + "exit");
sw.Write("Ended :" + DateTime.UtcNow.ToString() + Environment.NewLine);
sw.Close();
}
}
}
public override DTSExecResult Execute(Microsoft.SqlServer.Dts.Runtime.Connections cons,
VariableDispenser vars, IDTSComponentEvents events,
IDTSLogging log, Object txn)
{
if (this.path == "")
{
events.FireWarning(0, "RegSysOEMCRM", "File copy location not specified.", "", 0);
return DTSExecResult.Failure;
}
else
{
try
{
Write();
return DTSExecResult.Success;
}
catch (Exception exception)
{
events.FireError(0, "File Writing Exception :", exception.Message, "", 0);
return DTSExecResult.Failure;
}
}
}
}
}
Error 18 The command ""C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\..\..\..\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe" -u DocumentFormat.OpenXml" exited with code 1. F:\MyTask\MyTask.SSIS.Tasks\MyTask.SSIS.Tasks\MyTask.SSIS.Tasks\MyTask.SSIS.Tasks.csproj 152 5 MyTask.SSIS.Tasks
Sanjay