Adding files to a Web Deploy
I am adding files created by my Node.js to my web deployment via the attached .targets file. I am having problems with 4 files in particular:
When the build and deployment has completed, the artifact zip file has overwritten app\index.html and app\index.css with the index.html and index.css from the root of the project.
This only happens on AppVeyor. When I run the build locally and deploy to the local filesystem - everything works as expected.
- NodeBuildResults.targets 2.22 KB
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Feodor Fitsner on 01 Oct, 2014 09:54 PM
How do you build web deploy package?
2 Posted by Michael Huensch on 01 Oct, 2014 09:58 PM
Thats a good question! Locally, I am not building the package, I am simply deploying it using the "Publish..." option in Visual Studio.
Note: all the filles that I want are added ... it just looks like the first set is added on top of the second.
3 Posted by Michael Huensch on 01 Oct, 2014 09:59 PM
Note: I saw this discussion - http://help.appveyor.com/discussions/kb/8-webdeploy-additional-files
I'd be willing to try it, but it seems a little bit weird to us a PS script when MS provides a way to add files to the web deploy through msbuild.
4 Posted by Michael Huensch on 01 Oct, 2014 10:01 PM
See attached file:
Maybe I just need to separate these out into separate targets files?
Support Staff 5 Posted by Feodor Fitsner on 01 Oct, 2014 10:34 PM
appveyor.pubxmlto publish WAP and I'm not sure your targets are called. Try adding some message into it to see if that's true.
6 Posted by Michael Huensch on 02 Oct, 2014 05:58 PM
I put a Message line in my targets file and I can see that the task was executed:
I assume that this works because the task is part of the normal csproj build process and it simply tells msbuild (or whatever) to include the files as part of the deployment package.
Support Staff 7 Posted by Feodor Fitsner on 02 Oct, 2014 06:02 PM
Interesting. Have to give it a try. Would it be possible for you to create a small "sample" WAP project demonstrating this technique?
8 Posted by Michael Huensch on 02 Oct, 2014 06:22 PM
Here is the tutorial from ASP.Net: http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deplo... There is a starter project that should do what you want as its what I used to create my project.
I will try and work on a similar project that exposes the error I am seeing.
Note: Its entirely possible that its something weird I am doing on my side - I just don't know how to trouble shoot it on Appveyor.
Support Staff 9 Posted by Feodor Fitsner on 02 Oct, 2014 06:24 PM
Cool, thanks for the link!
10 Posted by Michael Huensch on 03 Oct, 2014 02:13 PM
I found the problem. The issue wasn't the task that adds the file to the build. It was a separate task I added to change the length of the file names when trying to trouble shoot the name too long exception. I removed that task and everything works now.
Thanks again for helping me to look at this!
Support Staff 11 Posted by Feodor Fitsner on 03 Oct, 2014 02:14 PM
Cool, thanks for the update!-Feodor
12 Posted by Phil Dye on 06 Nov, 2014 06:05 PM
I've got a similar issue, trying to build & package (and ultimately deploy, but one step at a time) an Umbraco project.
The Umbraco nuget package adds imports to the csproj to automatically ensure that files are packaged & deployed (see https://github.com/umbraco/Umbraco-CMS/tree/7.1.6/build/NuSpecs/build). Running in TeamCity (or from a command line), this works fine when DeployOnBuild=true is set; the files get added to the package as expected.
This isn't happening here; a verbose build log seems to suggest that the added AddUmbracoFilesToOutput target runs inside the CopyAllFilesToSingleFolderForMsdeploy OK, but somehow the files don't end up in the package/artifact.
AppVeyor seems to use the target "PackageUsingManifest", and that manifest doesn't include the injected files.
Any ideas how I can resolve this?
Support Staff 13 Posted by Feodor Fitsner on 06 Nov, 2014 06:46 PM
A simplest solution is to don't use AppVeyor built-in packaging for WAP and use your own
msbuildcommand for building a package.
Alternatively, have you tried adding files in "BeforeBuild" target of WAP?
This is what we have in our website project file to make it work with Azure Web Sites:
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:49 AM.