The reason for this list is I keep running into dodgy issues and keep spending time on them only to remember I had the same issue from 6 months ago (this list is for my personal use so I appologise if it doesnt not seem clear, it’s just to jog my memory!):
- I suffer compile hell and then I remember that IIS caches my DLLs in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files for my WCF service. I try everything and then I remember this after throwing my laptop against the wall. I recommend restarting IIS and delelting Temporary ASP.NET Files every time you recompile. I just dont trust what is being cached.
- Some of my DLLs may be set, by default, to copy local so the GAC doesnt get updated and I cant figure out what is going on.
- Always remember to separate each bit of functionality into separate projects. If you have it all in 1 project then VS 2008 parses the whole workflow every time and this takes ages.
- Work on a machine with loads of power, when I changed machines from a blade to a super dooper machine by development time increased by and 10*. Also, to deploy to Sharepoint rime decreased from about 40 seconds to about 6 sencinds..NICE!!!
- Always remember to do an “UPDATE SERVICE REFERENCE” on your WCF refs. It seems theses do not get updated sometimes and this caused datatype errors with little red errors in your workflow. This is also related to point 1 above (Temporary ASP.NET Files).
- Because workflow is so complex I recommend writing unit test on every layer other wise you will spend too long looking for issues in one layer when they could be raised elsewhere.
- If you change a SN.KEY file your Public key token changes. Pretty obvious but spend ages thinking I had another issue.
- Dont forget to map dependency activities declaratively to child activities. This is the most trustworthy way of passing data / properties between activities.
- If you get the designer cant load type errors that give you no info what so ever firstly do IIS reset, then delete Temporary ASP.NET Files then restart visual studio. Then recompile the repen the WF design surface. (sounds like over kill but worth the effort I reckon)
- Was having DLL hell and then I ran a visual studio CLEAN command on my Solution and the DLL hell went away.
Sharepoint workflow assemblies must be strongly named. The feature installation requires that you indicate the publick key token for the workflow assembly. There are a number of hoops one can jump through in order to obtain this public key. Here’s some I’ve heard today:
* Drag the built assembly into the GAC, browse to the GAC, copy and paste the public key token from the explorer window;
* Drop to a command prompt, browse to the SDK/Bin directory, use the SN.EXE command line tool to retrieve the public key token, copy all the contents of the command window into notepad, find the public key entry, copy and paste into your xml file
You can be a lazy programmer like me and simply take the following steps:
* In Visual Studio
* Tools/External Tools
* Title: Get Public Key; Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe; Arguments: -Tp “$(TargetPath)”; use Output Window
Now you’ll have an option on your Tools menu called “Get Public Key.” Simply build your strongly named assembly, select Tools/Get Public Key and in the output window you’ll be presented with the public key token, simply copy and paste… wala lazy programming shortcut.
this is from: