0

I have website built on MVC4 in visual studio 2019 and for publish profile I usually used right click and select publish site. which is working great but i want it should be part of my csproj. As when as i build my web.sln it should create a publish folder.

Right now it is only creating bin folder having dll and dependency but it should have all folder having content and web.config and razor file.

I tried to search how I can make this as part of csproj file but could not figure it out? Please help me.

Jack J Jun
  • 5,633
  • 1
  • 9
  • 27
asthanarht
  • 139
  • 2
  • 8
  • How are you publishing it? Is ftp? IIS – jaabh Jun 26 '20 at 17:53
  • Just like a filesystem, i want to publish in folder – asthanarht Jun 26 '20 at 17:55
  • i would not recommend this right click the project, select properties. go to build events... google the command to run to publish via command line, in build events. this should be fairly easy to google. – Seabizkit Jun 26 '20 at 18:56
  • why in the world would you want this behavior. maybe if something was remotely trying to create a publish/build sure... but the project itself at build time? that means every time you build it will attempt to publish the project. – Seabizkit Jun 26 '20 at 18:58
  • We have a web project built on MVC and the following msbuildprocess to build projects. Issue is msbuild creating only bin folders in outdirectory and we need to publish profile which should have all the necessary razorviews and content (js and css) . – asthanarht Jun 30 '20 at 06:57

0 Answers0