Getting and Building EF Tools
The first order of business is to make sure you can build the code on your machine.
- Install the following pre-requisites:
- Using your preferred git client clone our git repo located at
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.
- 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
These commands only need to be run one time for each machine and do not need to be re-run every time you build.
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.
If you want to build the tooling and setup MSI without installing it, you can use the following command.
*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.
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:
- Tools > Options > Text Templating
- Ensure Show Security Message is set to False
- Set SQL Server as the default provider for the ASP.NET connection dialog
- Tools > Connect to Database...
- For Data source, select Microsoft SQL Server
- At the bottom, check Always use this selection
- Click OK
- 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
- Enter master for database name
- Click OK
Running the following command will build everything, install the tooling and run the tests.
You can also use the following command to just run the tests against the already built and installed tooling.
The tests can also be run from Visual Studio using an
xUnit.net runner extension.