Hi i am using version of Asp.net core with Angular
i modify the project follow from this link <a class="postlink" href="https://www.aspnetzero.com/Documents/Merge-Angular-Client-Server">https://www.aspnetzero.com/Documents/Me ... ent-Server</a> and after i publish the website with VS2017 this error is show up "Severity Code Description Project File Line Suppression State Error The command "robocopy C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\dist\ C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\ /S /E /MOVE" exited with code 3. KWANP.Web.Host C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\KWANP.Web.Host.csproj 5 "
and i already try create the dist folder but still error
Thank you
3 Answer(s)
-
0
Hi,
You can try to run this command in command promt to see real error message.
robocopy C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\dist\ C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\ /S /E /MOVE
What is the version of your AspNet Zero ? We changed this document recently.
Thanks.
-
0
What is the version of your AspNet Zero ? i use ASP.NET CORE + ANGULAR 4.X with VS2017 Dev Tool
after i run this command "robocopy C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\dist\ C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\ /S /E /MOVE"
error show: The system cannot find the file specified. then i create dist folder then run command again error gone
Then i create dist folder and try to Publish in VS2017 the error show again.
" Ended : Mon Jun 12 11:24:35 2017 C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\KWANP.Web.Host.csproj(5,5): Error MSB3073: The command "robocopy C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\dist\ C:\Mahachula\TestMerge\KWANP\aspnet-core\src\KWANP.Web.Host\wwwroot\ /S /E /MOVE" exited with code 3.
6>Publish failed due to build errors. Check the error list for more details. ========== Build: 5 succeeded or up-to-date, 0 failed, 0 skipped ========== ========== Publish: 0 succeeded, 1 failed, 0 skipped ========== "
pls help what i did wrong
Thank you
-
0
Hi,
When you publish again, "ng build --prod" command deletes dist folder and tries to create it again. I think if you use below markup, your problem will be gone
<Target Name="PrepublishScript" BeforeTargets="ComputeFilesToPublish"> <Exec Command="ng build --prod"></Exec> <Exec Command="robocopy $(MSBuildProjectDirectory)\wwwroot\dist\ $(MSBuildProjectDirectory)\wwwroot\ /S /E /MOVE" /> </Target>
Thanks.