Geeks With Blogs

News
About Me:
I am a Female SharePoint Developer (a platinum unicorn). I have been working with SharePoint since I attended the Portal University in 2005. I hold a BA in Computer Science from the University of Missouri - Kansas City. I love playing Rockband, organizing user group meetings, working with code, attending events as a speaker or organizer, and having bizarre conversations about geek things with cool people. If you have any comments or questions fill out the contact form and I will try my best to help.



The Guide of a MOSSLover Becky Isserman's Blog

So I just had an interesting experience recently at work.  I did my first webpart upgrade from Visual Studio 2010 to Visual Studio 2012 last week (SharePoint 2010 to 2013).  I realized when I deployed the webpart that I got a “this user control does not exist” error, when the ascx file for the Visual Webpart did exist.  I’m not sure if it was something simple and ridiculous or if I had to change the entire webpart, but here is what I had to to do to fix things:

  • Open your webpart in Visual Studio 2012 or 2010
  • Create a brand new solution in a new window in Visual Studio 2012
  • Copy everything into the new ascx file and make sure any files reference “_/layouts/15/…” or it will not find your embedded links to javascript and css files
  • Copy all your properties from the cs webpart container file in your old webpart to your code behind for the new webpart.  You only need one set of properties, so you can dump anything in the user control code behind that involves a property.
  • Copy all your code other code behind data and make sure to change in appropriately referencing only the webpart properties.
  • Compile your webpart and it should deploy properly.

So there was a tool called Visual Studio Power Tools that was an add-on for Visual Studio 2010.  It included a webpart called the sandbox visual webpart.  This webpart is now the sandbox and farm visual webpart in Visual Studio 2012.  Everything compiles into a design and cs file, instead of deploying an ascx file to the control templates.  You might be able to mess with the xml to get everything to deploy, but honestly it’s not that hard to drop everything into a new webpart and test it.  Now that you have read this blog post you should understand what needs to be done.  I hope that you guys enjoy my trials from this week.  I know that it was an adventure and it was fun.  Good luck!

Posted on Sunday, March 17, 2013 1:43 AM | Back to top


Comments on this post: Oh No They Changed Visual Webparts!

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © MOSSLover | Powered by: GeeksWithBlogs.net