Posts

Showing posts with the label Nuget

Assets File Project.assets.json Not Found. Run A NuGet Package Restore

Answer : To fix this error from Tools > NuGet Package Manager > Package Manager Console simply run: dotnet restore The error occurs because the dotnet cli does not create the all of the required files initially. Doing dotnet restore adds the required files. In my case the error was the GIT repository. It had spaces in the name, making my project unable to restore If this is your issue, just rename the GIT repository when you clone git clone http://Your%20Project%20With%20Spaces newprojectname In case when 'dotnet restore' not works, following steps may help: Visual Studio >> Tools >> Options >> Nuget Manager >> Package Sources Unchecked any third party package sources. Rebuild solution.

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...