Skip to content
This repository has been archived by the owner on Nov 6, 2023. It is now read-only.

[#ask] Can we use parent folder for ClientApp #52

Open
azulkipli opened this issue Apr 29, 2020 · 5 comments
Open

[#ask] Can we use parent folder for ClientApp #52

azulkipli opened this issue Apr 29, 2020 · 5 comments

Comments

@azulkipli
Copy link

azulkipli commented Apr 29, 2020

I have sample folder strucure for the app

- Dashboard
- - - Backend 
- - - - - - ClientApp
- - - - - - Controllers
------etc

How to achieve folder structure like this
(ClientApp to upper folder align with Backend folder)

- Dashboard
- - - ClientApp 
- - - Backend 
- - - - - - Controllers
------etc

I just try change "ClientApp" to "../Frontend" does not work

@johndab
Copy link

johndab commented Jun 30, 2020

Hi! We're using it that way.
Setting SourcePath = "../ClientApp" works well.

Remember to update <SpaRoot> in .csproj as well for publish build

@Kingside88
Copy link

johndab means you can write it as relative path. By the way absolute path is also working well.
2 dots in front means one folder up counting from your ASP binaries.
you can combine them to go up as much as you like f.e: ../../../ClientApp

@pmaga
Copy link

pmaga commented Jan 25, 2021

This does not seem to work properly when the --output (or -o) parameter is used.

If you publish to custom directory: dotnet publish --configuration Release --output myapp, the ClientApp directory is copied to the parent directory of the destination directory (myapp).
Similarly if you change it from <SpaRoot>..\ClientApp\</SpaRoot> to for example: <SpaRoot>..\..\ClientApp\</SpaRoot>, it will copy the ClientApp to directory two level higher in hierarchy.

@EEParker
Copy link
Owner

EEParker commented Feb 2, 2021

Note: these templates are based on the official SPA templates from https://github.com/dotnet/aspnetcore/tree/main/src/ProjectTemplates/Web.Spa.ProjectTemplates

@timotheegloerfeld
Copy link

@pmaga

I have the same issue with the react templates, did you get it to copy to the right directory, by any chance?

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

6 participants