in

Dé specialist in .NET trainingen en consultancy

Jo-wen Mei

juni 2009 - Posts

  • Open Sql Server Express instance while working in Visual Studio

    In my Visual Studio project, I've added a local mdf database ("Service based database") to support Sql Server Express.

    By default, these databases are configured to run as user-instances.

    As a side-effect, it's not possible to work with your project as you would normally do, and at the same time open the database in Management Studio.

     

    Here's a very brief summary of the steps that fixed it for me:

    • Run this query in sql server: SELECT owning_principal_name, instance_pipe_name, heart_beat FROM sys.dm_os_child_instances
    • Copy the Pipe Name out of the query results.
    • On the File menu, click Connect Object Explorer to open the Connect to Server dialog.
    • Paste the Pipe Name from step 1 into the Server Name text box.
    • You have to use Windows Authentication, that's the only authentication supported by User Instances.
    • Click Connect.

     

    Now, you can debug your project and immediately see the results in Sql Management Studio!

    more details

  • Installation of Sql Server Express 2008

    Ok, the installation of Sql Server (Express) 2008 is not of the type "next-next-finish".

    I first installed the Sql Server Express 2008 instance, and then I wanted to have the Management Studio. (not a very exotic scenario is it?!)

    I ran the setup, and I selected the option to add new features to an existing instance. Makes sense, right? ..... guess again

     

    In order to add the Management Studio to an existing instance, you have to perform a new installation.  *cough*

     

    here are some common scenario's described

    Posted jun 24 2009, 10:47 by Jo-wen with no comments
    Filed under:
  • Use .config settings from your test project

    There's an extra step you have to take when you write a unit-test for a method that reads a config-setting.

    Assuming you have set up a separate test project, it will look for the config file in the test project directory.

    We could simply add an app.config here, but then we would have to manage two separate files..... which is evil!

     

    Somehow, we need to reference the original app.config.

    You can achieve this by modifying the configuration settings for the currently active testrun.

    Open the *.testrunconfig file. This can be done in two ways:

    1. it's listed under the "Solution items" in your Solution Explorer
    2. from the Test menu, select "Edit test run configurations"

    In the Deployment tab, select the app.config file of the actual project. The files listed here will be copied to the test project directory before running your tests.

     

    caveat: when this doesn't work, set the "Copy to output directory" property of the config file to "Copy always"

  • Team Foundation Sidekicks

    Team Foundation Sidekicks is a freely downloadable product suite designed to improve productivity when working with team-foundation version control.

    There is another companion product that works with MSBuild.

     

    The utilities provide a graphical interface to various functionalities that are only available through the command-line interface.

     

    My two favorite features:

    • delete the workspace for the user holding the lock (useful if the developer left your team/organisation, or when his computer crashed)
    • unlock the file

     

    Note: Microsoft also developed tfs enhancements: TFS Power Tools

  • 10 Silverlight tips and tricks

    I attended the Dutch Devdays, and there was a great session of Gill Cleeren on Silverlight.

    He explained several tips and tricks, which are definitely worth checking out!

     

    The tips are:

    •Creating a custom install experience
    •ASP.NET Membership Integration
    •Double clickety-click
    •Debugging services
    •Duplex services
    •Silverlight and SEO
    •Virtual Earth in Silverlight
    •Drag’n’drop and hit testing
    •Model-View-ViewModel
    •Async unit tests

    Posted jun 01 2009, 08:11 by Jo-wen with no comments
    Filed under: