Steps to reproduce the problem:
1. Download the source of any version of MSNPSharp as of 2010-12-02
2. Open the solution in Visual Studio 2010
3. Run the Visual Studio 2010 conversion wizard
4. Attempt to compile the solution

I can't compile MSNPSharp because I only have Visual Studio 2010 and it won't compile after running the conversion wizard. I get an enormormous number of errors (136) similar to the following:

Error 94 The type or namespace name 'ABContactAddCompletedEventHandler' could not be found (are you missing a using directive or an assembly reference?) [...snip...]\MSNPSHARP_31_STABLE\MSNPSharp\Services\ContactService.cs 1158 133 MSNPSharp

Error 47 The type or namespace name 'BaseMember' could not be found (are you missing a using directive or an assembly reference?) [...snip...]\MSNPSHARPSVN\MSNPSHARP_31_STABLE\MSNPSHARP_31_STABLE\MSNPSharp\IO\SerializableClasses.cs 202 79 MSNPSharp

Other missing names:
  ABContactAddCompletedEventHandler
  abHandleType
  CircleInverseInfoType
  ABServiceBinding
  ActivityDetailsType
  BaseMember
  ContactType
  ExpressionProfileAttributesType
  GetContactsRecentActivityResultType
  MSNWS

I'm running Windows 7 64-bit edition. I just wish there was an MSNPSharp_31_stable.dll (ideally I'd like both 32-bit and 64-bit) I could download somewhere, or at least some instructions on how to compile this thing.

I went around (to files ContactService.cs, CircleList.cs, XMLContactList.cs, Circle.cs, and many more) and let VS2010 auto-resolve using statements, and it looks like there were a lot of places where the following using statement is missing:

    using MSNPSharp.Web_References.MSNWS.MSNABSharingService;

SingleSignOn.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNSecurityTokenService;

RSIServiceWrapper.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNRSIService;

SecurityTokenServiceWrapper.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNSecurityTokenService;

SharingServiceBindingWrapper.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNABSharingService;

StorageServiceWrapper.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNStorageService;

WhatsUpServiceBindingWrapper.cs needed this:

    using MSNPSharp.Web_References.MSNWS.MSNABSharingService;

After adding all those using statements, all I have left is 25 errors that all effectively say the same thing:

Error 5 The type or namespace name 'MSNWS' does not exist in the namespace 'MSNPSharp' (are you missing an assembly reference?)

I have no idea where to get this "MSNPSharp.MSNWS" namespace, so I'm stuck. Is there a better way to go about all this? Did the conversion wizard mess up something? Please help! I'd really like to get this compiled; I'm currently stuck with a really old version of MSNPSharp and am running into bugs that I'm hoping are fixed with the new version.

解決辦法:

Ah, I see now.  I needed to change all namespaces named

    MSNPSharp.MSNWS.XXX;

to

    MSNPSharp.Web_References.MSNWS.XXX;

Still, this is still a bug if it won't compile in Visual Studio 2010 without making dozens of changes by hand.

這是自已在 rebuild MSNSharp source in Visual Studio 2008 時發生的問題 ,在 Google Code Project Hosting 的原作者討論區找到相同的問題, 據回應的內容 ,是需要把 Source code 裡面的 MSNPSharp.MSNWS.XXX 修改成  MSNPSharp.Web_References.MSNWS.XXX 即可.

經過測試是 ok 的. 貼出來供大家參考 ,原文取自 MSNSharp 官方網站 網址: http://code.google.com/p/msnp-sharp/issues/detail?id=242 


arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Frank 的頭像
    Frank

    經驗交流分享與備忘

    Frank 發表在 痞客邦 留言(0) 人氣()