setup_iis.ps1 654 B

12345678910111213141516171819202122
  1. param($action)
  2. $source = "C:\FrameworkBenchmarks\aspnet-stripped\src"
  3. # Stop
  4. if (Get-WebSite -Name Benchmarks) { Remove-WebSite -Name Benchmarks }
  5. if ($action -eq 'start') {
  6. # Because we don't use msbuild to compile the code, we do this all manually.
  7. & .\NuGet.exe install -o src\packages src\packages.config
  8. if (-Not (Test-Path src\bin)) { New-Item -Path src\bin -ItemType directory | Out-Null }
  9. $dlls = Get-ChildItem -path src\packages -recurse -include *.dll
  10. foreach ($dll in $dlls) {
  11. Copy-Item $dll src\bin
  12. }
  13. # Create a website in IIS
  14. New-WebSite -Name Benchmarks -Port 8080 -PhysicalPath $source
  15. }