Forum Discussion
Custom Power BI Visual Not Updating After Repackaging – New version fails to replace old version
- 7 months ago
Hi wolfgang2,
I hope you are doing well today ☺️❤️
So what i will tell you is just a workaround (not an approach but try it):
- So First Force Clear Visual Cache
- Change Visual Identity
- Increment the version number significantly (like from 1.0.0 to 1.0.1) in your visual pbiviz.json file before repackaging
- Delete and Reimport Visual
- Delete the visual from the repor then Clear All permissions from data source
So Final Notes you should take care of it in the future:
- Power BI aggressively caches visuals to improve load times
- When you update an existing visual on a report page...Power BI may only call the visual update() method not its constructor leaving old states intact (This is why your logic needs to be in update())
- Always increment the version number in your pbiviz.json file before packaging and uploading a new version
I hope this works for you ☺️❤️
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly. - 7 months ago
Hi wolfgang2 , Thank you for reaching out to the Microsoft Community Forum.
From what you are saying, the About pane still shows the old visual version and none of the new logs or formatting metadata appear. That means the updated .pbiviz package is not being loaded at all for the existing visual instance, so your new update() code never executes.
Power BI does not guarantee that visuals already placed on a report will be rebound to a newly uploaded package when the visual GUID remains the same. In that case, it can continue running the previously loaded bundle. Creating a new visual instance, switching visuals or reopening the report forces a fresh instantiation, which is why the new version works in those scenarios. There is currently no supported way to force an in place reload of an already placed custom visual. Removing and re-adding the visual (or changing the GUID during development) is the only reliable way to apply the updated package.
Hi wolfgang2 , hope you are doing great. May we know if your issue is solved or if you are still experiencing difficulties. Please share the details as it will help the community, especially others with similar issues.