将bindingRedirect添加到.Net标准库(Adding a bindingRedirect to a .Net Standard library)
我有一个.Net标准库,我在尝试使用其中一个依赖库时遇到错误,我认为这是一个版本冲突。 在旧式.Net类库中,我可能会添加如下内容:
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
但是,我显然不能在Net Standard库中这样做; 所以,我的问题是,在.Net标准世界中解决此类问题的策略是什么?
I have a .Net Standard library, and I'm getting an error when trying to use one of the dependant libraries, which I believe is down to a version conflict. In an old style .Net Class library, I might add something like this:
<?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
But, I obviously can't do that in a Net Standard library; so, my question is, what is the strategy for addressing such issues in the .Net Standard world?
原文:https://stackoverflow.com/questions/46111749
满意答案
UDP协议将始终在一个数据包中发送所有数据。 如果要发送不基于数据的包大小,则需要使用TCP。
You can use the SetBuffer() overload where you do not have to pass a byte[] buffer - just adjust the existing index and count to be used - then after the operation set count back to it's original value:
mySocketAsyncEventArgs.SetBuffer(mySocketAsyncEventArgs.Offset, numOfBytesWritten); mySocket.SendToAsync(mySocketAsyncEventArgs); ... mySocketAsyncEventArgs.SetBuffer(mySocketAsyncEventArgs.Offset, originalBufferSize);
相关问答
更多如何使用ZeroMQ将字节数组发送到套接字?(How to send byte array to socket using ZeroMQ?)
通过套接字java发送字节数组而不发送长度(Sending byte array through socket java without sending length)
如何指定使用Socket.SendToAsync()时要发送的字节数?(How to specify the number of bytes to send when using Socket.SendToAsync()?)
UDP发送文件确切的字节数(UDP Send File Exact Number of Bytes)
Java TCP Socket发送字节数组(Java TCP Socket send byte array)
在python中使用字节(Work with bytes in python)
是否可以读取为TCP写入套接字缓冲的字节数?(Is it possible to read the number of bytes buffered for a TCP write socket?)
导致Socket.Receive返回的最小字节数是多少?(What is the minimum number of bytes that will cause Socket.Receive to return?)
需要通过Socket获得字节帮助(Need help on bytes via Socket)
如何将特定数量的字节写入/发送到套接字完全但不是部分?(how to write/send a specific number of bytes to a socket totally but not partially?)
相关文章
更多Becoming a data scientist
Spring Data: a new perspective of data operations
A Great List of Windows Tools
[转]So You Want To Be A Producer
《数据结构与STL》(Data Structures and the Standard Template Library)扫描版[PDF]
Stack Overflow Architecture Update - Now At 95 Million Page Views A Month
按钮样式
Securing Solr on Tomcat access using a user account
Solr: a custom Search RequestHandler
Drupal Forums instead of phpBB or vBulletin: A casestudy
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!