Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Azure SDK 2.3 的 Azure Web 角色。我的网站项目网站有 web.config,它在构建过程中被正确复制到 bin/debug/website.dll.config。但是 Azure SDK 完全没有在 cspkg 中包含这个 DLL,这导致我的角色 OnStart 失败,因为它依赖于 web.config 中的绑定重定向来加载正确版本的 Azure 运行时程序集。任何人都知道为什么 cspack 不包含此文件以及如何处理它?
web.config文件永远不会被复制为projectNAme.dll.config!
web.config
projectNAme.dll.config
仅以application.config这种方式复制文件。是的,对于 Web 角色,除了常规的 web.config 之外,没有任何东西会自动复制。
application.config
您必须按照您的主应用程序程序集的名称(即 )命名您的配置文件website.dll.config,然后Copy Always在属性面板的 section 中明确地标记它Copy to output folder。因此,该文件将包含在 Web 角色包中。
website.dll.config
Copy Always
Copy to output folder