Skip to main content

Command Palette

Search for a command to run...

Taming Visual Studio’s CPU Usage: A Lightweight Workflow for Angular + MVC + API Projects

Updated
2 min read
Taming Visual Studio’s CPU Usage: A Lightweight Workflow for Angular + MVC + API Projects
A

I am a developer from Kerala.

“Alas! Wielding a Chainsaw Where Scissors Suffice.”
When developing multi-layer applications, sometimes the tools we use are far heavier than the actual task at hand.

If you’re building an Angular frontend hosted inside an ASP.NET MVC project with a .NET API, chances are you’ve run into this,

  • Visual Studio consuming close to 100% CPU

  • Fans spinning like a jet engine

  • Even small operations feeling sluggish (Yeah, I copied and pasted a line in the same file and it was showing me a loading symbol)

I ran into this exact issue and found a lightweight alternative that cut CPU usage from ~100% down to under 30%, all while keeping Angular, MVC, and API running smoothly.

Why Visual Studio Eats CPU

  • Roslyn Code Analysis & IntelliSense → continuously scanning large solutions

  • ServiceHub background services → CodeLens, Live Analysis, and telemetry

  • Running Angular inside Visual Studio → even though it’s not needed just to serve the frontend

The end result? High resource usage for tasks that don’t really require Visual Studio.

A Lighter Alternative

For Angular development, Visual Studio Code (or any editor) is much lighter compared to full Visual Studio.
Visual Studio is still invaluable when debugging MVC or API issues but it doesn’t need to stay open all the time just to host projects.

Instead, you can run your projects directly from the command line.

Run the API with dotnet run

From the folder where your .csproj file is located

dotnet run --urls "<protocol>://localhost:<port>"

Example:

dotnet run --urls "https://localhost:7001"

This spins up your API without needing Visual Studio.

Run the MVC Project with IIS Express

From the folder containing your web.config:

"<path-to-iisexpress.exe>" /path:"<path-to-project>" /port:<desired-port>

Example:

"C:\Program Files (x86)\IIS Express\iisexpress.exe" /path:"C:\Path\to\Project\Folder" /port:20500

This runs your MVC project lightweight via IIS Express.

Benefits of This Setup

  • Lower CPU usage (under 30% vs ~100%)

  • Faster Angular hot reloads

  • No need to keep Visual Studio open all the time

  • Flexibility: only open VS when debugging MVC or API issues

Visual Studio is a fantastic tool, but it’s often overkill for day-to-day frontend development. By separating concerns, running MVC and API manually, and Angular independently you can enjoy a smoother, faster workflow without your CPU maxing out.

If you’re struggling with performance in your dev environment, give this approach a try. Sometimes, trading the chainsaw for a pair of scissors is all you need.