Showing posts with label WSS. Show all posts
Showing posts with label WSS. Show all posts

Friday, 10 July 2009

This solution contains resources scoped for a Web application and must be deployed to one or more Web applications

There are quite a few intricacies which can result in following error message during sharepoint workflow deployment.
"This solution contains resources scoped for a Web application and must be deployed to one or more Web applications."
One of such scenarios described here with possible solution.
I was trying to deploy a workflow having InfoPath form on it. But in development machine I don't have MOSS installed. I copied all sharepoint( and sharepoint-workflow) dlls locally. This build fine. No compilation error.
But when I was creating WSP package using WSPBuilder it was giving a warning message:
"Could not resolve: Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Please define the -DLLReferencePath with the path to the referenced assemblies. However a SafeControl tag for the WorkflowCode.MyWorkflow class has been created."


If you deploy this solution using command line tool in MOSS it gives "This solution contains resources scoped for a Web application and must be deployed to one or more Web applications." error message.

You can still configure this solution from administration UI.

There are two ways to fis this:
1) simply GAC the dll in you development machine. This willl ensure you don't get the warning message in package creation and no error on deployment either.
2) depending on the reference dll's and their trust level WSP builder creates as safe control list. Now when the above dll is not gac'ed WSP builder creates








To deploy this package correctly either delete safe control list manually from the manifest file. Manifest file is located inside generated WSP file.

Alternatively set the "-BuildSafeControls false" in the wspbuilder configuration.

This may not be the best option, but it's solves the issue.