سؤال

On one of my projects I have started getting errors while attempting to add certain nuget packages. Any of the jQuery.ui packages, SassAndCoffee, Knockout.js, even Unity. The error is:

Install failed. Rolling back... The element 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd:authors' cannot contain child element 'http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd:author' because the parent element's content model is text only.

I have created an empty project and these all install fine. Any ideas?

هل كانت مفيدة؟

المحلول

My guess is that you have created the project with an older version of Nuget and then upgraded Nuget after adding some packages to the project. The newer versions of Nuget don't have the authors as child elements of the authors element, it's instead a comma separated list of strings.

In that case the resolution would be to delete the packages and manually edit them out from the packages.config.

See this issue for explanation and resolution.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top