Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating with nuget added a second MvcSiteMapProvider_IncludeAssembliesForScan in web.config app settings #296

Closed
xrkolovos opened this issue Mar 6, 2014 · 1 comment

Comments

@xrkolovos
Copy link

After updating to the latest version(4.5.2.0), a second MvcSiteMapProvider_IncludeAssembliesForScan was added in my web.config in app settings. That was a problem, because it was in the end, and my app used this.

@NightOwl888
Copy link
Collaborator

Thanks for the report.

Unfortunately, the NuGet documentation for what is needed to move this configuration setting into a script is not available yet.

There are some alternative ways to fix the updating issues that I have proposed here and here, but neither has been implemented. It might help if you PLEASE VOTE UP those issues to raise their priority with the NuGet team.

The main problem is that NuGet doesn't provide:

  1. A way to specify not to upgrade a specific file.
  2. A way to install the latest version of a dependency when installing on a new project, but never update it if you are upgrading.

Basically, there is no realistic way to deal with configuration in NuGet - this particular problem is using the "built-in" way to upgrade web.config (and as you can see, it doesn't work right). The rest of the web.config settings are added using the XmlDocument object and some custom PowerShell scripts, but this one is special because it is resolved at install time. I have made several attempts to get information on how to work around this issue, but so far no luck.

http://stackoverflow.com/questions/19013214/nuget-recursively-process-files-in-the-package-in-install-ps1
http://stackoverflow.com/questions/18769674/when-creating-a-nuget-powershell-script-how-can-you-tell-the-difference-between
http://stackoverflow.com/questions/19013283/nuget-copy-files-on-initial-installation-into-project-only

Also, issues #234 and #247 are related to this.

There are currently 2 options that you could use if you don't want to deal with this

  1. Use the allowedVersions attribute in your packages.config file so the MvcSiteMapProvider.Web package isn't updated (I haven't confirmed this works).
  2. Use the MvcSiteMapProvider.MVCx.Core package rather than MvcSiteMapProvider.MVCx and then manually install the configuration from the MvcSiteMapProvider.Web package. If you manually install the configuration, NuGet won't upgrade it inadvertently. See this post for some help with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants