Add a new or existing project to a solution

This page applies to WPF and Silverlight 2

In Microsoft Expression Blend 2, you can add a new or existing project to a solution. This is useful to keep functionality separated into reusable projects that you can update in a single instance of Expression Blend 2 and build at the same time.

To add a new project to a solution

  1. With a project open in Expression Blend 2, use one of the following methods:

    • In the Project panel, right-click the name of your solution and then click Add New Project.

    • On the Project menu, click Add New Project.

    The Add New Project dialog box appears.

  2. Under Select a project type, select WPF Application to create another application or select WPF Control Library to create a set of user controls.

    The new project folder is added to your solution folder, and you can browse the project files in the Project panel.

  3. To be able to use controls from the new project in the original project, right-click the name of the original project under Files in the Project panel, click Add Project Reference, and then select the name of your new project.

  4. Build your solution by right-clicking the name of your solution under Files in the Project panel, and then clicking Build Solution. This makes sure that any user controls that are contained in the new project are available from the Custom Controls tab of the Asset Library in the original project.

  5. Every time that you update the new project, build your solution. This makes sure that updates to the new project are reflected on the artboard in the original project.

Cc296386.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top

To add an existing project to a solution

  1. With a project open in Expression Blend 2, use one of the following methods:

    • In the Project panel, right-click the name of your solution and then click Add Existing Project.

    • On the Project menu, click Add Existing Project.

    The Add Existing Project dialog box appears.

  2. Browse to the project file (.csproj or .vbproj) that you want to add, and then click Open.

    The project is added to your solution. The added project is not copied to your solution folder, but you can open the files in the added project by double-clicking them under Files in the Project panel.

  3. If the added project builds a DLL that you want to use in your original project, right-click the name of the original project under Files in the Project panel, click Add Reference, locate the DLL file, and then click Open.

  4. If the added project includes user controls that you want to use in your original project, right-click the name of the original project under Files in the Project panel, click Add Project Reference, and then select the name of your new project.

  5. Build your solution by right-clicking the name of your solution under Files in the Project panel and then clicking Build Solution. This makes sure that any user controls that are contained in the added project are available from the Custom Controls tab of the Asset Library in the original project.

  6. Every time that you update the added project, build your solution. This makes sure that updates to the added project are reflected on the artboard in the original project.

    Note

    When you right-click the name of your solution under Files in the Project panel, you can also select Rebuild Solution to rebuild everything including components that are built from files that have not been changed. Alternatively, you can select Clean Solution to delete all intermediate files that are generated by the build. If you select Test Solution, the solution will be built and then your application will run, showing the startup page of the original project.

Cc296386.7e183f1f-37d8-4dcb-980c-19a5d61ca087(en-us,Expression.10).gifBack to top