2
votes

Windows 10, VS2015. I want next

  1. Before Build stop previous "dotnet run"
  2. After Build run "dotnet run"

Why? I want alway run on http://localhost:5000 web app

What I try

in project.json add

"scripts": {
    "postcompile": [ "dotnet run" ]
},

And Build process hang in loop

Project Web.Core (.NETCoreApp,Version=v1.0) will be compiled because dependencies changed

Compiling Web.Core for .NETCoreApp,Version=v1.0

Project Library.Core (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation.

Project Web.Core (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.

Compiling Web.Core for .NETCoreApp,Version=v1.0

Project Library.Core (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation.

Project Web.Core (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.

Compiling MyHome.Web.Core for .NETCoreApp,Version=v1.0

Project Library.Core (.NETStandard,Version=v1.6) was previously compiled. Skipping compilation.

Project Web.Core (.NETCoreApp,Version=v1.0) will be compiled because project is not safe for incremental compilation. Use --build-profile flag for more information.

Questions

  1. how run "dotnet run" after build without loop?

  2. how stop previous "dotnet run"?

1

1 Answers

2
votes

Current implementation of dotnet run calls dotnet build inside. There is an open request to add --no-build parameter, but this can be added in 1.0.0-preview3 or later.