-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime Error #422
Comments
The current nuget should support 3.5 -
https://www.nuget.org/packages/protobuf-net/
Now: what is the target platform here? Is it an AOT platform?
…On Mon, 23 Jul 2018, 15:59 Rinay Shah, ***@***.***> wrote:
When I run my code:
` static class Program
{
private static string _exchange;
private static string _ipAddress;
private static string _bodyBindingKey;
private static void ReadConfigSettings()
{
_exchange = ConfigurationManager.AppSettings["exchange"].Trim();
_ipAddress = ConfigurationManager.AppSettings["ipAddress"].Trim();
_bodyBindingKey = ConfigurationManager.AppSettings["bodyBindingKey"].Trim();
if(string.IsNullOrEmpty(_exchange))
{
throw new ArgumentException("Exchange is not specified in the app.config.");
}
if (string.IsNullOrEmpty(_ipAddress))
{
Console.WriteLine("IP Address not specified. Connecting to local host.");
_ipAddress = "127.0.0.1";
}
if (string.IsNullOrEmpty(_bodyBindingKey))
{
Console.WriteLine("Body binding key not specified. Binding to all remotes for body information.");
_bodyBindingKey = "*.body";
}
Console.WriteLine("Exchange is: {0}", _exchange);
Console.WriteLine("IP address is: {0}", _ipAddress);
Console.WriteLine("Listening for bodies to: {0}", _bodyBindingKey);
}
private static void Main()
{
ReadConfigSettings();
try
{
using (var receiver = new KinectBagReceiver<KinectBody>(_ipAddress, _exchange, _bodyBindingKey))
{
while (true)
{
#if NoWait
// Non-blocking, will return null if there isn't any data available
var kinectData = receiver.DequeueNoWait();
if (kinectData != null)
{
LogKinectData(kinectData);
}
System.Threading.Thread.Sleep(1);
#else
// Blocking call
var kinectData = receiver.Dequeue();
LogKinectData(kinectData);
#endif
}
}
}
catch(Exception ex)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(ex.Message);
Console.ResetColor();
Console.WriteLine(ex.StackTrace);
Console.ReadLine();
}
}
static void LogKinectData(KinectBag<KinectBody> bundle)
{
Console.WriteLine("{0} New bundle from {1} ", DateTime.UtcNow.ToFileTimeUtc(), bundle.SensorId);
if (bundle.Items != null)
{
Console.WriteLine("Bundle contains {0} bodies", bundle.Items.Count);
foreach (var body in bundle.Items)
{
Console.WriteLine("- Body {0}", body);
Console.WriteLine("- Hand States. Left {0} (Conf: {1}) Right {2} (Conf: {3})", body.HandLeftState, body.HandLeftConfidence, body.HandRightState, body.HandRightConfidence);
if (body.FloatData.Keys.Count > 0)
{
Console.WriteLine("- Custom Data");
foreach (var kv in body.FloatData)
{
Console.WriteLine("-- {0}: {1}", kv.Key, kv.Value);
}
}
Console.WriteLine("- Joints");
foreach (var joint in body.Joints)
{
Console.WriteLine(" - {0}", joint);
}
}
}
else
{
Console.WriteLine("Empty bundle.");
}
}
}
}
`
I get this error:
[image: otoo1]
<https://user-images.githubusercontent.com/30274343/43084685-2ae49a8a-8e67-11e8-805c-9c8904f0e14a.png>
I looked at other issues where they dicussed about installing older
Protobuf Packages but when I try to do that I get an error saying
Severity Code Description Project File Line Suppression State
Error Could not install package 'protobuf-net 2.2.1'. You are trying to
install this package into a project that targets
'.NETFramework,Version=v3.5', 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. 0
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#422>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABDsK5QJBgacuJuLqJrWNInf2XMPP3pks5uJeTWgaJpZM4VbJ2R>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I run my code:
I get this error:
I looked at other issues where they dicussed about installing older Protobuf Packages but when I try to do that I get an error saying
The text was updated successfully, but these errors were encountered: