tag:help.appveyor.com,2012-11-13:/discussions/problems/14114-msbuild-packaging-no-longer-working-copyallfilestosinglefolderforpackagedependson-no-longer-triggersAppVeyor: Discussion 2018-08-25T02:28:29Ztag:help.appveyor.com,2012-11-13:Comment/452633742018-05-12T02:18:55Z2018-05-12T02:18:55ZMSBuild packaging no longer working. CopyAllFilesToSingleFolderForPackageDependsOn no longer triggers.<div><p>I would recommend to do the following experiments to have more data:</p>
<ul>
<li>
<p>re-build last know good commit and see if files were copied</p>
</li>
<li>
<p>remove <code>EnsureNuGetPackageBuildImports</code> target at all and see if this helps</p>
</li>
<li>
<p>set msbuild verbosity level to <code>detailed</code> (<code>build / verbosity: detailed</code> in YAML) and compare good and bad build results. If you use YAML, you cannot update YAML in the old commit, so use <a href="https://www.appveyor.com/docs/build-configuration/#alternative-yaml-file-location">remote YAML</a> with re-build commit to get detailed logs from last known good commit. When you get detailed logs for both good and bad builds, search for <code>CopyAllFilesToSingleFolderForPackageDependsOn</code> and <code>IncludeCustomFilesInPackage</code> and see if you can spot the difference.</p>
</li>
</ul>
<p>Let us know what you found.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/452633742018-05-14T01:18:33Z2018-05-14T01:18:33ZMSBuild packaging no longer working. CopyAllFilesToSingleFolderForPackageDependsOn no longer triggers.<div><p>Hi Ilya,</p>
<p>Thanks for the response, I'm attempting to replicate the build process on<br>
my computer so I can quickly tweak it. Can you give me the exact package<br>
commands you run for the web deploy artifact packaging? I'm using</p>
<p>msbuild.exe .\Project.csproj /t:WebPublish /p:WebPublishMethod=FileSystem<br>
/p:DeleteExistingFiles=True /p:publishUrl='C:\temp\develop\project'</p>
<p>to create the folder, but I'm not sure how to package the artefact. Is it a<br>
different WebPublishMethod? I got the above command from your docs.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/452633742018-05-14T01:42:08Z2018-05-14T01:42:08ZMSBuild packaging no longer working. CopyAllFilesToSingleFolderForPackageDependsOn no longer triggers.<div><p>Sorry, /p:WebPublishMethod=Package did the trick :)</p>
<p>Will follow up when I have more details or hopefully figure out exactly what the difference is.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/452633742018-05-14T04:53:07Z2018-05-14T04:53:07ZMSBuild packaging no longer working. CopyAllFilesToSingleFolderForPackageDependsOn no longer triggers.<div><p>Ok, I've solved the problem.</p>
<p>I was using before_package - I'm not sure why, but after the nuget updates before_package now actually happens after packaging.</p>
<p>I thought it simply wasn't taking the steps but it was, the files generated by grunt simply didn't exist yet. Carefully analysing the logs found the packaging (now for some reason the msbuild command isn't logged anymore either) as part of the build, and the grunt generation of the files happening later.</p>
<p>Moving the before_package script into the before_build script fixed the issue.</p>
<p>Thanks for your help.</p></div>dylantag:help.appveyor.com,2012-11-13:Comment/452633742018-05-15T01:33:55Z2018-05-15T01:33:55ZMSBuild packaging no longer working. CopyAllFilesToSingleFolderForPackageDependsOn no longer triggers.<div><p>I see, thanks a lot for the update!</p></div>Ilya Finkelshteyn