in

Platinum Bay

Peace, Love and Visual Studio Team System

.NETicated

September 2008 - Posts

  • MSDN Freedom Roadshow

    Are you around Pittsburgh? No? You should get there anyway! This Friday the MSDN Freedom Roadshow is coming to town with a whole day of learning including .NET 3.5, ASP.NET MVC, and AJAX. This is your chance to come see for yourself what all the excitement is about from the local Microsoft evangelists and MVPs.

    Where:

    Microsoft – Pittsburgh, PA

    Address:

    20 Isabella Street

    Second Floor

    Alcoa Business Services Center

    Pittsburgh, PA 15212

    When:

    9:00 am to 4:00 pm

    Doors open at 8:30 am

     

    For more information and to register for this event, please visit:

    http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032388335&culture=en-US

    Posted Sep 16 2008, 03:31 PM by Steve with no comments
    Filed under:
  • Team Foundation Answer Files for SQL Server

    In a previous post, I mentioned how the installer answer files simplify the installation of SQL Server for Team Foundation. Several folks have since asked me to elaborate on these files. Answer files are INI files preconfigured with the settings required for the SQL Server installation. The beauty of the answer files is that they eliminate the possibility of human error during critical component installations.

    There are several answer files, depending on what type of installation you are performing:

    Single-Tier Installation

    • SQL2005ForATDT.ini – installation file to install all the necessary SQL Server components for Team Foundation Server

    Dual-Tier Installation

    • SQL2005ForAT.ini – installation file for the Application Tier to install Reporting Services
    • SQL2005ForDT.ini – installation file for the Data Tier to install the SQL Engine, Analysis Services, etc.

    Inside the answer file(s) you will be using, you may want to change a couple parameters, including the setup user and company, and the instance name for SQL Server.

    The command to run setup using the answer file is as follows. It is important to note that the PIDKEY should be left blank for MSDN versions of SQL Server:

    <Installation Root>\setup.exe /qb /settings <Answer File Path> PIDKEY=<ProductKey>

    For a more detailed list of hands-free installation of all the required pieces, check out this series of posts by Grant Holliday.

  • Unit Test Deployment Woes

    One of the common complaints I hear about Unit Testing in Visual Studio centers around test deployment. By default, when you run a unit test, the assemblies get copied to another location to be run. The assemblies and test results are copied to the following folders:

        <Users Documents>\Visual Studio 2008\Projects\<Project Name>\Test Results

    There are then subfolders based on the username, computer name, date and time, and further sub-folders representing the inputs and outputs of the test(s).

    For most scenarios, this behavior is transparent and doesn't cause problems. If your assembly has dependencies however, unit tests can fail as the dependencies are not deployed automatically. You can attach deployment dependencies by double-clicking the LocalTestRun.testrunconfig file in the solution root, going to the Deployment tab, and adding any necessary files or directories that should be deployed with the assembly.

    But this is a bunch of extra work, and can be viewed as 'friction' by some. Fortunately, there is another option. Many of the folks who complain about the deployment feature of Unit Tests point to NUnit as having an option to turn deployment on or off.

    As it turns out, Unit Tests have the same option, and it was right under my nose the whole time. In the same Deployment tab, there is a checkbox at the top titled "Enable Deployment". By un-checking this options, you can tell the test framework not to deploy assemblies to another location before running the unit tests.

    If you would like to make non-deployment the default option, you can modify the LocalTestRun.testrunconfig file in the "C:\Program Files\Microsoft Visual Studio 9.0\Team Tools\Testing Tools\TestProjectCommon\Templates\RunConfig\1033" directory by changing the Deployment node to:

        <Deployment enabled="false" />

    There is one caveat however; code coverage, remote execution, and device test projects all require deployment, so turning it off will disable this functionality.

  • Add Reference and the GAC

    One common misconception regarding Visual Studio that I run across quite frequently involves the Add Reference dialog and the GAC.

    Adding a reference to a Visual Studio project is as simple as right-clicking on the References folder, choosing "Add Reference…", and selecting the reference you wish to add from the dialog box that appears. However, and here is the confusion, assemblies that have been registered in the GAC will not appear in this list. This is because the Add Reference dialog does not enumerate the assemblies installed in the GAC. Rather, it is path-based and uses several registry keys to locate assemblies with which to populate the dialog.

    Registry Keys:

    The registry keys used by Visual Studio to populate the Add References dialog are:

    • [HKEY_LOCAL_MACHINE]\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders
    • [HKEY_CURRENT_USER]\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders

    To add your assembly folder, create a sub key with a descriptive name, and set the default REG_SZ value to the folder path. If Visual Studio is open, it must be restarted for the added folder path to be enumerated. Notice that both the Local Machine and Current User registry hives are listed above. You can add assembly folders to either key to scope them if needed.

    Example:

    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\MyAssemblies]@="C:\\MyAssemblies"

    As a closing note, remember that it is not recommended to install assemblies to the GAC unless they need to be shared among multiple applications running on the system.

Powered by Community Server (Commercial Edition), by Telligent Systems
© Platinum Bay | Some Rights Reserved Creative Commons License

Disclaimer: The information in this weblog is provided "AS IS" with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I'm completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or annonymous comments) - so keep it polite, please.