Last post Dec 05, 2018 08:06 PM by some_yahoo
Nov 23, 2018 10:01 PM|some_yahoo|LINK
When I publish my website using VS2015, I have a mass of icons in a series of folders.
I am publishing using "File System" over the VPN.
Even though I have it set not to delete existing files, it seems to take forever publishing these thousands of little .png's
They are already there. They have not changed. I want it to stop.
This costs me about a half hour every time I publish. It's insane.
Also, though there are a lot of them (like 260), the individual files are very small (like 500 bytes). This might be the VPN but it's taking 5 minutes to copy these files!
(Oh and that's just one folder, there are many other folders all with non-changing graphics I don't want published).
So you see why it's imperative that we stop re-publishing these fixed files for every push.
1>Publishing folder /...
1>Publishing folder bin...
1>Publishing folder bin/roslyn...
1>Publishing folder Content...
1>Publishing folder Content/Images...
1>Publishing folder Content/Images/flags...
1>Publishing folder Content/Images/flags/flags...
1>Publishing folder Content/Images/flags/flags/shiny...
1>Publishing folder Content/Images/flags/flags/shiny/16...
1>Publishing folder Content/Images/flags/flags/shiny/24...
Nov 26, 2018 05:44 AM|Zhi Lv - MSFT|LINK
Stop publishing the graphics EVERY TIME
Please refer to
this article to set the file Build Action Property and Copy to Output Directory Property.
If you don't want to publish some files, you could set the Build Action property to "None".
Dec 05, 2018 08:06 PM|some_yahoo|LINK
I read all that, and the logical choice is Content ->
Copy if Newer.
I did that and...
It's still spending over an hour copying these (unchanged) flag icons during a publish.
Here's the DIR info...
Total Files Listed:
3641 File(s) 24,150,403 bytes
I am using Publish to File Folder (to a VPN folder at work). In this case I am NOT having it clean the folders prior to publish. So the icons are there. I do NOT want to tag tham as do not copy, or None because sometimes we wipe the folders on a publish
and they would be missing if we did that.
Maybe I should set up IIS with a virtual folder containing the images and publish them as a separate solution.
Is there a way to make a second project with just the icons and have them publish separately to the same destination?
I still marvel at how LONG it takes to publish these small files. I stopped my publish after an hour and 6 minutes and it was nowhere near done.
Incidentally, with Content -> Copy if newer, all the icons were copied TWICE. Once in bin/content/images... and once in /Content/images. I changed them to
Build Action: None, Never Copy. I figure if anyone ever does a build with delete set I can copy them back in as needed.
But something is wrong. It's taking over a second to copy 600 byte files. Maybe the virus scanner is choking on them or something.
For now, I'm staying with Build Action: None, Never Copy and manually restoring the images if needed.
But what SHOULD have happened is that the publish function should have recognised and skipped the already published files.