Visual Web Part in VS2012, ascx.g.cs is erased

I am having this problem

http://connect.microsoft.com/VisualStudio/feedback/details/776340/visual-web-part-in-vs2012-code-in-ascx-g-cs-is-erased

This is critical, I cant continue any development, any workaround please??

June 4th, 2013 5:14pm

Would be really helpful if you can expand on your problem with the code in the web part. The file you are referring too is auto-generated by Visual Studio 2012 as the MS guys mention in your connect call.

Free Windows Admin Tool Kit Click here and download it now
June 7th, 2013 12:02pm

when I create a visual webpart in vs 2012, it creates a g.cs file.

When I press Ctrl+S to save, that file gets removed, and the visual webpart wont compile anymore because the InitializeControls() is on that class I guess.

June 7th, 2013 12:56pm

I am having a similar issue with all my sharepoint WebParts, When I edit the webpart or by simly pressing ctrl + S; the ascx.g.cs file is erased and the compilation is broken.

I have updated my visual studio 2012 upto update 3, strange enough other developers don't have that issue plus they are on visual studio update 1

Have you come across a solution for this issue

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2013 12:48pm

Microsoft is ignoring us, there is no workaround for this, I started doing visual webparts and then I had this problem, I had to switch to normal webparts and make the UI by code.
June 30th, 2013 1:44pm

ah man, thanks for the update :)
Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2013 8:44am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics