Martin Hinshelwood's Blog

A Scottish dyslexic software developer: .NET architect, developer, evangelist, technology enthusiast and multi-dimensional free thinker


News

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Subscribe

Personal

Accreditation

Stats

My Stats

  • Posts - 253
  • Comments - 278
  • Trackbacks - 67

Twitter












Tag Cloud


Recent Comments


Recent Posts


Article Categories


Archives


Post Categories


Image Galleries


Blogs I read


Blogs of Friends


Blogs on VSTS


Multi-Dimentional Free Thinking Bloggers


Personal


Projects



There seams to be a problem in MSBuild when you add an “Accessor” as part of a Unit Test project.

C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest\Microsoft.TeamTest.targets(14,5): error MSB4018: The "BuildShadowTask" task failed unexpectedly.
System.IO.FileLoadException: API restriction: The assembly 'file:///C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Web.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain.
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
   at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.WebBinder.LoadData()
   at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.WebBinder.Init()
   at Microsoft.VisualStudio.TestTools.UnitTesting.Publicize.Shadower..ctor()
   at Microsoft.VisualStudio.TestTools.BuildShadowReferences.BuildShadowTask.Execute()
   at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult)

 

An Accessor allows your test project to access code that would normally be “Private” or “Friend” from outside the Assembly that it resides in.

image

It creates a little file with the “.accessor” extension that is the same name as your DLL, and contains the name of the DLL.

image

If you remove this file then your remote MSBuild server will then build you solution successfully again including running your Unit Tests.

 

 

Reference:

Re: BuildShadowTask Failed unexpectedly - Accessor Problem (Upconvert VS 2005 to 2008) – URGENT

BuildShadowTask Failed unexpectedly - Accessor Problem (Upconvert VS 2005 to 2008) - URGENT


imageIf like me you want to try the rather that syncs your contacts (and pictures ) with your outlook contacts, which will then be displayed on your mobile phone, and you are behind a proxy server, then this info is for you…

NOTE: This will work for any .NET application where the developer has not already set it…

Open the [applicationname].config file in the install location and add:

<system.net>
  <defaultProxy useDefaultCredentials="true">
    <proxy usesystemdefault="True" />
  </defaultProxy>
</system.net>

Just above the closing </configuration> tags. This will allow your application to authenticate with a proxy server…

 

Technorati Tags: ,

The TFS Event Handler project on CodePlex has been updated today to take care of a number of bugs that were introduced in the last update. These have all been fixed and we are currently dogfooding with the new release. The Event Handlers have also been updated to take care of some issues that we found when using them in anger...

Download the latest working release here

View the Documentation here

 


<Rant>

Timagehere needs to be a way to easily build MOSS Solutions in Visual Studio. I know that there are a bunch of bits and pieces available form Microsoft and third parties, but I want an end to end solution.

  You should be able to create a SharePoint "Solution" in Visual Studio. Then Add Feature projects to it that can contain many list or site bits with the ability to compile and build the solution file that can be uploaded into SharePoint with out all of this faffing around...

Oh, and you should be able to do it remotely! On a workstation!

</Rant>

 

Technorati Tags: , ,

If you are wanting to developer solutions for SharePoint in Visual Studio 2008 then you need a couple of things to get started:

Although this is convoluted it does work...

If you are developing for either of my MOSS Codeplex Projects (MOSS Time Off Management or MOSS Designer Workflow Activities) then you will need this up and running if you do not want to have to install everything on a SharePoint server...

 

UPDATE: If you can get this to work, you must be a SharePoint developer guru

 


After having thought about it for a while I think that my idea not to create a separate TOM system independent of MOSS was a bit of a silly idea. The whole point of the system is to exist in any environment, so the first version will exist separate of SharePoint. The main advantage of this will be debugging and testing....

The first version will use simple web pages as stubs to the SharePoint bits, but the final version will need to run in MOSS.

This project will give me an idea of how complicated it will be to produce SharePoint features and how much time will be spent in bug fixing...

 


Over the next few weeks I will be blogging my escapades in developing an application solution for Microsoft Office SharePoint Server. I have entitled the application "MOSS Time Off Management" and it will be up on CodePlex for all to follow @ http://www.codeplex.com/mosstom (coming soon).

The idea behind this application is twofold:

First to give me a project that I can get my teeth into to learn all of the ins and outs of the SharePoint model, including how one debugs and developers for it. And second to give my company a working system at the end... There is nothing like dogfooding and everyone should eat what they make.

It will be build in .NET 3.5 and use a combination of WebParts, Workflow, InfoPath, SQL Server and a few other assorted munchies. I will be trying to include Test Driven Devolvement (but that will be determined by SharePoint) and I will be building the installer first.

Although this application will not stand alone (although I may have to build a skeleton if SharePoint becomes a pain), it will be able to be deployed globaly on many servers (SharePoint farms) around the world with a single point of truth...

Now I am scared....


If you are a developer who customises or extends Visual Studio Team System then this LinkedIn group is for you...

VSTS Developer

 

NOTE: All requests to join these groups will be checked before they will be approved. Evidence of your participation in VSTS development.

 


If you are a developer on Codeplex then there are now two Codeplex LinkedIn groups for you to join.

Codeplex Developer

All members must have an account with CodePlex and be a developer on at least one project. Please provide your account name after requesting to join...

Codeplex Coordinator

All members must be a Coordinator of at least one Codeplex project.

 

NOTE: All requests to join these groups will be checked before they will be approved. Please provide a link to your Codeplex profile.

 


Spent the day yesterday at the MSDN Roadshow in Glasgow. It was a very good day that provided me a deeper insight into the ADO.NET Entity Framework, Data Services and Silverlight 2 (Which I like even though I did not like Silverlight 1... no JavaScriptsmile_regular).

The last session on Team Suit was a little marred by Neil Kidd being rather ill...get well soon Neil...but I followed it anyway, but I do think that other attendees became lost fairly quickly...we all have bad days...

If you have not been lucky enough, or bothered to attend then you can get all the resources from http://www.msdnroadshow.co.uk/.

Oh, and I managed to blag myself a new keyboard which is pretty nifty, I would never have forked out for on my own, and a F5 MSDN T-shirt, which is a might tight...

 


What a fantastic day... Thanks to for the fantastic job he did organising this event and I hope that there will be more events like this in Glasgow in the future...

I can only comment on the speakers that I attended, but they were all very impressive...

did an excellent presentation on which I now understand and see the benefits and applications of, thanks Guy. And did an interesting session on "Anti-Patterns" that left me thinking a lot about code I had written in the past, you can find his presentation on his blog...

After lunch when you normally start to fall asleep we got a session on Continuous integration from Richard Fennell that sparked my interest (more on team system Richard). Then came the speaker that probably had the most impact for me. The talk was entitled "Red, Green, Refactor!" and was all about "Test Driven Development" from a guy that seams to know much about the subject, .

If I took anything away from this day, it was that although I know a lot, I know very little....

 

 

posted @ Monday, May 12, 2008 10:32 AM | Feedback (2) | Filed Under [ Personal ]


Its the main event tomorrow...

Developer Day Scotland - 10th May 2008

If you have not already signed up, well, its probably too late...but if you are still up and you are in Glasgow tomorrow get yourself down to Glasgow Caledonian University (I went to University there) and drop in. Don't forget to sign up tonight...

If you are up for it there is a Developer Day Scotland Geek Dinner on afterwards and some drinking before that.

 


image If you are having an issue with the assembly version in your compiled assembly not updating after a rebuild then you are not alone. The is a bug in the Visual Basic compiler that causes this problem and it requires a manual fix:

http://kbalertz.com/952628/Assembly-Version-change-Visual-Basic-Workflow-projects.aspx

Not hard, but annoying...

imageTo check the problem, double click on the assembly in your bin folder and open out the version tag.

imageYou can see from the image below what I am getting at. This causes no end of problems with signed assemblies. The KBAlertz article above implies that this only affects Workflow assemblies. But I have has t6his problem in other types of Visual Basic project.

This is not a big problem unless you are creating custom assemblies for SharePoint and have a convoluted deployment process before you can test, and can't figure out why you changes are not going through...

 

 

 


I have been using the Useful Sharepoint Designer Custom Workflow Activities project on CodePlex to augment the capabilities of SharePoint Designer to add such features as "Start another workflow" which is very useful for compartmentalising your workflow so as to not make it too complicated.

image

Well I found a wee problem. The "Lookup user info" activity only looks up information from the site and not from the users MOSS profile. So I started another CodePlex project for activities I will be building and I am creating once called "Lookup user profile" on my shiny new MOSS Designer Workflow Activities project.

This one Activity will alleviate my immediate need, but I can see many more in the future...


 imageWell the faeces hit the fan at work today...let me explain...

We have a completely unmanaged Sharepoint Portal server at work. It was installed in early 2004 and has been running in self service mode ever since. Not all of the company is using it, but those that are, are using it heavily. Particularly areas that service customers and one customer specifically use it so completely that that area of the business would find it hard to function if it was not available.

So early this year I started a project to migrate / rewrite for Microsoft Office Sharepoint Server (MOSS) and we now have a proof of concept site online that demos the features and architecture of a finished portal. This POC version was scheduled for go live in Q4...

This had been ticking over for a while with a number of project requests getting in the way, the TFS Sticky Buddy for one, along with many others. As the only .NET developer in EMEA it can get a little hectic.

imageRecently I had a project to make a copy of one of the Sharepoint 2003 portals and I ran into a number of problems... now, I am not a Sharepoint 2003 guru, having had most of my exposure to it with Team Foundation Server deployments, but I followed all of the documented approaches for copying a site, to no avail. For each attempt, of which there were many, and for each approach, again there were many, I ran into problem after problem. Either the export commands failed, or the import command failed, and the resultant restore looked nothing like the original having been mangled during the process.

The result of my efforts was a custom APS.NET application that replicated the functionality provided by Sharepoint (it is worth noting that the site did not use much of SharePoint to do its job). Problem solved...

But not really... I still had a soon to be mangled Sharepoint 2003 portal server with over a thousand users on it.

image Then the bomb shell landed... I had been getting some reports of problems for the users of a site that is used to handle a customers contract, these users were running into real performance issues and functionality limitations. They were aware of the proof of concept MOSS deployment and wanted a look, so when some of the guys were in the office I stupidly, as I always do, started showing off MOSS features and functionality that puts Sharepoint Portal server to shame. How stupid of me... in my zeal to get MOSS deployed to the business I inadvertently stepped on a land mine. They went home, spoke to a few people and lo and behold, my deadline has been moved up from Q4 to now.... or at leas as soon as possible, and specifically for the aforementioned site.

The Plan

image

Apart from quitting, having a nervous breakdown and ultimately committing Seppuku I had to come up with a way of fulfilling this insane idea of a deployment schedule.

To do this I plan to use the Business Data Catalog to connect to customer data, and create a portal site that dynamically build sites using an as yet non existent site template for a specified customer. This way there is system data available for creating excel services reports and stats along with document library and InfoPath forms. The site should look exactly like the My Sites, but for a customer. It can then be branched out for other entitles like products (we build them and then rent and service them) and contracts.

In the immortal words of the Windows 2003 Active Directory Installer:

This may take some time, or considerably longer...

 


I am currently taking votes for which features will make it into the next version of the TFS Sticky Buddy (v1.1 CTP 1), which will move towards v2.0. The current list of features is slim, but specific.

Features (11 Votes) Click an item to submit your vote...

Votes Status Title
2 Proposed Add Second diagram for Dashboard
1 Proposed Data Refresh
3 Proposed Drag and Drop
1 Proposed Percent work complete
3 Proposed Should be able to hold more work items per "node"
1 Proposed Suggestion - Click on the work item

If you want to suggest another feature, please be my guest but make sure you are not making a duplicate :)

 

If you are interested TFS Sticky Buddy v1.0 has been downloaded 256 times since Apr 21 2008... No I am not making it up....

 


I have been having a lot of Kerberos double hop problems on the network at work, and although I have not yet managed to fix them... I did find these useful pages:

What Is Kerberos Authentication? - Good high level overview...

Troubleshooting Kerberos Delegation - which I think I may find the most useful...

 

I will keep you updated on my progress...

 

Technorati Tags: , , ,

This is the first full release of the TFS Sticky Buddy application written in VB.NET 9 and WPF with Visual Studio 2008 Team Suit.

image

The application provides a graphical view of TFS Work Items and allow user to navigate round either the Area (Codeplex Component) or Iteration (Codeplex Release) tree. It displays all the work items loaded (by selecting a Team Query) on the node, colour coded by Work Item State.

You can edit and add templates for displaying Work Items loaded for different Life Cycle templates in Team Foundation Server by editing the XAML in the Life Cycle resource directory (#InstallLocation#\RDdotNet\TFS Sticky Buddy\Resources\LifeCycle\[Name]\[Name]Resources.xaml) and editing the resource file. Though I would suggest creating a new file for each Life Cycle you want to display. Out of the box I have supported a Default option that works for most TFS Process Templates, and a Codeplex option for supporting your Codeplex projects.

Usage

When the TFS Sticky Buddy application starts you will be prompted to select a team foundation server from the list (if you do not see any servers then you must set them up using Team Explorer) which will populate the Projects and other menus. The navigation diagram will by default render the first project in your selected TFS server.

Use the "Queries" menu to select which work items that you want loaded into your view.

System Requirements

.NET Framework 3.5
Visual Studio 2008 Team Explorer (not forced)
Access to a Team Foundation Server (not provided)

 

If you already have CTP1 or CTP2 you should update to the full release now...

 


As you have probably noticed I have been soldiering on with the TFS Sticky Buddy project, and I though I would share.

 image

With the next release you will be able to connect to any external (not on same domain) TFS server including CodePlex servers and load up your projects. The TFS Sticky Buddy guest stars above.

image

One of the major improvements is the ability to add skins for different TFS life Cycles. I have a "Default" setting and you can change it to the Codeplex Template. Over time I will be adding others, but I only have access to CodePlex, and my local production TFS server, so if you want a custom one, you may need to build it yourself...

If you want a go of these features you will need to download the source and build the main folder code... but there will be a release soon..

 


All to soon and it is that time again...I have been developing, hell bent on getting a working sticky buddy online, and here it is...

Download TFS Stick Buddy v0.4.0 CTP2 Now...

image_thumb23

With this version you can select what work items you want to display by choosing a Query from the list. You can add queries to your list through Visual Studio and the TFS Web Access power tool to allow customisation of the display for your needs and project template types. If you do not have a work item called "Requirement" and instead use one called "Customer Request" then you just need to make a query that pulls this information back.

image_thumb24

When you open TFS Sticky Buddy you will be asked to select a Team Server to connect to. If you have a proxy, like I do in the office, you will not be able to connect to an external TFS server through it as your credentials will be wrong... maybe I need a work item for that smile_regular

Once you have selected your team server you will need to wait for it to authenticate, but I added a little "loading" window to keep you happy as it may take a little while to authenticate depending on the speed on your network and the load on your TFS server.

When the load it complete you will have access to the menu options, but it will have automatically loaded the first Team Project on your server and the first work item query on your project (which tends to be "Active bugs").

image_thumb25

If you have this many bugs, you may need to invest more in quality control...

The application will load all of your Areas and their hierarchy by default and display any work items in your selected query on that Area. You can see that it will display everything on the node and colour code it depending on the state of the work item:

  • Proposed = Blue
    image_thumb22
  • Active = Red 
    image_thumb20
  • Resolved = Amber
    image_thumb21
  • Closed = Green