Oqtane
2024-W44
Updating Third-Party Components in Oqtane Modules and Themes

With the rapid speed of releases for third-party Blazor components, this guide aims to help you upgrade your solutions efficiently. By providing these instructions, we can focus on updating the Template packages only during major upgrades, allowing more time to create templates for other high-quality third-party components.

Upgrading a Module

  1. Open your module solution and select the Client Project.
  2. Navigate to the Packages section and update the third-party component to the latest version.
  3. Select the Server Project and navigate to its Packages section.
  4. Update the third-party component to the latest version in the Server Project as well.
  5. In the Server project, navigate to the wwwroot folder and expand the "_content\Third-Party Component Name]" folder.
  6. Delete all contents within the third-party component folder.
  7. Perform the same deletion in the Oqtane.Server wwwroot folder, under the "_content$$Third-Party Component Name]" folder.
  8. Right-click on the third-party component package icon and select "Open Folder in File Explorer" from the context menu.
  9. In File Explorer, open the folder named "staticwebassets".
  10. Copy all contents from "staticwebassets" into the "_content\Third-Party Component Name]" folder.
  11. Build your module.

Upgrading a Theme

  1. Open your theme solution and navigate to the Packages section.
  2. Update the third-party component to the latest version.
  3. Navigate to the wwwroot folder and expand the "_content\Third-Party Component Name]" folder.
  4. Delete all contents within the third-party component folder.
  5. Perform the same deletion in the Oqtane.Server wwwroot folder, under the "_content\Third-Party Component Name]" folder.
  6. Right-click on the third-party component package icon and select "Open Folder in File Explorer" from the context menu.
  7. In File Explorer, open the folder named "staticwebassets".
  8. Copy all contents from "staticwebassets" into the "_content\Third-Party Component Name]" folder.
  9. Build your theme.

Troubleshooting

  • If you encounter the error: "Conflicting assets with the same target path '_content/[Third-Party Component Name]/ ....'", follow these steps:Open your .csproj file.
  • Add the following ItemGroup:
xml
<ItemGroup>
    <Content Remove="wwwroot\_content\**\*.*" />
    <None Include="wwwroot\_content\**\*.*" />
</ItemGroup>

  • Save the project file and recompile.

Final Steps

After completing the upgrade process for either modules or themes, make sure to thoroughly test all functionality to ensure everything works as expected. By following this guide, you can keep your Oqtane modules and themes up-to-date with the latest third-party Blazor components, ensuring optimal performance and compatibility.



Created by: host
Created on: 11/1/2024 8:33:44 AM
Link to: https://www.studio-elf.net/blog?Frol=bhxQl
Last Reviewed : Never!
Blog, Journal, Diary, Record Reviews