Posts tagged ‘Visual Studio’

Resetting the View in the SSIS Designer

There’s a minor annoyance in SSIS with the way the diagram of the package is saved. If you’ve ever spent time working in a package with a lot of objects, you’ve probably encountered it. You move some objects around, save the package, close it, then reopen it. When the package is displayed, the objects are off center, or maybe don’t even show up. This is because the view is scrolled so that all the objects aren’t in the initial viewable area.

If you want a little background on what’s happening, read this paragraph. Otherwise, skip ahead to the next one. Each object in the diagram is saved with it’s x (Horizontal) and y (Vertical) coordinates persisted in the DTSX file. In addition, the view’s current Left and Top position is saved as well. These settings tell the IDE how to lay out the diagram, and how to initially position the view of it.

To reset the initial view, you need to alter the XML for the package directly. As with any direct editing of the XML, it’s not supported, and you should definitely make a backup of the package first. You need to alter the PersistedViewPortLeft and PersistedViewPortTop properties. Be aware, there may be multiple copies of these values, one set for the control flow, and one set for each data flow defined in the package. You can set these values to 0 in order to reset the view to a 0,0 top left corner.

The XML tags you are looking for look like:


They may also appear as escaped versions of the XML (not sure why, some of my packages do this, others display normally):


Just change the value between the tags to set the property value.

x64 Development and Visual Studio Assembly References

This is a Random Bits post – not on my normal BI related topics, but something I found useful and wanted to record somewhere in case it could help someone else.

I recently upgraded to a new laptop running Vista 64-bit. It’s been a bit of an adventure getting everything working, particularly as I work with several people who are still on XP 32-bit, so I have to make sure I can continue to work with others on shared projects. 

One little piece of information I found was related to Visual Studio. I am working on project (BIDSHelper) that requires file references to a number of assemblies that are not in the global assembly cache (GAC). When you add these references in Visual Studio, a relative path from the IDE is added to the project file that points to the assembly. It’s in the <HintPath> tag in the project file.

Unfortunately, these assemblies are not in the same location in a 64-bit install as they are in a 32-bit install. If I just changed the file reference, it would break everyone else’s project, but I couldn’t move forward without resetting them. However, I found a reference online to using reference paths (found in the Project Properties) to refer to assemblies. This allows you to specify a folder (or folders) that will be searched for assemblies or other items used by the project. In my case, simply adding the folder that the assemblies were in to the Reference Paths allowed me to continue developing without impacting my teammates.

This is probably well known to people who spend more time doing .NET development, but it was definitely helpful for me.

Reference Paths In Books Online