I am using the latest version of Visual Studio 2022, which is 17.2.6.
If I create a new project of the type "Standalond Typescript Angular Project", make no modifications whatsoever and try to start the project, then it opens a console window with title ngcc and (after a while) shows the following content:
> [email protected] start
> ng serve
√ Browser application bundle generation complete.
Initial Chunk Files | Names | Size
vendor.js | vendor | 1.67 MB
polyfills.js | polyfills | 336.18 kB
styles.css, styles.js | styles | 212.40 kB
main.js | main | 53.50 kB
runtime.js | runtime | 6.87 kB
| Initial Total | 2.26 MB
Build at: 2022-07-16T15:17:53.888Z - Hash: ad802c438fec0f97 - Time: 12103ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
√ Compiled successfully.
At this point I can open the address http://localhost:4200/ in a browser and it loads the page correctly.
However, Visual Studio gets stuck showing the text "Deploy started..." in the status bar.
The Visual Studio output window has the following content:
Build started...
1>------ Build started: Project: angularproject1, Configuration: Debug Any CPU ------
2>------ Deploy started: Project: angularproject1, Configuration: Debug Any CPU ------
If I abort the program in the console, the Visual Studio shows the message
There were deployment errors. Continue?
In another scenario, I have created a solution with two new projects:
and made them both startup projects (with the Web APU starting first). This is the scenario that I actually want to use.
In this case I get exactly the same effect, but the single "Standalond Typescript Angular Project" seems to be the easiest way to reproduce the problem.
Why is Visual Studio hanging up in the deployment step?
EDIT
I have made another test, exactly following the instructions on the following page:
https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-angular?view=vs-2022
The behavior is identical, Visual Studio hangs up waiting for the deployment to be completed.
EDIT
According to Microsoft, this issue is fixed in Visual Studio 2022 version 17.6
https://developercommunity.visualstudio.com/t/Visual-Studio-2022-blocks-waiting-for-de/10097068
Had the exact problem. The fix for me was to install a different Node version.
Using the nvm version manager for Node I was able to install the latest using:
nvm install lts
In my case, it installed v16.16.0. Then I set as current using:
nvm use v16.16.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With