locked
Webpack Dev Middleware - Different behavior on .Net Core 2.1 and 2.2? RRS feed

  • Question

  • User65310894 posted

    I recently started using the Webpack Dev Middleware on a Vue + .Net Core 2.1 project and it was working correctly.

    Then I decided to create a sample project with the bare minimum dependencies on .Net Core 2.2 but I coudln't get it to work, modifying a Vue File wouldn't trigger changes on the web page. As it turns out it seems that the exact same setup works correctly on .Net Core 2.1 !

    I created a repo with 2 projects, exact same setup for each but diferent .Net Core versions

    https://github.com/vlaem/HR-Behavior

    Is there any specific reason as of why this would be the case? Since the problem happens only with 2.2 Im guessing the problem might be somewhere on the midleware plugin?

    Thursday, June 27, 2019 3:37 AM

All replies

  • User-1764593085 posted

    Hi vlaem, 

    I find that asp.net core 2.2 default hosting module changes to InProcess while asp.net core 2.1 is OutOfProcess, this is the difference in your two projects.

    Not clear what the reason is but try to remove below code in Site22.csproj and it will work.

    <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>

    Best Regards,

    Xing

    Friday, June 28, 2019 10:06 AM
  • User-474980206 posted

    you are using the wrong method to get the root folder. you are using the folder your app is run from, which can vary by hosting environment. you should use the IHostingEnviroment properties instead of CurrentDirectory.

    Friday, June 28, 2019 3:34 PM