Posted in Sharepoint 2013

Problem & Solution: This solution contains no resources scoped for a Web application…

When i tried to deploy a webpart to a webapplication using both PS and Central Administration,i got the following warning:

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

It tried to deploy it to GAC which i didnt want.Because it needs to be deployed to a WebApplication in my farm

Solution is;
Started Visual Studio and the project,opened Package.Template.xml in an editor and edited the line in yellow:
sorun

DeploymentTarget property needs to be set as “WebApplication”.Even though i changed it via project properties,it kept changing to GACDeployment so i had to edit Package xml.Just to be sure.

After deployment i got to choose the webapplication where i want it deployed.

Hope it helps

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s