TShock icon indicating copy to clipboard operation
TShock copied to clipboard

Nuget package with dlls for plugin development.

Open edg-l opened this issue 6 years ago • 5 comments

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:

  • BCrypt.Net.dll
  • HttpServer.dll
  • Mono.Data.Sqlite.dll
  • MySql.Data.dll
  • OTAPI.dll
  • TShockAPI.dll
  • TerrariaServer.exe
  • Newtonsoft.Json

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

edg-l avatar Dec 11 '17 15:12 edg-l

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

QuiCM avatar Dec 11 '17 22:12 QuiCM

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.

hakusaro avatar Dec 11 '17 22:12 hakusaro

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

QuiCM avatar Dec 11 '17 22:12 QuiCM

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

And also TSAPI in nuget.

hakusaro avatar Dec 18 '17 07:12 hakusaro

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>

Arthri avatar Dec 14 '21 17:12 Arthri