none
VS2010 RTM bug?? Error Occurred in deployment step 'Add Solution': Value cannot be null. Parameter name: s RRS feed

  • Question

  • I'm getting this error with Visual Studio 2010 (RTM) deploying to SharePoint 2010 (also RTM).

    An "Empty SharePoint Solution" project with an OOB "Module" item added. Try to deploy and I get:

    Error Occurred in deployment step 'Add Solution': Value cannot be null. Parameter name: s

    The account I'm developing with has:

    • Domain Admin
    • Local Admin
    • SharePoint Farm Admin
    • Site Collection Admin
    • SQL "sysadmin"
    • SQL "DBOwner" on all config / content databases
    • UAC is disabled

    The WSP package is created successfully, and if I roll it out using STSADM then it works perfectly. For some reason though Visual Studio 2010 thinks that it cannot be deployed!

    Any ideas??


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog - www.martinhatch.com
    Wednesday, May 12, 2010 1:19 PM

Answers

  • Ok.

    From the stack trace this seems to stem from the Conflict Resolution side of Visual Studio 2010 (DetectConflicts(), DeploymentConflictFinder(), ModuleCollisionFinder()).

    I had a spark of inspiration and set Deployment Conflict Resolution = None  on my Module.

    IT WORKS...

    Lesson of the day... VS 2010 RTM appears to have some bugs around Conflict Resolution when running on SP 2010 RTM (maybe something to do with the fact that VS 2010 RTM was released a few weeks before the SP 2010 RTM became available ??)

    Ahh well ... working for now (although it WOULD be nice to have deployment conflict resolution working!)


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog - www.martinhatch.com
    • Marked as answer by Martin Hatch Wednesday, May 12, 2010 2:28 PM
    Wednesday, May 12, 2010 2:28 PM

All replies

  • I've enabled diagnostics logging for SharePoint projects ([HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\10.0\SharePointTools] "EnableDiagnostics"=dword:00000001) and now have the specific stack trace in the Output window:

    It is definately a Microsoft DLL throwing the error (and this is using a brand spanking new OOB "Module" item in a completely clean project). We have now duplicated this error on 2 other RTM dev builds, with identical error messages.

    ------ Build started: Project: MySharePointProject, Configuration: Debug Any CPU ------
      MySharePointProject -> C:\Projects\MySharePointProject\bin\Debug\MySharePointProject.dll
      Successfully created package at: C:\Projects\MySharePointProject\bin\Debug\MySharePointProject.wsp
    ------ Deploy started: Project: MySharePointProject, Configuration: Debug Any CPU ------
    Active Deployment Configuration: Default
    Run Pre-Deployment Command:
      Skipping deployment step because a pre-deployment command is not specified.
    Recycle IIS Application Pool:
      Skipping application pool recycle because no matching package on the server was found.
    Retract Solution:
      Skipping package retraction because no matching package on the server was found.
    Add Solution:
    Error occurred in deployment step 'Add Solution': Value cannot be null.
    Parameter name: s
    Exception Message: Value cannot be null.
    Parameter name: s
    Exception Type Name: System.ArgumentNullException
    Exception Stack Trace:    at System.IO.StringReader..ctor(String s)
       at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.XmlDocument.GetXDocument()
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.XmlDocument.get_Document()
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.ModuleElementManifest.GetModuleElements(Boolean ignoreSetupPathModules)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.ModuleElementManifest.GetFileElements(Boolean ignoreSetupPathModules)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.ModuleCollisionFinder.<GetCandidateAspectValues>b__2(ISharePointProjectItemFile elementManifest)
       at System.Linq.Enumerable.<SelectManyIterator>d__31`3.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.SingleAspectCollisionFinder`1.FindConflicts()
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.DeploymentConflictFinder.FindAndAddConflictsTo(IDeploymentConflictCollection targetConflictCollection, Boolean promptBeforeResolve)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.Module.DetectConflicts(DeploymentStepStartedEventArgs e, Boolean promptBeforeResolve)
       at Microsoft.VisualStudio.SharePoint.ProjectExtensions.VSPackage.Module.DeploymentStepStarted(Object sender, DeploymentStepStartedEventArgs e)
       at Microsoft.VisualStudio.SharePoint.SharePointProjectItemTypeEvents.RaiseDeploymentEvent[T](EventHandler`1 eventHandler, T e, ISharePointProjectItem projectItem, ISharePointProjectItemDeploymentContext context)
       at Microsoft.VisualStudio.SharePoint.SharePointProjectItemTypeEvents.OnDeploymentStepStarted(ISharePointProjectItem projectItem, IDeploymentStepInfo stepInfo, ISharePointProjectItemDeploymentContext context, IDeploymentConflictCollection conflicts)
       at Microsoft.VisualStudio.SharePoint.SharePointProjectItemType.OnDeploymentStepStarted(ISharePointProjectItem projectItem, IDeploymentStepInfo stepInfo, ISharePointProjectItemDeploymentContext context, IDeploymentConflictCollection conflicts)
       at Microsoft.VisualStudio.SharePoint.Deployment.DeploymentUtils.NotifyStepStarted(IDeploymentStepInfo stepInfo, IDeploymentContext context)
       at Microsoft.VisualStudio.SharePoint.Deployment.ConfigurationExecutor.Execute()
       at Microsoft.VisualStudio.SharePoint.Deployment.WspDeploymenHandler.Deploy()
    ========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
    ========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog - www.martinhatch.com
    Wednesday, May 12, 2010 2:02 PM
  • Ok.

    From the stack trace this seems to stem from the Conflict Resolution side of Visual Studio 2010 (DetectConflicts(), DeploymentConflictFinder(), ModuleCollisionFinder()).

    I had a spark of inspiration and set Deployment Conflict Resolution = None  on my Module.

    IT WORKS...

    Lesson of the day... VS 2010 RTM appears to have some bugs around Conflict Resolution when running on SP 2010 RTM (maybe something to do with the fact that VS 2010 RTM was released a few weeks before the SP 2010 RTM became available ??)

    Ahh well ... working for now (although it WOULD be nice to have deployment conflict resolution working!)


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog - www.martinhatch.com
    • Marked as answer by Martin Hatch Wednesday, May 12, 2010 2:28 PM
    Wednesday, May 12, 2010 2:28 PM
  • Well, how about this....

    I followed your steps to the letter - my solution was added fine - my error was as follows:

    "Error 1 Error occurred in deployment step 'Activate Features': Feature with Id '3a7da144-b9de-4d34-9182-234529583661' is not installed in this farm, and cannot be added to this scope.
      0 0 SharePointProject1"

    Nothing customised, nothing changed - just create new empty SharePoint project, add new module and hit F5! Farm solution, with an existing site collection as the deploy target...

    I have had this error since installing SP2010 RTM on ALL my environments - I develop in a farm environment (i.e. multiple web front ends etc..) I DO NOT get this error in a standalone environment.....go figure!


    Technical Architect at Starznet Ltd. WSS/MOSS development and customisation with a primary focus on CMS.

    Read my wiki at www.intheknow.it for more code and tips for developing with SharePoint 2007 & 2010 Twitter: @starznet
    Wednesday, May 12, 2010 2:33 PM
  • Hi Stuart,

    You running Visual Studio Ultimate?? I've got Premium on this build .. but definately seems to be a combination both both VS RTM and SP RTM. 


    regards
    Martin Hatch
    MCPD .Net Web Development
    MCTS WSS 3.0 | MOSS 2007
    Visit my Blog - www.martinhatch.com
    Wednesday, May 12, 2010 2:40 PM
  • just restart the visual studio... the error Error occurred in deployment step 'Add Solution': Value cannot be null.
    Parameter name: s
      will be away...
    hemant
    Thursday, October 7, 2010 5:50 AM
  • I got this same error "Error occurred in deployment step 'Add Solution': Value cannot be null. Parameter name: s" when ever I had an elements.xml file open in the VS 2010 IDE and when I closed the elements.xml file the project successfully deploy. I fixed this issue by running a repair on Visual Studio 2010 Premium install.

    • Proposed as answer by bjohnson555 Wednesday, January 19, 2011 12:03 AM
    Wednesday, January 19, 2011 12:02 AM
  • I tried closing all the files open on the Visual Studio and it works!!! Thanks a lot!!!
    Friday, March 8, 2013 12:10 PM