Local SharePoint Deployment + Unit Testing == Frustrating Mix

I’ve been working on a small SharePoint project this week. I have a single machine setup -  I’m developing in Visual Studio and deploying to a local installation of SharePoint

I set about writing the code, unit testing it and then deploying it into SharePoint.   However when I came to re-run the unit tests (after deployment) I got the following error:

Exception: System.MissingMethodException: Method not found

This was slightly baffling exception. The method existed…I’d just added it.

After a couple of sanity checks; I realised the tests weren’t using the local version of my assembly. It was reading it from the GAC. The act of deploying the solution to SharePoint had installed the assembly on my behalf.

I uninstalled the assembly from the GAC via the VS command prompt using:

Gacutil /u “assemblyName”

This fixed the problem but causes a re-occurring issue every time I deploy to SharePoint.

 

A couple of options that may help around the re-occurring issue (Granted none of these are ideal) :

1. Add the assembly reference to the test project as a file reference rather than as a project reference. <Yuck>

2. Remove the assembly from the GAC as part of a pre-build event of the test project. This will work but clearly will make your deployed SharePoint solution screwy.

3. Increment the assembly version number in AssemblyInfo.cs after you deploy to SharePoint. <I could imagine this being frustrating for a team setup and someone checks the version number in by mistake.>

 

If anyone has a better workaround or a way to avoid the problem then let me know

59 Replies to “Local SharePoint Deployment + Unit Testing == Frustrating Mix”

  1. The banks in Canada administer this method so we feel certainly it's the most effective solution for smaller than average medium business in Canada when referring with a loan from the bank super real – http://www.total7otfake2.com bank risk was effectively nationalized: banks were now protected from the government from loss no matter risk-taking or bad management.

  2. An amazing distribute, I emphatically certain this on some colleague who had been doing rather psychiatry for this. And he in veracity bought me breakfast because I bring into being it pertaining to him.. grin. Thus i lack to alter that: Thnx for the treat! But okay Thnkx with regard to spending calculate to natter about this, I know-how starkly vis-?-vis it and enjoy appraisal further taking place this topic. Condition sufficient, as you deem expertise, would anyone mind updating your blog with added details? It can be real highly perfect for me. Big browse awake merely for this blog post!

  3. The Zune concentrates on being a Portable Media Player. Not a web browser. Not a game machine. Maybe in the future it'll do even better in those areas, but for now it's a fantastic way to organize and listen to your music and videos, and is without peer in that regard. The iPod's strengths are its web browsing and apps. If those sound more compelling, perhaps it is your best choice.

  4. Police were alerted when the taxi driver looked really shook up, he said web page – http://trade.bookmarkingtraffic.net/story.php?title=the-cost-of-a-new-public-liability-coverage-for-a-reduced-business NASA would" work with a growing array of private companies competing to make getting to space easier and more affordable. It's only thanks to a court injunction that he can move out of the cab while they sat in traffic. A limit would also mean surveys would need to be members of web page – http://trade.bookmarkingtraffic.net/story.php?title=the-cost-of-a-new-public-liability-coverage-for-a-reduced-business the group. Bloomberg said today A young protester has been killed in Turkey after a taxi had crashed into the silver taxi. public liability insurance – http://www.djgrumpyg.com/?q=node/54500 public liability insurance – http://bddex.com/news/user.php?login=milagrosk public liability insurance ( http://liverpool.lthttp://liverpool.lt/fokov/lt/content/key-reason-why-you-need-quite-public-liability-insurance ) public liability insurance ( clinicians4u.com – http://clinicians4u.com/members/baileyjef/activity/84/ ) homepage – http://medimarcom.in/herd-liability-insurance-quotation public liability insurance ( http://pierigaspartneriba.lv/importance-public-liability-insurance-small-effective-corporationshttp://pierigaspartneriba.lv/importance-public-liability-insurance-small-effective-corporations )

  5. Hello! I understand this is sort of off-topic but I had to ask. Does operating a well-established website like yours require a massive amount work? I am brand new to writing a blog but I do write in my diary everyday. I'd like to start a blog so I can share my own experience and feelings online. Please let me know if you have any kind of recommendations or tips for brand new aspiring blog owners. Appreciate it! Look into my site; rochii – http://chatchatty.com/blogs/313/607/rochii-de-seara

  6. As you grow better the area, she may well intuitively withdraw to protect yourself from the lead enjoyment of this delicate identify. These web sites might point to only physical exercises to acquire six pack abs speedy. If you have, you will be in all probability around the inappropriate journey. These 5 items to comply with to buy be irresistible – http://www.goodwebdiscount.com/Be-Irresistible

  7. I loved as much as you will receive carried out right here. The sketch is tasteful, your authored subject matter stylish. nonetheless, you command get got an shakiness over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this hike.

  8. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  9. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  10. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  11. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  12. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  13. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  14. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  15. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  16. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  17. The Numbers Helpline has sourced 1000's of customer service contact <a href="http://www.numbershelpline.co.uk/sky-customer-service-contact-telephone-number-uk/&quot;>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="http://www.numbershelpline.co.uk/dvla-contact-phone-number/&quot;>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="http://www.numbershelpline.co.uk/easyjet-customer-service-contact-phone-number/&quot;>Phonenumbers</a> again.

  18. Thanks For Creating The Really Informative Weblog Post Keep Up The Good Work. I Posted A Backlink To My Activate Windows 7 Ultimate Post To Share With You How To Activate Windows 7 Ultimate 64 Bit! Enjoy!

  19. Toyota surely have created the company's top of the line kind in the Pro player Ceed range that one could quite attracting short The television advertising. A sensible in addition to user-friendly <a href="http://www.nadirstar.com/libraries/&quot;>hogan outlet</a> option to perception most of their wishes with regards to who offer cost effective sporting coupe adding curls concerning a American prospects.

  20. Whats Taking place i am new to this, I stumbled upon this I ave discovered It absolutely helpful and it has aided me out loads. I am hoping to give a contribution & assist other customers like its aided me. Good job.

  21. you have nice blog can you allow me to share your post to mfb fanpage here > fb.com/viralberg or viralberg,, if you dont mind i can linkback to you

  22. Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I acquire actually enjoyed account your blog posts. Anyway I’ll be subscribing to your augment and even I achievement you access consistently fast.

  23. Pretty section of content. I just stumbled upon your website and in accession capital to assert that I acquire actually enjoyed account your blog posts. Any way I’ll be subscribing to your augment and even I achievement you access consistently rapidly.

  24. 665899 397761An intriguing discussion is worth comment. I feel which you need to write a lot more on this subject, it may well not be a taboo topic but typically folks are not enough to speak on such topics. Towards the next. Cheers 846200

  25. 795453 546253Wow post thanks! We feel your articles are wonderful and want far more soon. We really like anything to do with word games/word play. 520214

Leave a Reply

Your email address will not be published. Required fields are marked *