aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

UseAngularCliServer fail on .net core 3.0

Open tuxy42 opened this issue 7 years ago • 5 comments

Describe the bug

On net core 3.0 preview, Angular template execution fails on exception : System.AggregateException: One or more errors occurred. (One or more errors occurred. (Failed to start 'npm'. To resolve this:. ... See the InnerException for further details of the cause. ---> System.ComponentModel.Win32Exception: Invalid path name

To Reproduce

Steps to reproduce the behavior:

  • Allow preview version of .net core in Visual studio 2017
  • Generate angular template with cli command : dotnet new angular -o angularbase
  • Start application in VS (debug or release)

Expected behavior

spa.UseAngularCliServer(npmScript: "start") should start ng server correctly

tuxy42 avatar Jan 22 '19 22:01 tuxy42

Just additional information, npm is correctly installed and executable correctly referenced in path. With same project if I go back to target framework 2.2 everything is ok.

tuxy42 avatar Jan 23 '19 21:01 tuxy42

Thanks for contacting us, @tuxy42. @ryanbrandenburg, can you please look into this? Thanks!

mkArtakMSFT avatar Feb 05 '19 22:02 mkArtakMSFT

Another information, it's only true when "IIS express" debugging profil is selected, when I select "Project" name profile (self contained webserver I suppose) everything work well.

tuxy42 avatar Feb 06 '19 07:02 tuxy42

Thanks for contacting us, @tuxy42. Given that there have been many changes in Angular template, we think this issue has been addressed. If you feel otherwise, please open it or file a new issue for us to investigate.

mkArtakMSFT avatar May 23 '19 17:05 mkArtakMSFT

Hi not sure if this is relevant, but I have an issue which is either the same or at least similar/related. If you set up a .net core 3.0 web api project and an angular .net core 3.0 project and put them both into debug via IISExpress you can trigger the same bug as described above if you place a web API call from your angular app with a breakpoint within the api code and then just wait around 30 seconds and then click continue. If as described above you run the .net core 3.0 angular app in Project then everything works fine.

w00yay avatar Oct 17 '19 15:10 w00yay