hellrage / NC-Reactor-Planner

An application for drawing and simulating NuclearCraft nuclear reactors. Find NuclearCraft at https://minecraft.curseforge.com/projects/nuclearcraft-mod
65 stars 19 forks source link

Build fails (Newtonsoft.Json.dll) #41

Open dfego opened 4 years ago

dfego commented 4 years ago

I'm on current master and v1.2.25 (9744c903d3fdc8ddcfac772d197d4935a6e4406f), on Windows.

Errors seen when building:

1>------ Build started: Project: NC Reactor Planner, Configuration: Debug Any CPU ------
1>C:\Users\Dan\NC-Reactor-Planner\NC Reactor Planner\Properties\Resources.resx(171,5): error MSB3103: Invalid Resx file. Could not find file 'C:\Users\Dan\NC-Reactor-Planner\NC Reactor Planner\bin\Debug\Newtonsoft.Json.dll'. Line 171, position 5.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

To reproduce:

  1. git clone https://github.com/hellrage/NC-Reactor-Planner.git
  2. Open NC Reactor Planner.sln in Visual Studio Community 2019
  3. Click Build -> Build Solution

I'm building the Debug build, which was the default, but also tried the Release build. I've checked the packages (Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution...) and both fNbt v0.6.4 and Newtonsoft.Json v11.0.2 are installed.

If there are any additional steps that should be required, perhaps it's just a documentation issue?

hellrage commented 4 years ago

Hello! Yes it's a documentation issue, I'm packaging the .dll with the executable, so you'll need to add the actual file to the Resources folder. Check the .resx to make sure, it's expecting it there.

dfego commented 4 years ago

Oh I see! So this isn't required to build the code, but is required to build the project because you've listed it as a resource? Is that how I'm able to just download the .exe and then it creates the .dll alongside it when it runs?

hellrage commented 4 years ago

Yes, so that there's no need to download additional libraries user-side

dfego commented 4 years ago

Thanks so much for that information!

I got a build to work by copying .\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll to .\NC Reactor Planner\bin\Debug\.

A section in the README might be helpful on this, or if there's any way to make it smoother that would be amazing. Either way at the very least the existence of this ticket will hopefully help someone else.