I made a nuget package for internal usage which addes a dll and a few javascript/css/html files.
The first time I install it all files are copied but when I create a new version with updated content files, these are not updated.
In the install log I get this during the uninstall of the old version:
Removed package 'Consilium.NuTranslation.0.1.1-alpha' from 'packages.config'
Directory 'App_Plugins\NuTranslation\views' is not empty. Skipping...
Directory 'App_Plugins\NuTranslation\js' is not empty. Skipping...
Directory 'App_Plugins\NuTranslation' is not empty. Skipping...
Directory 'App_Plugins\NuTranslation' is not empty. Skipping...
Directory 'App_Plugins\NuTranslation' is not empty. Skipping...
And I get this while installing the new version:
'App_Plugins\NuTranslation\views\translationHistory.html' already exists. Skipping...
'App_Plugins\NuTranslation\views\sendforTranslation.html' already exists. Skipping...
'App_Plugins\NuTranslation\views\manualTranslationImport.html' already exists. Skipping...
'App_Plugins\NuTranslation\package.manifest' already exists. Skipping...
'App_Plugins\NuTranslation\js\translationHistory.controller.js' already exists. Skipping...
'App_Plugins\NuTranslation\js\sendForTranslation.controller.js' already exists. Skipping...
'App_Plugins\NuTranslation\js\manualTranslationImport.controller.js' already exists. Skipping...
Added package 'Consilium.NuTranslation.0.1.4' to 'packages.config'
I just want to point out that those files are not into the csproj file, but they are just inside the folder. I tried adding them to the project file and everything gets updated.
Is there a way to force the update of those files even without adding them to the project?
I have the same problem. Seems that you have no options. Nuget won't replace content files. You can find some ideas that to do in the related question. For example you can use FileConflictAction option - it will work only if you reference content files in your project.
Update-Packate my.package -FileConflictAction Overwrite
But seems that all of that ideas are not about your case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With