Posts

Showing posts with the label Nuget

Can't Uninstall/reinstall NuGet Package

Answer : In your Solution or Project you will find a file called packages.config . Open this file and you will see all the packages that NuGet has installed. The file will look something like this: <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Json" version="2.0.3" targetFramework="net45" /> </packages> Simply delete the line of your package and save the file. <?xml version="1.0" encoding="utf-8"?> <packages> </packages> Then run NuGet again and it should install. The JSON.NET NuGet package should just work with a Windows Phone 8.0 project. Adding it in VS2012 NuGet manager pulls in the WP7 version of JSON.NET. (packages\Newtonsoft.Json.4.5.10\lib\sl3-wp\Newtonsoft.Json.dll) JSON.NET is now also available as a Portable Class Library which you can consume from WP8 (available in NuGet or in source form). UPDATE: The latest version of N...

Could Not Load File Or Assembly System.Runtime.CompilerServices.Unsafe

Answer : Could not load file or assembly System.Runtime.CompilerServices.Unsafe It seems that you have installed System.Runtime.CompilerServices.Unsafe nuget package 4.5.3 version. And it corresponds to System.Runtime.CompilerServices.Unsafe.dll assembly version 4.0.4.1 . Suggestion 1) Please try to register System.Runtime.CompilerServices.Unsafe version 4.0.4.1 into GAC so that the system can it. Run Developer Command Prompt for VS2019 as Administrator type: cd xxxxx (the path of the the System.Runtime.CompilerServices.Unsafe 4.0.4.1) gacutil /i System.Runtime.CompilerServices.Unsafe.dll 2) If you use Net Framework projects with xxx.config file, you could use bindingRedirect. Add these in app.config file or web.config file: <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" ...

Could Not Load File Or Assembly 'System.Buffers, Version=4.0.2.0...'

Answer : Could not load file or assembly 'System.Buffers, Version=4.0.2.0…' Solution 1) use CMD(run as Administrator ) and type cd xxxx(xxxx\packages\System.Buffers.4.5.1\lib\netstandard2.0)) run gacutil /i System.Buffers.dll Then , when you finish it, please run update-package -reinstall under package manager console to reinstall the package. 2) you can try to change Version=4.0.2.0 to Version=4.0.3.0 in csproj file. Besides , there is a similar issue you can refer to.