Foldertype wwwroot from ASP.NET Core and use it in MVC 5

I manage all my plugins in my ASP.NET MVC gazebo application.

Problem: Bower works fine, but when it installs the plugins, I do not see them in my solution. I have to show all the files (which are not updated automatically) and then turn them on, which causes problems when updating them again ...

What I want: ASP.NET Core projects have a special folder for wwwroot, which automatically makes the file visible in the solution when it is created, for example. in File Explorer.

What I tried: Edit .csproj to 'lablabla\bower_components\** This only included files at startup, and some changes in the project replaced ** ( Source ).

enter image description here

+7
visual-studio asp.net-mvc visual-studio-2015
source share
1 answer

I have not tried it yet, but you can try using "Post Build" to copy this folder.

Click Project-> Properties-> Build Events-> Post Build

And try using "copy" or "xcopy" using keywords like $ (SolutionDir) and $ (TargetDir) or absolute paths

Example:

 xcopy "$(SolutionDir)xxxxx\bower_components" "$(TargetDir)\" /S /Y 

Another example:

 xcopy "c:\MyProject\xxx\bower_components" "c:\MyOtherProject\wwwroot\" /S /Y 
0
source share

All Articles