Created
May 22, 2015 07:20
-
-
Save Workshop2/c9114fcd959bf4e1dfcf to your computer and use it in GitHub Desktop.
SpecsFor MVC with .NET 4.6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SpecsFor MVC doesn't seem to pick up the correct MSBUILD to use | |
// when it tries to compile your web app to host in IIS express. | |
// If you add a reference in your Test project to "Microsoft.Build.Utilities.v12.0" | |
// you can then use the "ToolLocationHelper" to get the MSBUILD.exe for a VS version | |
string msBuild = ToolLocationHelper.GetPathToBuildToolsFile("msbuild.exe", "14.0"); // 14.0 hard coded for VS2015 | |
var config = new SpecsForMvcConfig(); | |
config.UseIISExpress() | |
.With(webProjectDirectory, solutionDirectory) | |
.ApplyWebConfigTransformForConfig("Acceptance") | |
.UseMSBuildExecutableAt(msBuild); // <-- This is the important part |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment