MY SOLUTION:
I've found a solution for my problem. Before upgrade I've placed a special xml file in 15\CONFIG\UPGRADE folder, with information about my web templates, like this:
<WebTemplate ID="990001"
LocaleId="*"
FromProductVersion="3"
BeginFromSchemaVersion="0"
EndFromSchemaVersion="1"
ToSchemaVersion="2">
</WebTemplate>
(But I had to duplicate such a node for both product version 3 and 4.)
After all, I've retracted my old 2010 wsp and redeployed my new 2013 solution. And in general it works.
[UPDATED]
My SharePoint solution contains a few custom site templates. After I performed a migration from SP2010 to SP2013, I still see that the migrated sites have a dependency on the SP2010 site templates. This is what I'm doing:
- Created SP2013 farm and web application.
- Deployed old WSPs (containing site templates for the SP2010 version)
- Deployed new WSPs (containing the same site templates for the SP2013 version, with Revision property increased from 1 to 2)
- Attached content databases from a SP2010 farm.
- Mounted the DBs, which caused the content DBs to be migrated from SP 2010 to 2013.
- Performed Visual Upgrade on site collections based on my custom site templates.
After that, the site collections are displayed with the SP2013 layout, which shows that the visual upgrade has been properly done. But, if I retract/remove the SP2010 WSPs I no longer can see the migrated site collections (I get a 404 error).
I’ve tried fixing the issue with the following approach.
1) Changing the Revision attribute value from 1 to 2 in all onet.xml files of my own site definitions in \15 folder.
2) Adding upgrade XML file inside the [15-hive]\Config\Upgrade folder:
3) Executed “Upgrade-SPSite -Identity -VersionUpgrade” in SharePoint PowerShell. In SharePoint log I could see entries related to the upgrade and that the created xml files were taken into account during upgrade.
4) The issue can be fixed in a “dirty” and unacceptable way, by executing “update [dbo].[AllDocs] set [SetupPathVersion] = 15” on the SharePoint content databases, but of course it isn't acceptable.
I’ve did IIS resets multiple times at multiple steps, so the reason of this approach not working is not due to a missing IIS reset.
Do you have such an issue and know what to do with it?
P.S. Here is story similar to mine: http://sadomovalex.blogspot.com/2013/02/file-not-found-error-after-upgrade-of.html But that solution didn't help me.