在 Visual Studio 2010 中将带有资源文件的 dll 部署到 sharepoint 2010
我在将程序集添加到我的共享点项目时遇到问题。我有一个包含不同语言的资源文件的程序集。我有一个英语文件 Utility.resx 和一个瑞典语文件 Utility.sv-SE.resx。当我构建它时,它将是一个用于该项目的 dll 和一个用于瑞典语言的 dll。问题是我何时应该使用 Visual Studio 将其部署到 Sharepoint。我已将项目的程序集添加到我的共享点项目中的包文件中。但是当我尝试部署它时却收到消息:
部署步骤“添加解决方案”中发生错误:错误:无法将指定的程序集添加到全局程序集缓存:Utility.resources.dll
我尝试同时指定 sv-SE当我添加程序集 i 包时, \Utility.resources.dll 和 Utility.resources.dll 作为位置。请注意,我想将其添加为项目输出中的程序集。
有人知道如何解决这个问题吗?
I have problem to add a assembly to my sharepoint project. I have a assembly that contains resource files for different language. I have one file for English, Utility.resx och one for Swedish Utility.sv-SE.resx. When I build it, it will be one dll for the project and one for the swedish language. The problem is when I should deploy it to Sharepoint with Visual Studio. I have added the assembly for the project to my packagefile in my sharepoint project. But when I trying to deploy it but I got the message:
Error occurred in deployment step 'Add Solution': Error: Cannot add the specified assembly to the global assembly cache: Utility.resources.dll
I have tried to specified both sv-SE\Utility.resources.dll and Utility.resources.dll as Location when I added the assembly i package. Note that I want to add it as assembly from project output.
Anyone having an ideas how to solve this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这应该有帮助 - http://blogs.visigo。 com/chriscoulson/deploying-localized-satellite-assemblies-with-sharepoint-2010/
您必须使用“添加现有程序集” 添加资源程序集并对路径进行硬编码 到 BIN\release\ 文件夹,而不是出于某种原因“从项目输出添加程序集”...
而且不 - 你不能使用 bin\$(ConfigurationName) - GAHH!
This should help - http://blogs.visigo.com/chriscoulson/deploying-localized-satellite-assemblies-with-sharepoint-2010/
You have to add the resource assemblies using "Add Existing Assembly" and hard code the path to the BIN\release\ folder and NOT "Add Assembly from Project Output" for some reason...
And no - you can't use bin\$(ConfigurationName) -- GAHH!
为什么不将资源文件部署为 resx?
它们需要作为“RootFiles”添加到manifest.xml中:
希望有帮助,
马可
Why not deploying the resource files as resx?
They need to be added to the manifest.xml as "RootFiles":
Hope that helps,
marco