vuorinem / aspnet-aurelia-webpack-skeleton

Application skeleton for starting Aurelia application on ASP.NET Core with Webpack.
15 stars 9 forks source link

Slowness when running from Visual Studio 2017 #2

Open mgroves opened 6 years ago

mgroves commented 6 years ago

Hello, and thank you for making this skeleton available. I've been struggling with the best way to get up and running with Aurelia in Visual Studio 2017, and this one seems to be promising.

I'm having a bit of trouble with slowness when having to recompile C# (like when adding a new Controller or Action, for instance). When I hit ctrl+f5 from Visual Studio, it seems to take a long time until the browser opens (longer than I'd expect), and I'm wondering if I'm missing something in the configuration. From time to time, I even get "the process cannot access the file 'bin\Debug\netcoreapp2.1\Client.dll" because it is being used by another process."

What am I missing?

vuorinem commented 6 years ago

Thanks for the feedback! It can take a while for the server and webpack to start up, for me it's about 5 seconds each, but usually I have a separate server for an API that the Aurelia client connects to, so I don't actually restart the Client application very often while developing. Webpack HMR can handle changes in some cases, othwewise I just refresh the browser.

For C# development I use dotnet watch to avoid having to restart the application after making changes. That works for this skeleton as well, so instead of running the application from VS, running dotnet watch run from command-line could slice off a chunk of the start-up time.

mgroves commented 6 years ago

Okay, I will give that a try. Is there any way to do that from Visual Studio itself? Perhaps something I could add to the csproj or whatever? I think that would help improve the developer experience when using Visual Studio.