是否可以在任何 C++ 中创建 Azure 辅助角色?
如标题所示:是否可以使用任何 .Net 语言在 Azure 中创建辅助角色 (WR)?在 Visual Studio 中,只有 C# 和 VB 具有执行辅助角色的模板。我看到的所有示例都仅显示这种方式(+ C++ 代码的 P/Invoke)。但是,我不明白为什么它不能在.Net C++ 中完成?我可以要求一个关于如何创建 C++ WR 的简短解释或示例吗?
As in the title: Is it possible to create the worker role (WR) in Azure in any .Net language? In Visual Studio, only C# and VB have the templates to do the worker roles. All examples I saw show only this way (+ P/Invoke of C++ code). However, I do not understand why it cannot be done in .Net C++? Can I ask for a small explanation or an example how to create C++ WR?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
OnStart() 中的角色启动代码将是 CLR 代码(C# 或 VB.NET),它可以轻松启动用任何语言编写的 exe - C、C++、Java 等。启动任务也是如此,它运行一个命令脚本来安装软件(通过 MSI、解压缩文件等)、运行 exe、启动服务器......无论您想做什么。
您需要处理的 .NET 代码是“脚手架”代码 - 设置环境、启动进程、重定向 stdout/stderr、配置诊断等的代码。
The Role startup code in OnStart() will be CLR code (C# or VB.NET), which can easily launch exe's written in anything - C, C++, Java, whatever. Same thing with startup tasks, which run a command script that can install software (via MSI, unzipping files, etc), run exes, launch servers... whatever you want to do.
The .NET code you need to deal with is the "scaffolding" code - the code that sets up the environment, launches processes, redirects stdout/stderr, configures diagnostics, etc.