Hi,
I'm facing a strange issue when my project is deployed on
appharbor.
I have a web application that references a class library. This
class library contains resources files with the right Build Action
as defined here
http://support.appharbor.com/kb/getting-started/deploying-certain-a....
The project structure looks like the following :
+---ClassLibrary1
| \---Resources
| +---en
| | Strings.po
| | TextFile1.txt
| |
| \---fr
| Strings.po
| TextFile1.txt
|
+---MvcApplication1
After compilation, the bin folder contains as expected :
| +---bin
| | +---Resources
| | | +---en
| | | | Strings.po
| | | | TextFile1.txt
| | | |
| | | \---fr
| | | Strings.po
| | | TextFile1.txt
| | |
But when I download the build from appharbor, the _PublishedWebsites\bin folder contains only one Strings.po and one TextFile1.txt file. The Resources folder and its subfolders have disappeared.
Looking at the build log, I can see the following att the end :
Copying file from "D:\temp\qssidje2.iq2\input\ClassLibrary1\Resources\en\Strings.po" to "D:\temp\qssidje2.iq2\output\_PublishedWebsites\MvcApplication1\bin\Strings.po".
Copying file from "D:\temp\qssidje2.iq2\input\ClassLibrary1\Resources\fr\TextFile1.txt" to "D:\temp\qssidje2.iq2\output\_PublishedWebsites\MvcApplication1\bin\TextFile1.txt".
Copying file from "D:\temp\qssidje2.iq2\input\ClassLibrary1\Resources\en\TextFile1.txt" to "D:\temp\qssidje2.iq2\output\_PublishedWebsites\MvcApplication1\bin\TextFile1.txt".
Copying file from "D:\temp\qssidje2.iq2\input\ClassLibrary1\Resources\fr\Strings.po" to "D:\temp\qssidje2.iq2\output\_PublishedWebsites\MvcApplication1\bin\Strings.po".
So it seems the files are "flattened" to the published directory.
Am I doing something wrong ?
#1 Posted by rune Support staff on 07 Oct, 2014 08:11 PM
Hi,
The "Copy Always" approach won't preserve the directory structure, but there are a few other ways to approach this. For instance you could simply copy the files using a
PostBuildEventin yourWebApplication1.csproj. Something like this should do the trick:Let me know how that works out!
Best,
Rune
#2 Posted by pasleq on 09 Oct, 2014 08:07 AM
Hi,
Thanks for your answer.
Meanwhile we've found this similar question on appharbor support http://support.appharbor.com/discussions/problems/57456-runtime-dir..., and we also have removed the directory structure and named the files differently.
Thanks for your help
Pascal
#3 Posted by rune Support staff on 09 Oct, 2014 10:12 PM
Yes both approaches should work well and do what you want - good to hear you were able to find a solution for your use case!
Best,
Rune
rune closed this discussion on 09 Oct, 2014 10:12 PM.