1

We have a solution which contains a Net Core 2.2 (API) + Angular 7 project, from the Visual Studio standard template, which combines both.

Due to performance issues when loading/debugging this, we are looking at splitting the API and Angular, which feels like it would be a good idea anyway in case of additional clients in the future? It's taking well over a minute to fire up with debug.

So assuming our VS Solution has an API project in it, and some other class libraries. Then do we look to just add a folder in the file system for the angular project, keeping it outside of Visual Studio. Or is there a way of keeping it in the world of Visual Studio also?
As a note, we've started to use VS Code more and more for the client side dev work, so aren't wedded to VS for everything.

Taking it further should we spin up separate repos and keep them not even in the same folders?

Looking back on this I'm not sure if there's an outright answer or whether it's subjective. If it needs to go to one of the other stack's then no problem.

1
  • You could split Angular and .NET Core in different folder, VS with .net Core api and VS Code for Angular. For whether to place the angular folder in .NET Core solution, it depends on you. For better split, you could split them in different folder. Commented Mar 20, 2019 at 5:35

1 Answer 1

2

You should be able to just create a folder manually in your source directory and put your Angular stuff there. Then, in Visual Studio, right-click your solution in the Solution Explorer and choose Add > Existing Web Site... Finally, choose that folder you created.

Now, getting everything to run is a bit trickier. Personally, I'd recommend running everything in containers with Docker. You just need to add Dockerfiles to all your startup projects (including this Angular website directory). Then, you can add a docker-compose project and add each of the apps as services in docker-compose.yml. With that, you can choose the docker-compose project to debug, and Visual Studio will hand this all off to Docker for Windows (which you'll obviously need to install) and it will all be spun up. Docker is absolutely brilliant for development, anyways, so even without this particular need, I'd encourage you to start using it.

Sign up to request clarification or add additional context in comments.

1 Comment

I had been considering docker to help, so that is useful to be encouraged. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.