Getting and Building EF Tools

The first order of business is to make sure you can build the code on your machine.

  1. Install the following pre-requisites:
  2. Using your preferred git client clone our git repo located at https://git01.codeplex.com/entityframework.

    git clone https://git01.codeplex.com/entityframework

    Note: The EF Runtime and EF Tooling share the same repo. If you've already cloned the repo to work with the runtime you can use your existing clone to work with the tooling also.

     

  3. In order to run unit tests against the delay-signed binaries, you need to run SkipStrongNames**. Obtain this and other NuGet packages from the OuterCurve Foundation NuGet public feed* by running the following command from a command prompt. This requires administrative privileges.

    BuildEFTools /t:RestorePackages 
    BuildEFTools /t:EnableSkipStrongNames

    These commands only need to be run one time for each machine and do not need to be re-run every time you build.

     

  4. You can now open the EFTools.sln file in the root of the source code and build using Visual Studio. There is also an EFToolsSetup.sln which will allow you to build the installer, but actual installation of the installer must be run from the command line because Visual Studio must be closed during this process.

    There is an BuildEFTools.cmd file that can be used to build the code base, install the designer, and run the tests from the command line. This command should be run from the Developer Command Prompt for VS2013 (or VS2012)

    The following command will build the tooling, create the setup MSI, and install the newly built tooling into Visual Studio. Note, this will require that you close any open instances of VS. Remember to use Developer Command Prompt.

    BuildEFTools /t:Install


    If you want to build the tooling and setup MSI without installing it, you can use the following command.

    BuildEFTools /t:Build

 

*By running build /t:RestorePackages, you will be initiating the download of other software from a NuGet-based feed that is owned by the Outercurve Foundation. You are responsible for locating, reading and complying with the license terms that accompany each such software. Each software that you obtain through this feed is licensed to you by its respective owner. We grant you no rights for third-party software from this feed.

**SkipStrongNames is required because the assemblies that are produced by building the open source code base are delay signed. Because the assemblies aren’t signed with the actual certificate we need to disable strong name verification for them. Delay signing ensures that the assemblies have the same strong name that they will have when signed with the Microsoft certificate and released on NuGet. Having the same strong name ensures products that build on top of Entity Framework (such as MVC Scaffolding) will work with open source builds.

Running Tests

There are two small, one-time tasks that you need to perform within Visual Studio before running the tests.

  • Disable the Text Templating security message:
    1. Tools > Options > Text Templating
    2. Ensure Show Security Message is set to False
  • Set SQL Server as the default provider for the ASP.NET connection dialog
    1. Tools > Connect to Database...
    2. For Data source, select Microsoft SQL Server
    3. At the bottom, check Always use this selection
    4. Click OK
    5. Enter .\SQLEXPRESS or (localdb)\v11.0 for server name (depending on which database is available)
      If you installed VS2012, .\SQLEXPRESS is available by default
      If you installed VS2013, (localdb)\v11.0 is available by default
    6. Enter master for database name
    7. Click OK

Running the following command will build everything, install the tooling and run the tests.

BuildEFTools

 
You can also use the following command to just run the tests against the already built and installed tooling.

BuildEFTools /t:Test

 

The tests can also be run from Visual Studio using an xUnit.net runner extension.

Last edited Feb 14 at 9:02 PM by jemartti, version 26

Comments

moozzyk Nov 5, 2013 at 3:54 AM 
Installing replaces the version you have now since the files live in the Common7\IDE folder and they will be replaced (AFAIR for experimental version registry settings are copied to a separate _Exp key(s) but the experimental version uses the same core VS files as non-experimental version). If you need to go back to the version VS shipped with you can uninstall the currently installed version using "Add/Remove Programs" and then repair VS.

ErikEJ Nov 5, 2013 at 2:38 AM 
Will installing affect only the experimental VS instance, or also the main one? And how to revert to a RTM Tools version?