Sharepoint 2013 visual webpart ascx not updated when updating solution

Hi all,

I recently came across this issue. My visual webpart ascx file does not get updated when updating wsp solution. Same issue as this post or this post.

I have checked my ascx inside the wsp file and also looked at the g.cs file generated by SharePoint. Both were fine.

It used to be working fine when I updated my webpart files. This issue happens after I merged the code from another branch and built the solution. I suspect this has something to do with it.

I tried changing my ascx file so that it regenerates the g.cs file - but still doesn't work.

I then rolled back my code (before merging), updated the code manually and rebuilt the solution. This time it works! my webpart is updated again.

So, there is a bug with moving webpart code around projects (as indicated in the first post above) or merging the code (in my case). I hope this issue will get resolved as it will be annoying to not being able to merge some visual webpart codes between branches.

Update: this post might be the workaround - haven't tried it yet.


Post a Comment