MSB3073:在Visual Studio 2019 Asp.NetCore项目中,命令dotnet bundle clean在代码1中退出

时间:2019-05-23 08:04:57

标签: .net visual-studio asp.net-core

我在Visual Studio 2019 Asp.NetCore项目中收到错误MSB3073: The command dotnet bundle clean exited with code 1。仅在昨天更新Visual Studio之后才出现此问题。

> dotnet bundle clean

NuGet.Packaging.Core.PackagingException: Der Fallbackpaketordner "C:\ProgramData\Xamarin\NuGet" wurde nicht gefunden.
   at NuGet.Packaging.FallbackPackagePathResolver..ctor(String userPackageFolder, IEnumerable`1 fallbackPackageFolders)
   at Microsoft.DotNet.Cli.Utils.LockFileExtensions.GetPackageDirectory(LockFile lockFile, LockFileTargetLibrary library)
   at Microsoft.DotNet.Cli.Utils.PackagedCommandSpecFactory.GetCommandFilePath(LockFile lockFile, LockFileTargetLibrary toolLibrary, LockFileItem runtimeAssembly)
   at Microsoft.DotNet.Cli.Utils.PackagedCommandSpecFactory.CreateCommandSpecFromLibrary(LockFileTargetLibrary toolLibrary, String commandName, IEnumerable`1 commandArguments, IEnumerable`1 allowedExtensions, LockFile lockFile, CommandResolutionStrategy commandResolutionStrategy, String depsFilePath, String runtimeConfigPath)
   at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromToolLibrary(SingleProjectInfo toolLibraryRange, String commandName, IEnumerable`1 args, IProject project)
   at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveCommandSpecFromAllToolLibraries(IEnumerable`1 toolsLibraries, String commandName, IEnumerable`1 args, IProject project)
   at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.ResolveFromProjectTools(CommandResolverArguments commandResolverArguments)
   at Microsoft.DotNet.Cli.Utils.ProjectToolsCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
   at Microsoft.DotNet.Cli.Utils.CompositeCommandResolver.Resolve(CommandResolverArguments commandResolverArguments)
   at Microsoft.DotNet.Cli.Utils.CommandResolver.TryResolveCommandSpec(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)
   at Microsoft.DotNet.Cli.Utils.Command.Create(ICommandResolverPolicy commandResolverPolicy, String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)
   at Microsoft.DotNet.Cli.Utils.Command.Create(String commandName, IEnumerable`1 args, NuGetFramework framework, String configuration, String outputPath, String applicationName)
   at Microsoft.DotNet.Cli.Program.ProcessArgs(String[] args, ITelemetry telemetryClient)
   at Microsoft.DotNet.Cli.Program.Main(String[] args)

Visual Studio版本是16.1.0。

我不知道为什么dotnet使用fallback文件夹。我也不知道为什么不存在该文件夹,因为我已经在Visual Studio 2019中安装了Xamarin支持。

1 个答案:

答案 0 :(得分:0)

可以很容易地解决该问题:只需将文件夹C:\ProgramData\Xamarin\NuGet添加为空文件夹即可避免此问题。