12
Vote

Issue: Cannot Attach to Processes with CKSDev

description

I'm using Visual Studio 2012 and CKSDev for Visual Studio 2012. I don't remember having any problems with version 1.1, but just installed the new version and for whatever reason I can restart processes, but I cannot attach to them. I always get an error stating "Method not found: 'System.String Microsoft.VisualStudio.SharePoint.ISharePointProject.get_TargetOfficeVersion()'.

Has this been reported? I've attached a screenshot for people to take a look at.

file attachments

comments

WesHackett wrote Aug 23, 2013 at 7:48 PM

Hi,

Sorry to hear you're having problems. Would you be kind enough to provide me a little more info.

You mention you have CKS v1.2 on VS2012, but I would also like the following info I can:
  1. Which VS2012 update are you up to, I did the majority of my testing on Update 3
  2. Which version of SharePoint are you deploying too? SP2010 or SP2013? And if SP2013 which SP Root 14 or 15?
The lines of code erroring are from MS calls on the SPProject as shown in the snippet following:

/// <summary>
    /// Whiches the share point version is project deploying to.
    /// </summary>
    /// <returns></returns>
    public static SharePointVersion WhichSharePointVersionIsProjectDeployingTo(ISharePointProject spProject)
    {
        if (spProject.TargetOfficeVersion.Contains("14"))
        {
            return SharePointVersion.SP2010;
        }
        else if (spProject.TargetOfficeVersion.Contains("15"))
        {
            return SharePointVersion.SP2013;
        }
        return SharePointVersion.SP2010;
    }
Version 1.1 relied heavily on reading the registry for the installed version of SP.

public static SharePointVersion WhichSharePointVersionIsProjectDeployingTo()
    {
        if (DTEManager.ProjectService.SharePointInstallPath.Contains("/14/"))
        {
            return SharePointVersion.SP2010;
        }
        else if (DTEManager.ProjectService.SharePointInstallPath.Contains("/15/"))
        {
            return SharePointVersion.SP2013;
        }
        return SharePointVersion.SP2010;
    }
I changed it to use the VS API so that the changes I need to make when a SP2013 solution is being deployed to the 14 Root in SP2013 can be recognised by the Quick Deploy. The old code is:

public static SharePointVersion WhichSharePointVersionIsProjectDeployingTo()
    {
        if (DTEManager.ProjectService.SharePointInstallPath.Contains("/14/"))
        {
            return SharePointVersion.SP2010;
        }
        else if (DTEManager.ProjectService.SharePointInstallPath.Contains("/15/"))
        {
            return SharePointVersion.SP2013;
        }
        return SharePointVersion.SP2010;
    }
Having looked again I think there is some more defensive code I can put around this block to cater for when VS is returning this null. Which so far I've seen from one of my devs using VS2012 against a very old SP2010 project. I'll be making this change asap.

Appreciate your help in assisting me resolving this issue.

Wes

mmendoza27 wrote Aug 23, 2013 at 8:40 PM

Thanks for the quick response.
  1. I'm on Visual Studio Profession 2012 Update 3
  2. I'm using a local version of SharePoint Foundation 2010 for testing, since we use SPF 2010 at work. I believe the SharePoint version is 14.0.4763.1000 (which I don't believe has been updated at all).
Hope this helps and hopefully it prevents future issues for others!

thaoula wrote Aug 25, 2013 at 8:11 AM

Hi Wes,

I am also having the same issue also with the same error message.

Answers -
1.We are using VS2012 Pro Update 3
  1. We are deploying to SharePoint 2010.
  2. Copy to SharePoint Root works.
Regards,
Tarek

nixxcz wrote Aug 27, 2013 at 8:01 AM

Hello,

I have the same problem, too.
  1. Visual Studio 2012 Update 3
  2. SharePoint 2010 SP1 (installed on Windows 7)
Hope this helps.

Kind regards

Martin

rroman81 wrote Aug 27, 2013 at 11:24 PM

I am also in the same boat.
  1. VS2012 with Update 3
  2. SharePoint 2010 SP1 (installed on Window 7)

Dynasign wrote Sep 3, 2013 at 2:18 PM

I've also VS2012 with Update 3 and SharePoint 2010 installed on my Windows 7 machine. We also use Resharper 8 (and my collegue the latest Reshaper 7 version). With Update 3 it worked before. I just updated to CKSDev Version 1.2 since then I've not seen it working anymore.

NDBelham wrote Sep 23, 2013 at 5:02 PM

Same issue for me. VS2012 Premium Update 3. SharePoint 2010 Dec 2012 CU on Windows 2008 R2.

G4lly wrote Oct 2, 2013 at 8:28 AM

Any luck with a fix for this? I'm having the same problem on VIsual Studio 2012 RTM. I then moved to update 3 whick also saw the same problem.
Cheers,
Gally

jfmendezc wrote Oct 10, 2013 at 4:51 PM

I was working with VS2010 and using CKS Dev v1.1, it did work fine but when I migrate my project to VS2012 (update 3) with SharePoint 2010 (v14) and install the extension 'CKSDev for Visual Studio 2012' then I got the same problem you are talking about.

I fixed it uninstalling 'CKSDev for Visual Studio 2012' and installing the extension 'CKS - Development Tools Edition (Server)' v2.4.

Now everything works very well.

elked wrote Oct 11, 2013 at 6:30 AM

indeed, this worked for me too. thx!

RobinD wrote Oct 11, 2013 at 7:02 AM

Works for me too. Thank you very much.

NDBelham wrote Oct 11, 2013 at 12:58 PM

Works also for me. Didn't think to use CKSDev taregting VS2010 with VS2013 (Update 3)!

NDBelham wrote Oct 11, 2013 at 12:59 PM

Have uploaded an attachment to illustrate which CKSDev is working for me with VS2012.

manojce wrote Feb 5 at 5:18 PM

Thanks,

Uninstall CSK Dev Tool for Visual Studio 2012 & 2013 and "CKS - Development Tools Edition (Server)"
Its working for me.

PMaz wrote Mar 6 at 11:05 AM

Hi Wes,

Can you let us know when you will be fixing this issue please. It's such a useful feature and I miss it!

Thanks,

Maz

Mr_T wrote Thu at 7:34 AM

Same issue here....