Reputation:
I have created a new project following this tutorial https://www.youtube.com/watch?v=ytDTkFJOJIE using aspnet core spa templates (angular to be specific).
So when I run "dotnet run" the first time it works fine, it runs the site as to be expected.
Now, when I commit a change, like delete the navbar and the references to it, the "main-server.js" and "main-client.js" don't update, nor does the site in the browser.
What am I doing wrong? If any more info is needed, let me know.
Upvotes: 10
Views: 10379
Reputation: 310
In my case it failed to update because it was still running under IIS Express. I solved it by changing the profile from "IIS Express" to [project name] (both in the VS task bar and in the project properties under "Debug").
Upvotes: 1
Reputation: 1
I have passed trought the same problem.
You have two options:
Upvotes: 0
Reputation: 161
I too faced this problem while i executed my angular 7 with.net core app in IIS express in VS2017,
Upvotes: 0
Reputation: 181
I was facing same issue. Below steps worked for me:
Upvotes: 12
Reputation: 676
For me the problem was Visual studio had checked in the .js and .js.map files for a few of my .ts components.
Visual Studio also checks in the main-client.js, vendor.js, and vendor.css files by default. Makes sure to either remove these from source control (recommended) or check them out before running.
Upvotes: 1
Reputation:
It appears to be I had to set the environment variable. Although it might be set on launchSettings.json, you have to run this command
$Env:ASPNETCORE_ENVIRONMENT = "Development"
for it to work properly. Took me since yesterday to find this, hope it helps someone else.
Upvotes: 4