Geoffroy’s Weblog

April 23, 2009

TFS and Visual Studio 2008

Filed under: Team Foundation Server, VisualStudio 2008 — gseive @ 11:32 pm

In order to do some branching / unit testing / building tests in isolation, I decided to do a complete install on a virtual machine using Microsoft Virtual PC 2007.

I had all the software from an MSDN license except for the key piece TFS 2008. Knowing my tests would be bound by this 90-day time period, I decided to go for the path of least resistance. As you will see from my list below, I don’t have everything “2008”!

Some of the things to note:

  • I kept an eye on the installation information from the install disk. It was open on my native machine (left monitor; right monitor dedicated to the virtual machine).
  • All the install disks were gathered in one folder as iso files.
  • I restricted myself to the User Administrator account whenever possible. When I had to I created a TFSAccount user member of Administrators group.
  • I did multiple Windows updates along the way to grab all existing updates.

I installed:

  • Windows Server 2003
  • SQL Server 2005 and the SQL Server SP2
  • Team Foundation Server 2008
  • Visual Studio Professional 2008 and the SP1
  • Visual Studio 2008 Team Explorer (downloaded it)
  • Team Foundation Sidekicks (for better access to TFS labels; but the tool has a bunch of other goodies)
  • Team Foundation Server Build
  • Microsoft TFS 2008 PowerTools (to monitor builds from the tray; a must have once continuous build is enabled)
  • AJAX extensions
  • ReShaper 4.5

April 9, 2009

Starting with Oracle Developer Tools for Visual Studio

Filed under: Oracle Developer Tools for Visual Studio, VisualStudio 2008 — gseive @ 11:56 pm

Having to develop a new Oracle package I decided this was a good opportunity to start exploring the ODT add-on I had installed in Visual Studio 2008 a while back. I followed those steps:

  • Created an empty solution
  • Added an Oracle Database Project in Other Project Types (not to be confused with a Visual C# / Database / Oracle Project)
  • Watched the project being added to the solution with folders for all the different types of Oracle database objects
  • Added a new Package to the Packages folder
  • Replaced the code templates with my own code
  • Run the script to create the package
  • Refreshed the Server Explorer pane and watched my package being added to the packages node
  • Added the solution to the Source Control

Word of caution

After that initial setup I ran into the same issue I had run into with SQL Server 2005 last year.

In order to run or debug your package I have to be on the Server Explorer side and any changes made to the PL/SQL code will be saved to the database. I then need to copy and paste back to the Solution Explorer in order to check in those changes. Or I can only make the changes in the Solution Explorer, Run to commit the changes to the database and then go and test in the Server Explorer.

Either way this requires great discipline and is prone to mistakes. Things got “worse” when I tried using another PL/SQL editor (like Oracle SQL Developer or PLSQL Developer) because of the greater context switching and the increased chances of forgetting to copy back to Visual Studio and committing to TFS. I don’t know of an ideal single-step solution yet.

I’ve started using a simpler approach based on the option in Server Explorer called “Generate Create Script to Project…”.  Using that approach both the specification and the body have to be generated separately. Also, each time a new file is generated it overrides the previous one in the Visual Studio project.

The code editor itself needs some polish. For instance it doesn’t have the code completion that Oracle SQL Developer has. The code collapsing partially works. Stored procedure and function names don’t always appear in the drop-down list above the code editor pane.

February 26, 2008

C# Regions

Filed under: C# Regions, VisualStudio 2005, VisualStudio 2008 — gseive @ 3:43 am

Regions in C# are pretty important as they help organize methods and code. It’s a pity this is not acknowledge in the VisualStudio 2005 / 2008 UI, maybe through another drop-down list on the left of the list of members.

Actually regions can rapidly become a nuisance as their number increases in a class and throughout the application. As you add more methods to that class, the only option left is to scroll up and down trying to figure out where those regions are and where to put that new method! Especially when you have regions within regions… “Collapse to Definitions” can help (in Edit / Outlining or Ctrl+M, Ctrl+O).

Maybe it’s time for me to check out the MSDN Visual Studio Extensibility Developer Center … I think a good starting point for ideas is the ENVY/Developer Smalltalk-based development environment.

Blog at WordPress.com.