Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.41k stars 377 forks source link

Nuget package with dlls for plugin development. #1554

Open edg-l opened 6 years ago

edg-l commented 6 years ago

This would allow plugin developers to add the references with one click. And also update them whenever a tshock release happens.

I currently have a nuget package with this but i think a official one would be better (?)

The dlls included would be:

I guess this should be done on another repostory, if you need a reference check this: https://github.com/Ryozuki/tshock-references Note: newtonsoft is outdated for the latest builds on my nuget package

QuiCM commented 6 years ago

This should be relatively straightforward to do. AV can also be set up to deploy .nuspec packages directly to nuget. Dunno about Travis

hakusaro commented 6 years ago

I personally dislike the idea of doing this as a Pryaxis thing. It's one thing to ship dlls to end users, but it's entirely different to redistribute them as libraries to other developers.

QuiCM commented 6 years ago

In fairness, we provide both OTAPI and TSAPI to developers - a nuget package would basically be a TShock SDK.

We should at least look at providing a developer package of binaries so people don't have to deal with separating them out of the application junk that you get from downloading a release

hakusaro commented 6 years ago

I think I forgot to comment on this. I would love this to be expedited and done ASAP.

And also TSAPI in nuget.

Arthri commented 2 years ago

For anyone still struggling with this, I've found a temporary solution.

You would need .NET Core or .NET 5+(.NET Framework also works but .NET CLI is easier) and https://fsprojects.github.io/Paket/.

Follow the guide for Paket setup: https://fsprojects.github.io/Paket/get-started.html https://fsprojects.github.io/Paket/learn-how-to-use-paket.html

Then, set this as your paket.dependencies:

source https://nuget.org/api/v2

nuget Newtonsoft.Json 10.0.3

framework: net472

group HTTPDependencies

  http https://github.com/Pryaxis/TShock/releases/download/v4.5.5/TShock4.5.5_Terraria_1.4.2.3.zip TShock/TShock.zip

Be sure to change net472 to net462 or net45 depending on your targetting framework

Next, run dotnet paket install to fetch TShock. This will fetch and unzip TShock into $REPO_ROOT/paket-files/httpdependencies/github.com/TShock

Finally, you can use VS to add the references. Or you can add them directly to the csproj(Assuming the csproj is in 1 directory lower than the solution):

<Reference Include="OTAPI">
  <HintPath>..\paket-files\httpdependencies\github.com\TShock\OTAPI.dll</HintPath>
</Reference>