U4-9739 - 7.6.0-RC Error after Upgrade from 7.5.11 - Could not load file or assembly 'UrlRewritingNet.UrlRewriter'

Created by Ismael 05 Apr 2017, 20:09:57 Updated by Nicholas Westby 11 Jul 2017, 18:12:45

Subtask of: UAASSCRUM-810

'''What did you do?''' Upgraded an existing 7.5.11 site to 7.6.0-RC using nuget via Visual Studio 2013 package console

'''What did you expect to happen?''' The site to be upgraded successfully

'''What actually happened?''' The nuget update was successful and following a rebuild of the solution and navigating to the site in a browser to complete the upgrade an expection was thrown: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.

I can see in the nuget log window that UrlRewritingNet 2.0.7 was removed however the references in the web.config were not, should they have been removed also?

  • I also tried a clean install of 7.5.12 and upgrading it to 7.6.0-RC all from within visual studio - same problem occurred.

1 Attachments

Comments

Shannon Deminick 19 Apr 2017, 05:43:59

Yup i can confirm the issue, we'll add some config transforms for this


Shannon Deminick 19 Apr 2017, 06:00:45

Ahh, i see we already knew about this: http://issues.umbraco.org/issue/U4-9004

I will upgrade the Readme doc that is displayed when upgraded. Unfortunately we are stuck between either:

  • Having this error for all Nuget upgrades - it's easily fixed OR
  • Not having an error for any Nuget upgrades but not being able to tell people that if they are using UrlRewriting.Net that it will no longer be active - it could cause far more problems

We'll opt for updating the Readme doc and leave this config section in.

Unfortunately there's no easy solution, we could attempt to run powershell scripts to run transforms based on criteria but this is also quite hacky and may not work in all cases since that requires extra dlls to be included.


Shannon Deminick 19 Apr 2017, 06:01:30

So to fix this remove these from your web.config:

  • <section name="urlrewritingnet" restartOnExternalChanges="true" requirePermission="false" type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter" />
  • <urlrewritingnet configSource="config\UrlRewriting.config" />


Nicholas Westby 11 Jul 2017, 18:12:45

For anybody else that happens across this, just thought I'd mention that the error presented differently for me. The solution was the same (remove URL rewrite stuff from the web.config). Here was the error:

!web-config-error.png!

Doesn't like that the UrlRewriting.config file was gone but the reference to it was still in the web.config.


Priority: Normal

Type: Bug

State: Closed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0

Due in version:

Sprint: Sprint 57

Story Points: 1

Cycle: