ScottKaye/CoreRCON

Can I use this in non Core frameworks? I keep getting FileNotFound exception when I try.

Howsyomamanem opened this issue · 7 comments

Forgive me for being old-school. I haven't started using .NET Core yet.

Hmm, it should work in non-core projects. It works on .NET Standard 1.6 as of #7.

Could you please post a stacktrace or even a small sample to reproduce this message?

Forgive my late reply. I've switched computers. I'm trying to setup a console application to test CoreRCON using .NET Framework 4.6.1 in VS2015. I'm unable to install the package with the following error. Some how I got past this issue on previous computer but I forget how.

PM> install-package CoreRCON
Attempting to gather dependency information for package 'CoreRCON.3.0.0' with respect to project 'RCONTest', targeting '.NETFramework,Version=v4.6.1'
Attempting to resolve dependencies for package 'CoreRCON.3.0.0' with DependencyBehavior 'Lowest'
Resolving actions to install package 'CoreRCON.3.0.0'
Resolved actions to install package 'CoreRCON.3.0.0'
Install failed. Rolling back...
Package 'CoreRCON.3.0.0' does not exist in project 'RCONTest'
Package 'CoreRCON.3.0.0' does not exist in folder 'C:\Users\Eric\documents\visual studio 2015\Projects\RCONTest\packages'
install-package : Could not install package 'CoreRCON 3.0.0'. You are trying to install this package into
a project that targets '.NETFramework,Version=v4.6.1', but the package does not contain any assembly
references or content files that are compatible with that framework. For more information, contact the
package author.
At line:1 char:1

  • install-package CoreRCON
  •   + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
      + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.Inst 
     allPackageCommand
    
    
    

I've tried all the other frameworks available to me. I even installed the .NET Core SDK but it didn't seem to help. I got it from here: https://www.microsoft.com/net/download/visual-studio-sdks

I hate to ask this... I prolly sound like a newb. I promise I've developed in .NET since it came into existence many many years ago. ...could you expand on how to setup my environment to use this package, please?

Thanks in advance.

After some more googling... it looks like VS2017 has better support for .NET Core. Installing it now. I'll let you know how it goes. :-)

I can reproduce your issue with VS2015, however everything seems to work fine in VS2017. VS2015 installs fine when targeting .NET 4.7, though, if you need to stick with VS2015.

I installed VS2017. Took the sample project and tweaked it to connect to my MC server. Which is a MC 1.12.2 modded server running DW20 modpack. The code compiles and executes but seems to just hang up forever on the line:

...
var status = await ServerQuery.Info(mcIP, mcPort, ServerQuery.ServerType.Minecraft) as MinecraftQueryInfo;
...

Is it supposed to take forever to return? That was rhetorical. Obviously, it's not. Just not sure what I should try next.

Hi @Howsyomamanem, I'm sorry, but this probably won't be the answer you're looking for.

Unfortunately I haven't made any contributions to CoreRCON in the past year, and I'm thinking of just abandoning the project. It seems to somehow have recently gained some popularity, and is the top downloaded project for the "rcon" keyword on NuGet, so if anybody wishes to become the maintainer of this project, I will happily transfer it to you. I'll also write something in the README.

That call might be hanging forever because the server isn't responding to the challenge packet that is sent before the actual Info query. If you can connect normally using the sample project though, then I am not sure what the issue could be.

I'll see if I can find some docs on rcon protocol, if there is such a thing. If I can make sense of it, maybe I can figure out what can be done to fix it. If I can make .NET talk to REST, SOAP, various RDBMS', various networking appliances and peripherals, screen scrape telnet sessions, etc... how hard could rcon be? I guess. :-)
I was hoping for a shortcut in CoreRCON to save me from all that low-level stuff for a simple web site for my users and ops to monitor, status and control my servers. I may fork your source and see if I can get it working for me. Beats starting from scratch.