Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Is it possible to move location of ClientApp folder (or even change it's name)? #522

Open
johnpankowicz opened this issue Aug 31, 2019 · 1 comment
Assignees

Comments

@johnpankowicz
Copy link

johnpankowicz commented Aug 31, 2019

I submitted this issue first as an AspNetCore issue. But I was told that I should submit it here instead.

I want to move the ClientApp folder up one level, so that it is not inside of the .Net folder structure. (many reasons for this). But if I do I can no longer set breakpoints in the ClientApp from within Visual Studio (2019). In fact, this happens even if I just change the name of "ClientApp". I do the following:

Create an app with "dotnet new angular"

Change name of the ClientApp folder to XClientApp

Make these changes in startup.cs:

 configuration.RootPath = "XClientApp/dist";
 ...
 spa.Options.SourcePath = "XClientApp";

Make this change in the project file:

 <SpaRoot>XClientApp\</SpaRoot>

The program runs if I press F5. But if I try to set a breakpoint via VS2019 in the Typescript code, I only see an open circle by the break point and the error "The breakpoint will not currently be hit. Breakpoint set but not yet bound."

But if I:

  1. run the app with F5
  2. press F12 in the Chrome Browser
  3. set a break point using the Chrome Dev Tools
  4. hit & clear the break point

Then breakpoints will start working in Visual Studio. But I don't want to go through this each time to get breakpoints working.

How can I change the name of ClientApp (and also change it's location) and still have breakpoints work?

I an using Visual Studio Pro 2019 Preview Version 16.3.0 Preview 2.0 and .Net Core 3.0.100-preview8-013656.

I already asked this question on stackoverflow.

billvenhaus added a commit to billvenhaus/CoralTime that referenced this issue Jun 15, 2020
… folder of CoralTime.csproj

Why? This will allow us to debug Angular TS files from the main solution like the default Visual Studio ASP.NET CORE 3.1 Angular template. For some reason the Angular files have to reside in the ClientApp folder or the breakpoints will not work.
dotnet/aspnetcore#13490
microsoft/vscode-chrome-debug-core#522
https://stackoverflow.com/questions/57649009/vs2019-debugger-fails-after-renaming-clientapp-folder-in-dotnet-core-angular-app
@SincGBA
Copy link

SincGBA commented Jul 9, 2021

Are there any news about this? I encounter this problem in an angular workspace. My folder structure is Workspace/project/projName/src instead of ClientApp/src so i need to completly rework the folderstructure

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants