Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Can't install Nuget Snowflake.Data because other libraries "being used by another process"

$
0
0

I have an ASP.NET MVC project running on .NET 4.7.2 and I'm trying to install Snowflake.Data from Nuget. WHen I do, I get a message:

The process cannot access the file '\myproject\packages\Microsoft.IdentityModel.Tokens.6.11.1\lib\net45\Microsoft.IdentityModel.Tokens.dll' because it is being used by another process.

Under Visual Studio 2019 Tools->Options I go into the Nuget package settings and make sure that the ability to check for and download missing projects in unchecked. I don't want to be installing something on Nuget that "removes" and installs a newer version of something to trigger visuals studio to try to download the older version while the newer version is being uploaded.

The output here is below, but you can see that it fails when trying to install a prerequisite

Adding package 'Microsoft.IdentityModel.Tokens.6.11.1' to folder '\myproject\packages'

This seems weird beacuse before I tried to install the Snowflake.Data package, I checked and this "Microsoft.IdentityModel.Tokens.6.11.1" was already installed so I don't know why it's trying to reinstall something already there.

OUTPUT:

Attempting to gather dependency information for package 'Snowflake.Data.2.0.1' with respect to project 'myproject', targeting '.NETFramework,Version=v4.7.2'Gathering dependency information took 1.07 minAttempting to resolve dependencies for package 'Snowflake.Data.2.0.1' with DependencyBehavior 'Highest'Resolving dependency information took 0 msResolving actions to install package 'Snowflake.Data.2.0.1'Resolved actions to install package 'Snowflake.Data.2.0.1'Removed package 'Newtonsoft.Json.6.0.4' from 'packages.config'Successfully uninstalled 'Newtonsoft.Json.6.0.4' from myproject  GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.logging/6.11.1/microsoft.identitymodel.logging.6.11.1.nupkg  GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/6.11.1/microsoft.identitymodel.jsonwebtokens.6.11.1.nupkg  GET https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.tokens/6.11.1/microsoft.identitymodel.tokens.6.11.1.nupkg  GET https://api.nuget.org/v3-flatcontainer/system.identitymodel.tokens.jwt/6.11.1/system.identitymodel.tokens.jwt.6.11.1.nupkg  GET https://api.nuget.org/v3-flatcontainer/snowflake.data/2.0.1/snowflake.data.2.0.1.nupkgPackage 'log4net.2.0.12' already exists in folder '\\myproject\packages'  OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.logging/6.11.1/microsoft.identitymodel.logging.6.11.1.nupkg 1695ms  OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.jsonwebtokens/6.11.1/microsoft.identitymodel.jsonwebtokens.6.11.1.nupkg 1800msInstalling Microsoft.IdentityModel.Logging 6.11.1.Installing Microsoft.IdentityModel.JsonWebTokens 6.11.1.  OK https://api.nuget.org/v3-flatcontainer/microsoft.identitymodel.tokens/6.11.1/microsoft.identitymodel.tokens.6.11.1.nupkg 1839msInstalling Microsoft.IdentityModel.Tokens 6.11.1.  OK https://api.nuget.org/v3-flatcontainer/system.identitymodel.tokens.jwt/6.11.1/system.identitymodel.tokens.jwt.6.11.1.nupkg 2232msAdded package 'log4net.2.0.12' to 'packages.config'  OK https://api.nuget.org/v3-flatcontainer/snowflake.data/2.0.1/snowflake.data.2.0.1.nupkg 2479msInstalling System.IdentityModel.Tokens.Jwt 6.11.1.Installing Snowflake.Data 2.0.1.Successfully installed 'log4net 2.0.12' to myprojectAdding package 'Microsoft.IdentityModel.Logging.6.11.1' to folder '\\myproject\packages'Added package 'Microsoft.IdentityModel.Logging.6.11.1' to folder '\\myproject\packages'Added package 'Microsoft.IdentityModel.Logging.6.11.1' to 'packages.config'Successfully installed 'Microsoft.IdentityModel.Logging 6.11.1' to myprojectAdding package 'Microsoft.IdentityModel.Tokens.6.11.1' to folder '\\myproject\packages'Install failed. Rolling back...Package 'Microsoft.IdentityModel.Tokens.6.11.1 : Microsoft.IdentityModel.Logging [6.11.1, )' does not exist in project 'myproject'Removed package 'Microsoft.IdentityModel.Logging.6.11.1' from 'packages.config'Removed package 'log4net.2.0.12' from 'packages.config'Package 'Newtonsoft.Json.6.0.4' already exists in folder '\\myproject\packages'Added package 'Newtonsoft.Json.6.0.4' to 'packages.config'Executing script file '\\myproject\packages\Newtonsoft.Json.6.0.4\tools\install.ps1'...Package 'Microsoft.IdentityModel.Tokens.6.11.1 : Microsoft.IdentityModel.Logging [6.11.1, )' does not exist in folder '\\myproject\packages'Removing package 'Microsoft.IdentityModel.Logging.6.11.1' from folder '\\myproject\packages'Removed package 'Microsoft.IdentityModel.Logging.6.11.1' from folder '\\myproject\packages'Removing package 'log4net.2.0.12' from folder '\\myproject\packages'Removed package 'log4net.2.0.12' from folder '\\myproject\packages'Executing nuget actions took 26.99 secSystem.IO.IOException: The process cannot access the file '\\myproject\packages\Microsoft.IdentityModel.Tokens.6.11.1\lib\net45\Microsoft.IdentityModel.Tokens.dll' because it is being used by another process.   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)   at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)   at System.IO.File.SetLastWriteTimeUtc(String path, DateTime lastWriteTimeUtc)   at NuGet.Packaging.PackageFolderReader.CopyFiles(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken token)   at NuGet.Packaging.PackageReaderBase.CopyFilesAsync(String destination, IEnumerable`1 packageFiles, ExtractPackageFileDelegate extractFile, ILogger logger, CancellationToken cancellationToken)   at NuGet.Packaging.PackageExtractor.<ExtractPackageAsync>d__1.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)   at NuGet.ProjectManagement.FolderNuGetProject.<>c__DisplayClass13_0.<<InstallPackageAsync>b__0>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at NuGet.Common.ConcurrencyUtilities.<ExecuteWithFileLockedAsync>d__2`1.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)   at NuGet.ProjectManagement.MSBuildNuGetProject.<InstallPackageAsync>d__36.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteInstallAsync>d__85.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__76.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__76.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__76.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__75.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)   at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__74.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at NuGet.PackageManagement.UI.UIActionEngine.<ExecuteActionsAsync>d__17.MoveNext()--- End of stack trace from previous location where exception was thrown ---   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)   at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)   at NuGet.PackageManagement.UI.UIActionEngine.<>c__DisplayClass12_0.<<PerformActionImplAsync>b__0>d.MoveNext()Time Elapsed: 00:01:32.2019554========== Finished ==========

Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>