Avatar of NJThomson
NJThomson asked on

Same SharePoint web parts built with different versions of Visual Studio give "not safe or can't find" errors

We have Web Parts we have been building in VS2005 and had built equivalent projects with the same source code in VS2012. Pages with parts built with VS2005 show an error "not safe or can't find" when opened after the VS2012 parts have been deployed and vici versa - Pages built with VS20012 parts show the same error, when opened if the VS2005 parts are (re) loaded.

Names, versions, public key tokens are identical.

In both cases, new pages can be built with the currently loaded version of web parts. And the parts are fully functional. And repeatedly can be used if the associated version of web parts is loaded.

Clearly there is something SharePoint is using in it's compare of web parts that says the VS2005 vs. VS2012 parts are not the same, but it's unclear what property it's failing on.

Tried looking at parts with SharePoint Designer, examining with .dll tools, etc. but can't see any difference.

Having said that, the VS2005 parts are built as .NET 2.0 (which is all it would support), where VS2012 will only allow us to build in .NET3.5 mode - possibly that's a clue.
Microsoft SharePointC#Web Components

Avatar of undefined
Last Comment

8/22/2022 - Mon

This issue occurs across SP 2007, SP 2010 and SP 2013 - so the issue is consistent.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.