I have a web setup project and a web site included in the same sollution.
In the setup project, I have added Content files
pointing to the web site content.
In this web site there are some folders that contains dynamically generated files (i.e .log files, some image files etc.) I do not want these files to be included in the setup. I have tried to add a filter Symbols\*.png
but this does not work. I have also tried a filter called *.png
, and this excludes the .png files within that folder, but the problem is it also excludes all static .png files in the web site that must be there.
How can I add a filter that excludes only the files under the directory I want?
Is it possible to call something in the PreBuildEvent
after the files are deleted that will tell VS to refresh the web site content?
Are there any other approaches that can solve this?
As a workaround, I have created a PreBuildEvent that deletes all the files that should not be included in the setup:
This actually deletes the files when I start the build, but it causes an error later in the build, because some content files does not exist that the setup content thinks should be there. The files that are deleted, are still referenced in VS as content in the web site. If I browse the folders in the web site, I see that the deleted files are there in the VS GUI (although the files are actually deleted). I have to do a refresh on the web site project to tell VS that the content has changed, and then do the build again. Then it works, and my setup contains what I want.