godot: Mono Install Package/Nuget throws Microsoft.NETFramework.ReferenceAssemblies error
Godot version: Godot Engine v3.2.2.stable.mono.official
OS/device including version:
Building on Windows 10 64 bit with Visual Studio 2019 installed.
Issue description:
Each time when running the command Install-Package in Visual Studio 2019 to get packages like Newtonsoft.Json it throws the following error consistently:
Install-Package : NU1101: Unable to find package Microsoft.NETFramework.ReferenceAssemblies. No packages exist with this id in source(s): Local mono packages, Microsoft Visual Studio Offline Packages, Project Packages
And this error prevents the installation of the C# packages. I can load in dll files but unfortunately far from all C# packages have dll files available to download, many require a Install-Package command installation.
Steps to reproduce: Create a new Godot mono project, add a C# script, build it once. Open up the .sln with Visual Studio 2019 and use the NuGet package manager to install whatever package.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (7 by maintainers)
Unfortunately in order to extend Visual Studio to add functionality for Godot projects we need to the project to have a custom project type guid the extension can handle. At the same time if there’s no extension that recognizes that project type guid then Visual Studio can’t open the project at all. It’s very annoying because both MonoDevelop/VSMac and Rider allow the extension to use its own logic to detect whether to handle the project or not. But it’s what it is, so starting with 3.2.3 in order to open the solution with VS you will need to install the extension: https://github.com/godotengine/godot-csharp-visualstudio/releases/tag/v1.1.1 (it will be available in the marketplace soon as well)
I use a lot of NuGet packages with 3.1
The way I get it working is like this:
msbuild
takes care of fetching the nuget packagesNot a fix, but maybe it can help you out for now.