- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经调试了一段时间没有问题的SharePoint项目。
今天,我在项目的唯一功能中添加了功能接收器。我还没有更改有关Visual Studio默认添加的空接收器类的任何内容。
“Package”命令现在生成一个包含我项目的DLL文件的软件包(如您所愿-添加功能接收器不应对此进行任何更改)。
但是,当我调试时,生成的程序包不包括我项目的DLL文件,并且部署工作因以下错误而失败:
Error occurred in deployment step 'Add Solution': Failed to load receiver assembly "ABC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2377fad544a7c307" for feature "ABC_XYZ Feature" (ID: dca34989-a2f2-413b-b5c4-958e0bbb84ef).: System.IO.FileNotFoundException: Could not load file or assembly 'ABC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2377fad544a7c307' or one of its dependencies. The system cannot find the file specified. File name: 'ABC, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2377fad544a7c307' at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection) at System.Reflection.Assembly.Load(String assemblyString) at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_ReceiverObject()
WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
最佳答案
这个问题的公认答案对我不起作用。
以下工作:
...simply changing out the project’s strong key assembly worked in this particular case. If you haven’t had to change this before, it is under the properties of the project -> Signing. Under ‘Choose a strong name key file’, select New. The password is optional.
关于deployment - 为什么在调试时包中缺少项目的程序集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10195931/
我是一名优秀的程序员,十分优秀!