Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've created a custom health rule for checking which mode solutions were built in (following this guide) but am having trouble deploying it. When deploying from VS2010, I get

Error occurred in deployment step 'Add Solution': Health analyzer rule registration
requires that the {0} assembly be registered in the global assembly cache.

I've tried using management shell to deploy it, but it silently fails when I try to activate it, which uninstalls it.

Does anyone have any experience of health rules? There's very little on Google about this error. Thanks!

share|improve this question
    
Did you check if the assembly is in the WSP (rename to CAB and check)? –  Marco Scheel Dec 18 '12 at 15:06
    
Yes, it's there, and set to deploy to GAC. –  Moray Dec 18 '12 at 15:53
    
Did you create this as a Farm Solution and not a Sandboxed Solution? –  John Chapman Feb 21 '13 at 18:02
    
It's a farm solution. –  Moray Mar 4 '13 at 9:16
add comment

1 Answer 1

please make sure your following this:

How to: Create a Feature to Register a Health Rule

http://msdn.microsoft.com/en-gb/library/ee538252(v=office.14).aspx

sounds like you got through that part fine! but the part that its failing on i think is the gac registering! its looking in the file but cant find it as its looking in another location! so follow this aswell to make sure that your app is looking in the gac and nowhere else:

How to: Deploy a Health Rule with a Solution Package

http://msdn.microsoft.com/en-gb/library/ee537821(v=office.14).aspx

taken from the above link:

<Solution SolutionId="00000000-0000-0000-0000-000000000000"
          xmlns="http://schemas.microsoft.com/sharepoint/">
  <FeatureManifests>
    <FeatureManifest Location="FeatureFolderName\feature.xml" />
  </FeatureManifests>
  <Assemblies>
    <Assembly DeploymentTarget="GlobalAssemblyCache"
              Location="AssemblyName.dll" />
  </Assemblies>
</Solution>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.