How to create an SSIS 2012 project using EzAPI?

I am trying to create an SSIS 2012 project using EzAPI. However, I cannot open the project file in Visual Studio after I save it to disk.

The im code used to create a simple project containing one package is as follows:

EzProject MyProject = new EzProject(); EzPackage MyPackage = new EzPackage(); MyPackage.Name = "MyPackage"; MyProject.AddPackage(MyPackage); MyPackage.SaveToFile("C:/Temp/MyPackage.dtsx"); MyProject.SaveAs("C:/Temp/MyProject.dtproj"); 

As expected, my C: / Temp folder contains the package and the .dtproj file. However, I cannot open the dtproj file in Visual Studio. The error I find when I try: "Exception from HRESULT x80041FEB"

Also, when I open the .dtproj file in notepad, it does not contain XML, like the .dtproj file. It contains some gibberish with a lot of special characters (for example: eQMs, 0ΒΌwÆÿÀÀ $ |)

Í'm using the latest version of EzAPI, which can be downloaded here: http://sqlsrvintegrationsrv.codeplex.com/releases/view/82369

What am I doing wrong?

+4
source share
1 answer

I finally realized what was going on.

EzProject.SaveAs does not create a .dtproj file, but a .ispac file. Which contains all the project files and can be deployed to SQL Server.

When you open a .ispac file, such as WinZip, you will see that it contains all the packages and other project metadata.

In the code below, a project containing one package will be created and saved in a .ispac file.

  EzProject MyProject = new EzProject(); MyProject.Name = "MyProject"; EzPackage MyPackage = new EzPackage(); MyPackage.Name = "MyPackage"; MyProject.AddProjectParameter("MyParameter", TypeCode.Boolean); MyProject.AddPackage(MyPackage); MyProject.SaveAs("C:/MyProject.ispac"); MyProject.CloseProject(); 
+3
source

All Articles