My Media-folder is also in the first list. But it's weird that all .html and .css files are set to "Content" and are ignored on publish.
It all gets copied if I replace all "AppPlugin" lines with your Plugins, without the need to set their "Build Action" to "None" individualy, or edit my .csproj file, right?
Those lines only specify to include these files (as you see them in your IDE), they probably default to "Copy never", so you need to either add the <CopyToOutputDirectory>Always</CopyToOutputDirectory> to your existing lines or to the whole folder as I wrote before. If so, you can remove the individual file lines!
I noticed that there are two separate App_Plugins folders in the dotnet core umbraco sites.
/App_Plugins
/wwwroot/App_Plugins
My recommendation is to put all of your custom "App_Plugins" extensions into the /wwwroot/App_Plugins because it is an easy way to skip all the fuss about which files are and are not included in a publish. Everything I dump into /wwwroot is automatically included in the project for me.
It seems that both of these "App_Plugins" folders are valid and both work. I'm noticing that different package creators are choosing to put their packages in different folders. For example, I'm working on a site with App_Plugins folders like this right now:
Umbraco 10, Publish ignores CSS/HTML in /App_Plugins
Hi there,
I'm having trouble publishing a Umbraco10 site.
When I publish my site (Delete existing files, release, net6.0, win-x64), all seems to work fine, except my App_Plugins folder.
Only the .js and .manifest files in App_Plugins (and subfolders) are copied during a publish. The .css and .html files are ignored.
They have a "Build Action" of "Content". What's going wrong here? A colleague with a different U10 project has the same problem.
Hi!
As to the reason why it's not working by default I'm not sure, but to fix it try adding this to the csproj:
It's weird. I opend up my .csproj file, and it had my App_Plugins folder in 2 itemgroups.
My Media-folder is also in the first list. But it's weird that all .html and .css files are set to "Content" and are ignored on publish.
It all gets copied if I replace all "AppPlugin" lines with your Plugins, without the need to set their "Build Action" to "None" individualy, or edit my .csproj file, right?
Those lines only specify to include these files (as you see them in your IDE), they probably default to "Copy never", so you need to either add the
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
to your existing lines or to the whole folder as I wrote before. If so, you can remove the individual file lines!I noticed that there are two separate App_Plugins folders in the dotnet core umbraco sites.
/App_Plugins
/wwwroot/App_Plugins
My recommendation is to put all of your custom "App_Plugins" extensions into the
/wwwroot/App_Plugins
because it is an easy way to skip all the fuss about which files are and are not included in a publish. Everything I dump into/wwwroot
is automatically included in the project for me.It seems that both of these "App_Plugins" folders are valid and both work. I'm noticing that different package creators are choosing to put their packages in different folders. For example, I'm working on a site with App_Plugins folders like this right now:
/App_Plugins/
/wwwroot/App_Plugins/
is working on a reply...