简体   繁体   中英

.Net build is failing due to invalid applicationHost.config

Folks,

Am trying to run a build using the below command line however there is a prompt everytime which is causing trouble. I have to address this manually and cannot run automated builds.

$currentScriptPath = (pwd).Path
$solution = "$($currentScriptPath)\foobar_Msi.sln"
$project = "$($currentScriptPath)\foobarSetup\foobarSetup.vdproj"
$BuildLog = "$($currentScriptPath)\buildlog.txt"
$devEnvCom = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
$devEnvExe = "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"
$PackagePath = "$($currentScriptPath)\ReleasePackage"
.
.
.
& $devEnvCom $solution /project $project /Build release /Out $BuildLog

An error occured when applying the IIS Express settings to server URL ' http://localhost:2943/ ' for project 'Foobar.UI'. You may have to manually edit the applicationHost.config file and make the changes for your site to run correctly

I cleared IISAppsettings in document, tried non-interactive command line arguments, changed the binding in build servers applicationHost.Config file and nothing works.

On your development machine, copy/move the solution to a local path that exactly matches the one it will be in when the automated build is run. Open the solution in Visual Studio 2012, Save All, and add the hidden [solution path].VS\\applicationHost.config to source control.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM