I have added a basic umbarco App_Plugin with just a CSS file. I can see the file getting loaded in Chrome Sources list while debugging from Visual studio. But when i publish the same I am not seeing that css in the sources. Looks like Umbraco is not registering the plugin. I have just a CSS file and Package.manifest file in app_plugins folder. Same code is working while debugging and working after the deploy. Any clue is greatly appreciated.
You need to tell the publish command you want the files to be published. If you’re using Visual Studio (not code) then right click on your CSS and click Properties then change the Build Action to Content and Copy to Output Directory to Copy if newer
I assume this is not an Umbraco package, but just a custom stylesheet you want to use in an Umbraco instance?
When running/debugging in Visual Studio, the files are ‘just there’ because you put them there. However, when publishing - as you find out - dotnet will not just copy over any file. It will only copies over files if they are in certain folders, or are marked as such as Richard pointed out.
An alternative would be to place the App_Plugins folder in the wwwroot. Files in wwwroot are always published.
looks like my description was not detailed enough. my custom CSS files are present in App_Plugins folder after the deploy in WWW root but not seeing these CSS files in Chrome Sources that is the issue. looks like they are not getting registered is the problem. Any help is greatly appreciated. I am using V13 and I can see these file in Chrome Sources files list while debugging.
yes , my manifest is present and i am not sure what is the meaning of posting of manifest file. It is not a deployment problem at all. I am file manually coping the files where ever needed. All i need is working.
May be a github link for V13 and some Custom Plugin might help.
I just wanted to be sure that there wasn’t something weird in the manifest file to rule out that that was an issue. Where do you publish to? Is the OS different (Windows is not case sensitive, Linux is for instance).
But also, make sure it’s not just browser cache. The Umbraco backoffice seems to get sometimes cached a bit hard.
Thank you for the quick responses. I am using Windows for development and for Deployment. I tried removing the cache and tried in incognitive mode. I am new to the Umbraco, I might be missing some simple thing is my guess. so, I you can point a working GitHub code with V13 and a simple Custom CSS that would really help. Also, I would like to know if there is a way to speak with one the Devs live you . Here is my contact. [email protected] .
Same exact thing i am using and as i said it is working all fine on my local debugging so cannot be any syntax issue. but this css file is not loading in browser under sources folder.
I think it works as expected. When running Umbraco locally in debug mode, the files are serves as-is. However, when you publish (which is probably not in debug mode), smidge will bundle and cache the files and you probably don’t see the individual files anymore in your sources folder.
yes, that is correct. looks like the files are bundled and cache was very hard. after the couple of more deployments things started working. Thank you very for your quick responses and help. I really appreciate it.