lextudio / sharpsnmplib

Sharp SNMP Library- Open Source SNMP for .NET
https://sharpsnmp.com
MIT License
356 stars 152 forks source link

Unable to get clean build #452

Closed lextudio-support closed 4 hours ago

lextudio-support commented 4 hours ago

I downloaded the source code for CatsPaw 5.0 and when I build it I get 845 errors. They are not 'missing library' items either. They are messages such as:

Error 9 The best overloaded method match for 'Lextm.SharpSnmpLib.ObjectIdentifier.ObjectIdentifier(string)' has some invalid arguments C:\Projects 2010\CatsPaw\Source\Tests\Tests\TestObjectIdentifier.cs 12 36 Tests
Error 10 Argument 1: cannot convert from 'byte[]' to 'string' C:\Projects 2010\CatsPaw\Source\Tests\Tests\TestObjectIdentifier.cs 12 57 Tests
Error 11 No overload for method 'Parse' takes 1 arguments C:\Projects 2010\CatsPaw\Source\Tests\Tests\TestLexer.cs 18 17 Tests

NOTE: I get a clean build if I trash the Tests project.

And....now that I get a clean build everything is throwing exceptions. Browser throws a Sockets Exception that it was forcebly closed by the system.

Compiler throws an out of memory exception when I try to compile rfc1155smi.

I'm running a 64-bit Windows 7 environment, using Visual Studio 2010, and the .NET framework 4.0

Original Reported Date: 2010-06-03T15:57:28.313-07:00 Original CodePlex Discussion Thread ID: 214919

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

Hi,

It is kind of by design, as when you generate a new snk for the source code, the unit tests project breaks unless you manually fix the AssemblyInfo.cs file.

I just resolved this by adding a backup snk file. You can see the changes in this change set. Readme.txt contains the details on how to use prepare.bat.

http://sharpsnmplib.codeplex.com/SourceControl/changeset/changes/46649

About the exceptions, the first one is unexpected. You need to provide more information on how you can reproduce it.

About the second exception, I suspect you use a bad rfc1155smi document. The one I use in unit test project is OK.

Regards,

Lex

Original Posted Date: 2010-06-04T07:10:01.613-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

I bring up the browser and get the list of snmp components found on my system. I scan down the tree to the sysUptime, sysName, etc. area. sysName should be straight forward, the name of my computer. Right click and issue Get. This is returned: [127.0.0.1:161] [6/8/2010 2:24:39 PM] ==== Begin GET ==== [127.0.0.1:161] [6/8/2010 2:24:39 PM] System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at Lextm.SharpSnmpLib.Messaging.MessageFactory.GetResponse(IPEndPoint receiver, Byte[] bytes, Int32 number, Int32 timeout, UserRegistry registry, Socket socket) in d:\sharpsnmplib_svn\SharpSnmpLib\Messaging\MessageFactory.cs:line 107 at Lextm.SharpSnmpLib.Messaging.GetRequestMessage.GetResponse(Int32 timeout, IPEndPoint receiver, Socket udpSocket) in d:\sharpsnmplib_svn\SharpSnmpLib\Messaging\GetRequestMessage.cs:line 228 at Lextm.SharpSnmpLib.Messaging.GetRequestMessage.GetResponse(Int32 timeout, IPEndPoint receiver) in d:\sharpsnmplib_svn\SharpSnmpLib\Messaging\GetRequestMessage.cs:line 194 at Lextm.SharpSnmpLib.Messaging.Messenger.Get(VersionCode version, IPEndPoint endpoint, OctetString community, IList`1 variables, Int32 timeout) in d:\sharpsnmplib_svn\SharpSnmpLib\Messaging\Messenger.cs:line 42 at Lextm.SharpSnmpLib.Browser.NormalAgentProfile.Get(Variable variable) in d:\sharpsnmplib_svn\Browser\NormalAgentProfile.cs:line 24 at Lextm.SharpSnmpLib.Browser.MibTreePanel.ActGetExecute(Object sender, EventArgs e) in d:\sharpsnmplib_svn\Browser\MibTreePanel.cs:line 107 [127.0.0.1:161] [6/8/2010 2:24:39 PM] ==== End GET ====

Original Posted Date: 2010-06-08T14:27:03.093-07:00

lextudio-support commented 4 hours ago

Copied from CodePlex without authors:

System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

This simply means you don't have an SNMP agent who should monitor 127.0.0.1:161.

Regards,

Lex

Original Posted Date: 2010-06-11T17:33:32.273-07:00

lextudio-support commented 4 hours ago

Marked as Answer Date: 2013-10-06T21:33:43.877-07:00