Categories
.NET Business Intelligence

adding custom SSIS transformation to visual studio toolbox fails

Just very recently I encountered an issue in deploying a custom SSIS component assembly where I cannot add a custom SSIS transformation to the Visual Studio toolbox.

It turns out to be a relative “no-brainer” error if only the clues were more straightforward. Basically after deploying the assembly I could not find my component listed in the “SSIS Data Flow Items” tab list. [more]

There are a number of articles available online on creating custom SSIS objects (control flow tasks, source, destination, data transformation etc).

Here are a few :

Extending SSIS Part 1 – Creating a Custom Data Flow Transformation Component

Developing a Custom Data Flow Component

Developing a Custom Transformation Component with Synchronous Outputs and searching say using keyword “adding custom SSIS transformation” should return more.

 

At Agilone, we’ve been developing SSIS components to complement our products and one of the issues I’ve faced recently is when I was deploying the custom SSIS components (the assembly) and it’s time to add it to the toolbox (Choose Items > SSIS data flow items tab (since the component was a data flow item)) I was unable to see the component (or any component on the assembly I just added to GAC and the PipelineComponents folders).

I tried these (in different orders and to no avail but for completeness including in the list):

1) close BIDS (Visual Studio Shell) or reset toolbox and close BIDS

2) uninstall the assembly in GAC and reinstall the assembly in GAC

3) make sure that assembly is on the correct folder (e.g. DTSPipelineComponent – here are more details on deployment and testing – Deploying and Testing Custom SSIS Components)

4) restart SSIS service

5) reopen the project and try to re-add the component in the toolbox again.

As mentioned it didn’t do the trick and took me sometime to figure it out.

It turns out that there was a problem with the assembly. I built the version referencing some SQL 2005 libraries (DLL), specific version = true and when I deployed it to that server (which only had SQL 2008 DLLs) it failed silently and simply didn’t appear on the “SSIS Data Flow Items” tab.

There are more complex ways to figure out why it doesn’t appear in the said tab but I would like to share the more straightforward one.

After the step where you clicked Choose Items (for toolbox) when the dialog window appears instead of changing to the “SSIS Data Flow Items” tab, stay on the .NET Components. And then click browse and browse for the assembly which contains your custom SSIS component

If the assembly chosen doesn’t contain an SSIS component then it will say so.

However if the assembly contains errors (e.g. missing referenced assemblies among others) then it will also show an error dialog saying so.

That’s it. I hope it helps and saves you some time (since I wasn’t able to find this information quickly – for a good “googler”)

And for the more “complex” method I believe you can you fuslogvw or similar assembly binding logger/monitoring tool to figure out any issues on assembly binding (missing references) such as the one I encountered. But I suggest doing he “browse” test first before exploring those debugging techniques.

And finally, of course as for any project check that you have the right assemblies referenced, whether you want specific version true/false and make sure that all dependencies are in place.

 

Categories
.NET Career Growth

Resolve Namespace (Visual Studio, Resharper)

How do you "autogenerate" a "using" namespace for a class you typed in Visual Studio? Read along… [more]

I've seen a couple of presentations (in-person, online et al), webcasts etc where there the presenter typed a class name, highlighted by Visual Studio because the namespace cannot be resolved (no using directive or class was not prefixed by the correct a namespace – fully qualified name if that's the right term – though I think it applies to assemblies only).

Anyways, most if not all the time, what they do is add and type the using "directive" (not sure if directive is the right terms, if not then you may call it "usings") manually. There could be a some benefits this in presentations, like making the point clear that the namespace must be added (and what namespace it is). But if the audience are intermediate to advanced level, I think we can do away with it.  However, even in those cases, most are still doing it by typing manually.

I have nothing against this of course but for those who aren't that well versed enough of the numerous namespaces out there, the "resolve" feature in Visual Studio might save you a little time spent coding rather than finding which namespace it is in. Note however, that this only works if the DLL/assembly containing the namespace is referenced in the project. And the spelling and case sensitivity of the class is correct (at least for C#, not sure for VB). Even then, I'm sure a number of us knows the exact class name but not very certain about the namespace (or maybe we just want to save a little time, there's nothing wrong with that).

So to resolve the namespace in Visual Studio (2005, not sure about 2003 yet, but for sure 2008 has this too), here are the steps: (using StringBuilder as the class for this example)

1. Type the class name (make sure you type at the appropriate place/usage – otherwise, you might not be able to resolve properly if you have syntax errors around that area)

2. Right Click on the typed class name

3. context menu should appear and you should see a resolve context menu item (like the one below) 

4. Under the resolve context menu, you generally have two options. The one at the top (henceforth called "upper" option) will create a "using" directive on top of the you class file (something like what's in the image below)

Or if you choose the "lower" option, you Visual Studio would prefix your class with the correct namespace (if you have a reason not to use "using"). 

Also I did mention "generally two items". This is because there can be
more than two. Say if there are classes (with the same name) belonging
to more than one namespace. Each namespace will have a corresponding
menu item for the "upper" and the "lower" options.

So that's all ther is to it.

Finally, if you have Resharper (using v3.1 – and if you don't I suggest you give it a try) then when you hover over the class with the missing namespace you should something like:

Or as indicated in the menu that popped up, you can also place your cursor on the class then press Alt + Enter and the using directive will be added (not sure how to come up with the "lower" option in R#).

So there you have it. I believe one of the underutilized, simple yet productive features of Visual Studio. I suggest you try and use it and I wonder what reasons could make me think otherwise. If there is any.

Smile

Categories
.NET

Installing Visual Studio 2005 Service Pack 1 – Performance Notes

This is just a quick post as a heads up that installing Visual Studio 2005 SP1 takes a while depending on a number of factors[more]. But generally still takes a lot of time.

It has been available for sometime but I just needed to install one into another machine and despite installing it into a fairly high end desktop it still took more or less hour. What's worse is that when I first tried it today, it stated "Not Responding" and I was thinking it could just be that it's doing a lot of stuff in the background. After eating lunch, meetings, interviews it is still where it was 5 hrs ago and didn't even get past "Gathering Required Information stage".

Including links to be aware of when thinking of applying the patch below but bottomline for me is:

  1. don't take it too lightly as you might waste your time waiting
  2. make sure you're download is not corrupted (sad thing is that there seems to be no CRC or hash check for this) so to be safe, if it fails a little, redownload instead of resuming
  3. close all application you don't need (almost all before installing). This would probably include you antispy, virus or firewall (NOTE: it would be a good idea to disconnect from the internet/LAN for this)
  4. expect that this could take a long time and like number 1, find the most suitable time to do this without disrupting your work (Visual Studio must not be running during the install – nor do other applications as recommended in item 3)

ScottGu on Visual Studio 2005 SP1

Heath Stewart on his VS 2005 SP1 experience

Heath Stewart on why VS 2005 takes time to install

At about the same time I'm about to post this, I got this dialog.

Now I should get back to work and for those who haven't applied this yet, hope you have a better experience than I did (despite being the 3rd time I've installed this already) and hope this helps.

Categories
.NET Career Growth Data

Visual Studio 2008, SQL Server 2008, Windows Server 2008 Launch Philippines

Microsoft Philippines Launch for these new 2008 products will be on April 10, 2008 at the SMX Convention Center, SM Mall of Asia Complex.

Public Registration will begin on March 24 on this Registration Link 

Stay tuned for updates on:

http://msforums.ph/forums/p/46593/220607.aspx#220607

Microsoft Philippines Heroes Happen

Hope to see you there!

Categories
.NET

Visual Studio Gallery

Just ran into one of Bill Evjen's blog post about interesting Visual Studio Plugins and from there came across Visual Studio Gallery – Products and Extensions for Visual Studio.

I don't actually mess with my Visual Studio installation (except for CoolCommands) since as we know it's critical for work but if you feel like giving things a test drive then the items there looks pretty interesting. There's just too many new things going on and needs to be learned lately but trying things out than simply reading about them always is a good way to learn.

Categories
.NET

Install .NET Windows Service with Visual Studio Setup Wizard or Project

I've done this a couple of times but I still tend to forget at times so
I might as well post here for me and hopefully someone else's reference.

To create a Windows Service see this article by Ken Getz : Windows Services: New Base Classes in .NET Make Writing a Windows Service Easy

There
are a number of ways to install a windows service, one of which is
using installutil.exe but this post will be using Setup Project which
for me is a little easier to implement: [more]

Was working with VS2005 for this but I think the same things with VS2003 and will update this one for VS2008 soon.

Using SetUp Wizard template
1) open your Windows Service project in VS
2) add a Setup project to your solution

  • File > Add Project > New Project > Setup and Deployment Projects > Setup wizard
  • Set the location appropriate for your situation and click on OK

3) in the Setup wizard, skip page 1.
4) On page 2 (of 5) select "Create a Setup for a Windows application."
5) On page 3, select "Primary output from ."
6) On page 4, click on Finish.
7) The final step (a crucial one) is to add a custom action to run the code in the installer class you added to your project.

  • Right click on the setup project (Solution Explorer)
  • View > Editor > Custom Actions.
  • Right-click on the Install node in the Custom Actions treeview.
  • In the Select Item in Project dialog, make sure Application Folder is selected, and click on OK.
  • Click on OK again to select the "Primary output from " option. You should now see this as a child node of the Install node.

That's
all you have to do. Rebuild both the project and the setup project, run
the installation, and the service should be installed as a Windows
service.

Of course, this scenario doesn't deal with getting the
service started. Even if you've set the ServiceInstaller component's
StartType property to Automatic, you have to reboot the computer to
start the service. (Or, you can use the services.msc applet and start
it yourself.)


——–
Another alternative is to use the Setup Project instead of Setup Wizard.
1) Same as step 1 above
2) add a Setup project to your solution

  • file > Add Project > New Project > Setup and Deployment Projects > Setup Project (rather than Setup Wizard as above)
  • set the location appropriate for your situation and click on OK

3) Right click on the Setup Project (in Solution Explorer)

  • Add > Project Output > Select your Windows Service in the Project dropdown
  • Select Primary Output in the list below it.
  • Click OK

4) The final step (a crucial one) is to add a custom action to run the code in the installer class you added to your project.

  • Right click on the setup project (Solution Explorer)
  • View > Editor > Custom Actions.
  • Right-click on the Install node in the Custom Actions treeview.
  • In the Select Item in Project dialog, make sure Application Folder is selected, and click on OK.
  • Click on OK again to select the "Primary output from " option. You should now see this as a child node of the Install node.

Basically the difference is how the Output was specified to include the "Primary output from .".

Assuming there's nothing wrong with your VS, .NET framework then this should be easy.

Categories
.NET

Cool Commands addin for Visual Studio

The collapse/expand all project and the open containing folder (plus
other features) would save time/effort so check out this addin from
Gaston Milano. I've tried this out myself for sometime already and
didn't get into any issue so go give it a try.

http://weblogs.asp.net/gmilano/archive/2005/11/10/430240.aspx

Categories
.NET Web

HTTP 403.9 – Access Forbidden: Too many users are connected

I was trying to test multiple connections to my local IIS server when I
got the http status/error code above. This is because there is a limit
to the number of concurrent connections with Keep-Alive Enabled setting
ON.

http://www.experts-exchange.com/Web/Web_Servers/IIS/Q_20286298.html

So I unchecked "HTTP Keep-Alive enabled" and the issue was resolved.

But
when I run/debug from Visual Studio (for an application configured to
run on IIS) i got an "Unable to start debugging on the web server. An
authentication error ocurred while communicating with the web
server…". IMHO, the error messages doesn't quite help in debugging
but it turns out that Visual Studio just needs the the keep-alive
setting ON to work for applications configured to run on IIS. Turned it
back on and worked fine.

Categories
.NET

Missing Visual Studio Recent Project/File list

Either you just missed to add it in your Menu (Tools > Customize –
take it from there) or you have set your windows to not remember your
most recent document list. Yes Visual Studio depends on the windows
setting.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=108731