Skip to content

Update command yields null projectFramework. #1874

Closed

Description

@phrohdoh

System information:

OS X 10.11
NuGet Version: 3.3.0.212
Mono JIT compiler version 4.2.1 (explicit/6dd2d0d Fri Nov  6 12:25:19 EST 2015)
        TLS:           normal
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        LLVM:          yes(3.6.0svn-mono-(detached/a173357)
        GC:            sgen
tmba:ora-analyzers thill $ tree -L 2
.
├── as-null-checker
│   ├── Program.cs
│   ├── Properties
│   ├── as-null-checker.csproj
│   ├── bin
│   ├── obj
│   └── packages.config
├── ora-analyzers.sln
├── ora-analyzers.userprefs
└── packages
    ├── Microsoft.CodeAnalysis.Analyzers.1.1.0
    ├── Microsoft.CodeAnalysis.CSharp.1.1.1
    ├── Microsoft.CodeAnalysis.Common.1.1.1
    ├── System.Collections.Immutable.1.1.37
    ├── System.Reflection.Metadata.1.1.0
    └── repositories.config
10 directories, 6 files

tmba:as-null-checker thill $ nuget update packages.config
MSBuild auto-detection: using msbuild version '4.0' from '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5'.
Feeds used:
  https://www.nuget.org/api/v2/

Attempting to gather dependencies information for multiple packages with respect to project '/Users/thill/projects/csharp/roslyn-analyzers/ora-analyzers/as-null-checker/as-null-checker.csproj', targeting ''
Value cannot be null.
Parameter name: projectFramework
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Microsoft.CodeAnalysis.Analyzers" version="1.1.0"  targetFramework="net45" />
  <package id="Microsoft.CodeAnalysis.Common"    version="1.1.1"  targetFramework="net45" />
  <package id="Microsoft.CodeAnalysis.CSharp"    version="1.1.1"  targetFramework="net45" />
  <package id="System.Collections.Immutable"     version="1.1.37" targetFramework="net45" />
  <package id="System.Reflection.Metadata"       version="1.1.0"  targetFramework="net45" />
</packages>

Activity

  1. yishaigalatzer commented on Dec 27, 2015

    @yishaigalatzer

    @phrohdoh looks like the code is using msbuild instead of xbuild here. @feiling was working on fixing it, assigning to him to look into the issue. (He will be back after the first of the year)

  2. added this to the milestone on Dec 27, 2015
  3. added
    Priority:3
    on Dec 27, 2015
  4. phrohdoh commented on Dec 28, 2015

    @phrohdoh
    Author

    Good info, thanks for tagging this so quickly!
    I was able to reproduce this issue with restore due to using MSBuild.

    https://github.com/dotnet/roslyn/blob/master/build/ToolsetPackages/project.json

    tmba:roslyn thill $ nuget restore build/ToolsetPackages/project.json -configfile NuGet.Config
    MSBuild auto-detection: using msbuild version '4.0' from '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5'.
    Feeds used:
      /Users/thill/.local/share/NuGet/Cache
      /Users/thill/.nuget/packages/
      https://www.myget.org/F/dotnet-coreclr/
      https://www.myget.org/F/dotnet-core/
      https://www.myget.org/F/dotnet-corefxtestdata/
      https://www.myget.org/F/dotnet-buildtools/
      https://api.nuget.org/v3/index.json
    
    Restoring packages for /Users/thill/projects/csharp/roslyn/build/ToolsetPackages/project.json...
    All packages are compatible with .NETFramework,Version=v4.5.
    All packages are compatible with .NETFramework,Version=v4.5 (win).
    Generating MSBuild file ToolsetPackages.nuget.props.
    Value cannot be null.
    Parameter name: value
    
  5. added
    Functionality:Update
    on Mar 8, 2016
  6. yishaigalatzer commented on Mar 8, 2016

    @yishaigalatzer

    Unfortunately this flew under the radar for a while, and we won't be able to get to it for 3.4. I'm marking as up for grabs, if there is a particular interest in fixing this faster, we would love to take a PR.

  7. added
    help wanted
    on Mar 8, 2016
  8. modified the milestones: 3.5 Beta, 3.5 RC on Apr 8, 2016
  9. asbjornu commented on Apr 13, 2016

    @asbjornu

    I assume this is the same problem I've run into here?

    $ nuget update src/GitVersion.sln -Source ~/Downloads/pk/ -Id LibGit2Sharp -Verbose
    MSBuild auto-detection: using msbuild version '4.0' from '/Library/Frameworks/Mono.framework/Versions/4.2.1/lib/mono/4.5'.
    Scanning for projects...
    Found 6 projects with a packages.config file. (GitVersionCore.csproj, GitVersionCore.Tests.csproj, GitVersionExe.csproj, GitVersionExe.Tests.csproj, GitVersionTask.csproj, GitVersionTask.Tests.csproj)
    Feeds used:
      ~/Downloads/pk/
    
    Attempting to gather dependencies information for multiple packages with respect to project '~/Dropbox/Dev/GitVersion/src/GitVersionCore/GitVersionCore.csproj', targeting ''
    WARNING: Value cannot be null.
    Parameter name: projectFramework
    Feeds used:
      ~/Downloads/pk/
  10. emgarten commented on Nov 9, 2017

    @emgarten
    Member

    Thanks for reporting this issue. At this time we suggest moving from packages.config to PackageReference with VS 2017 to resolve your issue. You can find out more about this here: https://blog.nuget.org/20170316/NuGet-now-fully-integrated-into-MSBuild.html

    PackageReference supports updating packages from outside of VS where packages.config is only officially supported within VS. nuget.exe update is very limited in what it can do during updates.

  11. modified the milestones: Future-1, 4.6 on Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Functionality:UpdatePriority:3Type:Bughelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions