question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to find fallback package folder

See original GitHub issue

Steps to reproduce

  1. Start with a clean Windows box and install Visual Studio Enterprise 2017 (latest) with .NET Core.
  2. Clone https://github.com/azure/azure-iot-sdk-csharp and run jenkins\windows_csharp.cmd in root.

Expected behavior

Builds works as expected.

Actual behavior

BUILD: --- SecurityProvider for TPM Debug ---
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: The "ResolvePackageDependencies" task failed unexpectedly. [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018: NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'C:\Users\cipop\.dotnet\NuGetFallbackFolder'. [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders) [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.NET.Build.Tasks.NuGetPackageResolver.CreateResolver(LockFile lockFile, String projectPath) [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.get_PackageResolver() [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ResolvePackagePath(LockFileLibrary package) [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.GetPackageAndFileDefinitions() [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() in E:\A\_work\82\s\src\Build\BackEnd\TaskExecutionHost\TaskExecutionHost.cs:line 631 [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]
C:\Program Files\dotnet\sdk\2.1.101\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(172,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() in E:\A\_work\82\s\src\Build\BackEnd\Components\RequestBuilder\TaskBuilder.cs:line 787 [S:\cs\security\tpm\src\Microsoft.Azure.Devices.Provisioning.Security.Tpm.csproj]

Environment data

dotnet --info output:

dotnet --info
.NET Command Line Tools (2.1.101)

Product Information:
 Version:            2.1.101
 Commit SHA-1 hash:  6c22303bf0

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.101\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.6
  Build    : 74b1c703813c8910df5b96f304b0f2b78cdf194d

There is something interesting in the Users folder:

USERNAME=cipop
USERPROFILE=C:\Users\cipop.CORP

> dir c:\Users\ /b
Administrator
cipop
cipop.CORP
Public

Seems to be related to dotnet/sdk#8578, dotnet/sdk#8536, dotnet/sdk#8578, dotnet/sdk#8680 .

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:45 (20 by maintainers)

github_iconTop GitHub Comments

67reactions
VictorioBerracommented, Feb 5, 2020

If you are using Docker and getting this error, make sure you have a .dockerignore and do not copy over the bin and obj files.

**/bin
**/obj
**/out
**/.vscode
**/.vs
.dotnet
.Microsoft.DotNet.ImageBuilder

VIA: https://github.com/dotnet/dotnet-docker/blob/master/.dockerignore

37reactions
CIPopcommented, Mar 15, 2018

Workaround:

mkdir C:\Users\cipop\.dotnet\NuGetFallbackFolder

Read more comments on GitHub >

github_iconTop Results From Across the Web

where does the "Unable to find fallback package folder ...
To solve this error "Unable to find fallback package folder" you need to create an empty folder in that directory as follows: ...
Read more >
I use Visual Studio 2022, and my Hard Drive D:\ stopped ...
NuGet.Packaging.Core.PackagingException: Unable to find fallback package folder 'D:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages'.
Read more >
Error "Unable to find fallback package folder"
PackagingException: Unable to find fallback package folder 'C:\Program Files\dotnet\sdk\NuGetFallbackFolder'.
Read more >
Docker build complains it can't find nuget fallback package ...
So far the only thing I can find on the subject is some github issues requesting that the fallback folder is ditched in...
Read more >
Unable to find fallback package folder 'C:\Program Files (x86 ...
I'm just trying to build the stock .NET Core Console app in Visual Studio 2019 Enterprise; I'm using the latest version of VS....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found