Question

I need little help regarding sharepoint solution set up in sharepoint.

I created wspbuilder project(12 hive structure including controltemplates folder)

I have created project for user controls(like login logout etc) and when I build them the .ascx files are being added to 12\controltemplates folder(I wrote postbuild event to add .ascx as controltemplate)

There are no compilation errors. I built wsp and added it to solution store. But when I am trying to deploy it to the specific web application I can see no selection of web application in deploysolution window. It is saying

The solution contains no Web application scoped resource, and therefore cannot be deployed to a particular Web application. It can only be deployed globally.

I think the problem is adding safecontrols to the manifest.xml. When I build the wsp no safe controls are adding to the maifest.xml. I included deploymenttarget to GAC in wspbuilder.exe.config file also.

my feature.xml is as follows

<Feature  Id="DBF94C51-A4AB-4c47-BD97-74D3795C6A63"
      Title="site feature"
      Description="My sharePoint features"
      Version="1.0.0.0"
      Scope="Site" 
          Hidden="FALSE"
      DefaultResourceFile="core"
      xmlns="http://schemas.microsoft.com/sharepoint/"
      ReceiverAssembly="[[4part assembly name]]"
      ReceiverClass="[[Receiver class]]"
      >

How I can resolve this issue. I want to deploy the wsp to specific webapplication only.

Thank you.

Was it helpful?

Solution

if you are registering safecontrols, you need to scope the feature at the web application level so it know which web.config to update. Change the scope to WebApplication and it will know which web.config to deploy to.

Also when using stsadm use the -url switch to supply the web application you need.

Shane

OTHER TIPS

How are you deploying this - what are the exact STSADM commands you are issuing? Do they match the scope in your Manifest file?

http://msdn.microsoft.com/en-us/library/bb861828(office.12).aspx

ohh actually it was my mistake..sorry for the disturbance.

I didn't include the key value in the wspbuilder.exe.config file. I am taking the safe controls into other specified folder in the solution. I had to include in the config file.

Now everything is fine. Thanks for the help.

I did kind of same observation as you. I don't think it is related to gac or bin deployment of the dll, but only if there is safecontrol included. Here is how to do it in SP2010: http://rasor.wordpress.com/2011/12/04/sp2010-wsp-global-or-not/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top