dotnet restore cd srcXXXXX md publish dotnet publish -o publish cd publish set siteFilePath=%cd% set name="TEST" set siteHost="8888" cd C:WindowsSystem32inetsrv C: appcmd stop site /site.name:%name% appcmd stop AppPool /AppPool.name:%name% appcmd delete site /site.name:%name% appcmd delete AppPool /AppPool.name:%name% appcmd add AppPool /name:%name% /managedRuntimeVersion:"" appcmd add site /name:%name% /applicationDefaults.applicationPool:%name% /bindings:http/*:%siteHost%: /physicalPath:"%siteFilePath%" appcmd start site %name%
相关链接: