Skip to content

When dotnet runfile prunes unused dirs, we're failing on next run #59

@kzu

Description

@kzu

Error:

pwsh> dnx runfile copilot
C:\Program Files\dotnet\sdk\10.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error MSB4018:
  The "ResolvePackageAssets" task failed unexpectedly.
  System.NullReferenceException: Object reference not set to an instance of an object.
     at NuGet.ProjectModel.LockFile.<>c__DisplayClass39_0.<GetTarget>b__0(LockFileTarget t)
     at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Func`2 predicate, Boolean& found)
     at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
     at NuGet.ProjectModel.LockFile.GetTarget(String frameworkAlias, String runtimeIdentifier)
     at Microsoft.NET.Build.Tasks.LockFileExtensions.GetTargetAndReturnNullIfNotFound(LockFile lockFile, String frameworkAlias, String runtimeIdentifier)
     at Microsoft.NET.Build.Tasks.LockFileExtensions.GetTargetAndThrowIfNotFound(LockFile lockFile, String frameworkAlias, String runtimeIdentifier)
     at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task)
     at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromDisk(ResolvePackageAssets task, Byte[] settingsHash)
     at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
     at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
     at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
     at Microsoft.NET.Build.Tasks.TaskBase.Execute()
     at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
     at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(TaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskE
  xecutionMode howToExecuteTask)
The expression "[System.IO.Directory]::GetFiles(C:\Users\kzu\AppData\Local\Temp\dotnet\runfile\github.com\kzu\run\main, *.sln)" cannot be evaluated. Could not find a part of the path 'C:\Users\[user]\AppData\Local\Temp\dotnet\runfile\github.com\kzu\run\main'.  C:\Program Files\dotnet\sdk\10.0.203\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.targets

Back this issue
Back this issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions