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

Null pointer when using RestoreUseStaticGraphEvaluation and explicit TargetFramework #13046

Closed
nojaf opened this issue Nov 28, 2023 · 1 comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug

Comments

@nojaf
Copy link

nojaf commented Nov 28, 2023

NuGet Product Used

dotnet.exe

Product Version

dotnet SDK 8.0.100

Worked before?

I don't think so

Impact

Other

Repro Steps & Context

  1. Clone https://github.com/fsprojects/fantomas
  2. Run dotnet fsi .\build.fsx -- -p Init
  3. Restore project dotnet restore ./src/Fantomas.FCS/Fantomas.FCS.fsproj /p:TargetFramework=netstandard2.0 /p:RestoreUseStaticGraphEvaluation=True --force
  Determining projects to restore...
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error : Object reference not set to an instance of an object. [C:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.GetPackageSpec(IMSBuildProject project, IReadOnlyDictionary`2 allInnerNodes) [C:\Users\nojaf\Projects\fantomas\src\Fan
tomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass35_0.<GetDependencyGraphSpec>b__0(ProjectWithInnerNodes project) [C:\Users\nojaf\Projects\fantomas\sr
c\Fantomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error :    at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) [C
:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error : --- End of stack trace from previous location --- [C:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error :    at System.Threading.Tasks.Parallel.<>c__DisplayClass19_0`2.<ForWorker>b__1(RangeWorker& currentWorker, Int64 timeout, Boolean& replicationDelegateYieldedBeforeCompletion) [C
:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj]
C:\Program Files\dotnet\sdk\8.0.100\NuGet.RestoreEx.targets(19,5): error :    at System.Threading.Tasks.TaskReplicator.Replica.Execute() [C:\Users\nojaf\Projects\fantomas\src\Fantomas.FCS\Fantomas.FCS.fsproj]

When restoring without the explicit /p:TargetFramework=netstandard2.0 this works.
Or when using /p:TargetFramework=netstandard2.0 /p:RestoreUseStaticGraphEvaluation=False it will also work.

Verbose Logs

No response

@jeffkl jeffkl added Resolution:Duplicate This issue appears to be a Duplicate of another issue and removed Triage:Untriaged labels Nov 28, 2023
@jeffkl
Copy link
Contributor

jeffkl commented Nov 28, 2023

Duplicate of #11761. See this comment for a workaround

@jeffkl jeffkl closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution:Duplicate This issue appears to be a Duplicate of another issue Type:Bug
Projects
None yet
Development

No branches or pull requests

2 participants