🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[原文网址](https://connect.spotware.com/docs/available-resources/code-samples/getting-started-in-c) ### How to get started your own app in C#: 1.从这里下载C#类生成器:[Protocol Buffers Gen](https://connect.spotware.com/uploads/misc/Protocol%20Buffers%20Gen.rar) 2. 将文件解压缩到本地驱动器 3.从我们的github存储库下载最新版本的Trading API .proto源代码:[connect-protobuf-messages](https://github.com/spotware/connect-protobuf-messages) 4.将它们放在您在步骤2中提取文件的相同位置 5.对所有.proto文件执行** ProtoGen.exe * protofile.proto * \ - output \ _directory = * C:\\ output \ _folder * \ - include \ _imports ** 5. Execute**ProtoGen.exe*protofile.proto*\-output\_directory=*C:\\output\_folder*\--include\_imports**for all .proto files 6.将新生成的文件复制到项目中。 或者,您可以在解决方案中创建一个类库项目,并在那里复制.cs文件。 7.将.cs文件链接到项目,将它们添加到项目中和/或设置项目与proto库项目之间的依赖关系(如果您已创建库)。 将类库项目的引用(如果有的话)添加到主项目中。      8.将“Google.ProtocolBuffers.dll”的引用添加到类库项目(如果没有类库项目,则添加主项目) **NOTE:** *“Google.ProtocolBuffers.dll”通常位于路径“{ProtoPackage} \\ Release \\ net40 \\”中。 * {ProtoPackage}是本地驱动器上的proto包位置,您将其解压缩到之前(上面的步骤2) *您可以使用“OpenApiLib”命名空间访问proto类。 请在github上找到工作示例项目:[connect-csharp-samples](https://github.com/spotware/connect-csharp-samples) [Connect-API-ASPNet-Sample](https://github.com/spotware/Connect-API-ASP.Net-Sample).。 只需使用MS Visual Studio 2013打开并构建它。 Enjoy!