"This solution contains no resources scoped for a Web application and cannot be deployed to a particular Web application." in STSDEV

I recently created a Web Part based on the STSDEV Web Part project and found it was very simple to use. I had another Web Part to create but this time I decided to go with the more generic 'Empty Solution' project just to ensure I wasn't getting lazy with all the stuff STSDEV does for me. The project built, and installed properly into the solution store, but doing a 'DebugDeploy' failed with an error.

I compared the two projects and they seemed to be configured identically. However upon further inspection, I found that the 'DebugDeploy' section of the Web Part Project (STS DEV generated) is different than the 'DebugDeploy' section of the empty solution. changing this line:

<Exec Command="$(STSADM) -o deploysolution -name $(PackageName) -immediate -allowgacdeployment" />

to:

<Exec Command="$(STSADM) -o deploysolution -name $(PackageName) -immediate -allowgacdeployment -allcontenturls" />

solved the problem.

NOTE: you'll also want to update the retract solution command to this:

<Exec Command="$(STSADM) -o retractsolution -name $(PackageName) -immediate -allcontenturls" ContinueOnError="true" />

Comments

Sandesh M M said…
Event i found the same issue when im started working on sharepoint 2010. This is the solution i found and sharing it may helps to others

http://programming.cmsstores.com/this-solution-contains-no-resources-scoped-for-a-web-application-sharepoint-wsp-exception/

Popular posts from this blog

ERROR: Failed to create feature receiver...

Programmatically Update Page Layouts