c# - 有没有一种简单的方法可以替换 Azure 云服务引用 dll,而无需重新发布服务?

标签 c# azure azure-worker-roles

我有一个在云服务中运行的 Azure 辅助角色。工作线程是我的自定义库的包装器,它运行代码。当我对我的库进行更改时我想简单地用新的替换旧的。目前我必须重新发布整个云服务项目,这需要时间并且看起来像是浪费精力。我知道当我有多个实例或其他问题时,这可能是必要的,但现在我想简单地将我的新 dll 复制到服务,而不是发布整个项目。

这可能吗?

最佳答案

阅读 Ralf 链接的文档后,我发现了这一点:

If your app’s backend infrastructure is stable, but the web roles need more frequent updating, you can use Web Deploy to update only a web role in your project. This is handy when you don’t want to rebuild and redeploy the backend worker roles, or if you have multiple web roles and you want to update only one of the web roles.

稍后重申:

Only web roles can be updated: Worker roles can’t be updated. In addition, you can’t update the RoleEntryPoint in web role.cs.

对于任何想要更新网络角色的人来说,记住这一点非常重要:

The changes are made directly to the virtual machine where the web role is running. If this virtual machine has to be recycled, the changes are lost because the original package that you published is used to recreate the virtual machine for the role. You must republish your application to get the latest changes for the web role.

关于c# - 有没有一种简单的方法可以替换 Azure 云服务引用 dll,而无需重新发布服务?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32188490/

相关文章:

c# - asp.net 如何在 HTML 表格中显示数据

c# - 在 Where() 中使用 ToList().Last() 进行 Entity Framework 查询

azure - 无法将 Databricks Repo 推送到 GitHub 存储库

c# - Azure 辅助角色和 Blob 存储 C# - Microsoft.WindowsAzure.Storage.StorageException : The remote server returned an error: (400) Bad Request

visual-studio - Visual Studio找不到我的Azure订阅

c# - 如何在table1的指定列之后将table2中的列连接到table1?

c# - C#/.NET 中文件级别的函数作用域?

powershell - Azure Powershell - 找不到经典 VM

azure - 用户流 "Sign in v2"的 AD B2C forceChangePasswordNextLogin 不会启动密码重置并阻止成功登录

c# - Worker Role流程-配置值轮询