2

Using Visual Studio 2010 and CKSDEV 2010, I was able to select to set of features (right click on project, select features to activate).

Then using a custom deployment configuration, I used to specify "Activate selected features" in my deployment process. This was working fine. I was able to push F5 button and only these selected features was activated.

This was also working with VS 2012 and CKSDEV 2010 (not 2012) when targeting SP 2010.

Now, I'm working with SP2013, and CKSDEV 2012. This ability to deploy only selected feature has disappeared, including some other nice tools.

How can I restore the same behavior? How can I only activate my specific set of feature?

FYI, I found a workaround. I specified in my post build event this command:

"%WINDIR%\SysNative\WindowsPowerShell\v1.0\powershell.exe" -command "& {Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0; Enable-SPFeature ea32a615-8100-40d4-b1f1-636fbae3885d -url '$(SharePointSiteUrl)' -Verbose}"

Setting my deployment configuration to no activation and this will do the trick. But it's a bit of pain when dealing with multiple features.

I need specifying a specific set of features, because I build my project using:

  • A feature A which is hidden
  • A feature B which is hidden
  • A feature C which is hidden
  • A feature Master which is not hidden and declare A, B, C as feature dependencies.

Using Default deployment configuration, Visual Studio will enable A, B, C but will fail on activating Master, because its dependencies would already have been activated.

Any thought?

1

If I understood you right, you are trying to activate feature on deployment, there is something new in VS2012 named as Packaging Explorer.

Open Packaging Explorer and select the feature you want to access properties of, then press F4 on keyboard, it will show you all possible properties of the feature, as shown in picture below,

enter image description here

  • I set "Activate on default" to true on my features A, B and C. But when I push F5, I still see Visual Studio trying to activate these features, and fail when activating "Master" feature. – Steve B Mar 6 '14 at 10:03
  • @SteveB, set "Always Force Install" true for feature A,B,C and see if it works – Muhammad Raja Mar 6 '14 at 10:19
  • No progress at all. All features are still getting activated. – Steve B Mar 6 '14 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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