Webdeploy 未发布包含资源文件的 App_GlobalResources 文件夹

Webdeploy not publishing App_GlobalResources folder with resource files

当我通过我的构建服务器使用 WebDeploy(使用 msbuild)发布我的 MVC Web 应用程序时,App_GlobalResources 并没有在应用程序的根目录中结束,我在定位资源时遇到错误

The resource object with classname 'Site' and key 'SiteMapAddRequest' was not found - System.Web.SiteMapNode.GetExplicitResourceString(..

该项目配置为仅部署所需的文件。 App_GlobalResources 文件夹最终被复制到我的 bin 目录中,可能是因为它包含的资源文件设置为 Embedded ResourceCopy to Output Directory。如果可能,我想避免将项目设置为将 all 文件发布到服务器。该应用程序在 visual studio 中正常运行,因为根目录中存在 App_GlobalResources 文件夹。

将 App_GlobalResources 文件夹中我的资源文件的属性设置为新文件的默认值,它起作用了。

Build Action: Content
Copy to Output Directory: Do not copy
Custom Tool: GlobalResourceProxyGenerator
Custom Tool Namespace: <empty>