Where is Microsoft.CSharp Anyway?

I was handed a .zip file with a moderately complex project structure and which had been ripped out of subversion.  The code is referencing Microsoft.CSharp, as in:

image

As you can see, visual studio was missing the actual DLL. 

I don’t normally think about where these things are physically located.  I dug around here, created a new console app (after following reading through this little exchange) and found the DLL on my environment at: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\Microsoft.CSharp.dll.

This actually gave rise to an issue with visual studio complaining that I was targeting the wrong environment, “Microsoft.CSharp.dll or one of its dependencies requires a later version of .NET blah blah blah”.  In the end, I remove the reference altogether and that seems to have solved the issue.

It’s just another one of those oddly difficult things to figure out and the sort of thing that is less interesting than an argument with your wife over whether there are too many women’s coats in the closet Smile

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Very Cool BrightStarr Video

Having just started working here at BrightStarr, I’m pretty psyched that we’ve put together this very cool video up on youtube here: http://www.youtube.com/user/BrightStarrSP

I wasn’t involved in producing it and I’m not personally big on these kinds of promotional efforts, but this one is quite cool to me.

Cool BrightStarr Video

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Goodbye CGS, Hello BrightStarr!

Tomorrow, I officially start my first day at BrightStarr (www.brightstarr.com), a UK based company with a US office that is, incredibly, a mere 6 miles from my house.

It was an easy decision to leave CGS, but a hard decision to make Smile.  Let me explain.

I joined CGS just over a year ago (December 2009) and joined as the Director of a SharePoint consulting practice.  This seemed like a brilliant idea at the time.  Here in the US at least, it’s quite common for people to start out as a junior dev type person, writing reports and tracking down annoying rounding error issues (I don’t miss those days at all!).  You gain increasing levels of responsibility and associated development awesomeness.  I had unbelievable opportunities over my career to some very cool stuff.  I got to write an invoicing system from scratch.  I got to work with smart people, including my brother of all people, to develop a complete web based development app for a 4GL called Progress.  Fun, fun times.

Of course, you progress from the Sr. Dev type to a technical team lead, bordering on being that most hallowed of technical things – an Architect.

The conventional wisdom on this progression is that the next step from Architect is to some kind of more senior management role.

I had bought into and accepted that progression.  When I joined CGS in one of those more senior roles, I anticipated, to some extent, that I’d be stepping “beyond” architect and into some kind of “super architect” kind of role – one architect to rule them all Smile

For me, that turned out to be less than successful.  It’s not to say that I didn’t have some good success in the role, but in the end, I’m not a classic practice manager.  Asking people on a weekly basis whether they have entered their time into the timesheet system just isn’t very interesting to me.  Scheduling out “resources” (or people, really) months in advance is just boring.  Pouring over SOWs and looking for and closing potential loopholes that may bit us in future is a real horror.  Yet, these are important things and given how important they were to the CGS role, it was obvious a change had to to be made. 

It was only obvious to me after a lot of thinking, however.  Thankfully, the evidence was clear enough to me that once I did really think about it, it became obvious. 

That got me to looking for open positions and I found BrightStarr.

I’ve signed on as a SharePoint architect and I can’t wait to get started.  So far, they are a very impressive crew and I think that they (we!) are poised to make a real name in the market.  I’ll be posting more about what I do there and I am really looking forward to it.  Have a look at their web site – www.brighstarr.com – it’s an impressive piece of work.

I consider myself very lucky in all of this.  We have all seen various mid to senior level managers who are sort of stuck in a mire, unable to really excel or move forward quick and with confidence.  That was where I was headed and I’m very glad to have escaped it so easily. 

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Changing Site Column Groups in SharePoint Designer 2010

I created a slew of site columns using SharePoint Designer 2010 this morning and realized that I had given them all the wrong group.  It was embarrassingly difficult to figure out.  I didn’t know where to click…

image

I kept wanting to double click the row itself or click the Column Settings button in the ribbon.

As it turns out, the correct answer (or at least one correct answer) is to single click on the group itself.  Wait a moment and then it will allow you to enter a value, as shown:

image

Pretty easy once you know what to do, but it eluded me for a bit.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Manually Edit SPD XOML File to Clean Up Variables

In this post here (“Getting Answers Back from the Start Approval Process Activity”), I mentioned that you can accidentally add a whole slew of workflow variables to your SharePoint Designer workflow.  Things can quickly become cluttered and hard to read.  Specifically, if you add the “Start Approval Process Activity” action to your workflow, delete it and add it again, you end up with all of that activity’s workflow variables twice. 

It’s a real pain to go through and delete all of those manually, so I though I would try to remove them directly from the XOML file.  This proved to be easy enough to do. 

First, you need to locate the actual XOML file.  I wrote about that topic here: http://www.mstechblogs.com/paul/how-to-find-and-edit-spd-2010-workflow-xoml-files.  Once found, open up the XOML file and locate a variable you want to remove.  In this case, I added the "Start Approval Process” activity to my workflow twice.  I want to remove a workflow variable named “isItemApproved” since it’s no longer used and there is a duplicate variable named “isItemApproved1”. 

Simply do a text search for the variable.  My screen looks like this:

image 

If you search around in the XOML file, you’ll see that “IsItemApproved1” is used in many different places while the original "IsItemApproved” is simply defined once and never used.

Delete it and then save the file.

The only tricky part is that I had to actually close out SPD altogether and re-open it before SPD acknowledged that the field deleted.

Of course, deleting fields isn’t the only thing you can do with the XOML and I may blog about other topics like this in future.

You want to be very careful about what you do here and take backups of your work.  You can make a seemingly minor / subtle change here that trashes the workflow as far as SPD is concerned and you could lose hours of effort while you rebuild it.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

How to Find and Edit SPD 2010 Workflow XOML Files

I was researching an easy way to remove a bunch of workflow variables without having to spend my afternoon in a full blown SPD click torture session.  My thought was to edit the XOML directly, which is the XML file underlying SPD’s declarative workflows.  This is how I found it.

First, go to the All Files option under Site Objects in Navigation.  You need appropriate permissions to see this, so if it’s missing for you, appeal to the right admin person to grant you the priv.  This is what it looks like:

image

 

All Files shows a list of … all the files:

image

Select the Workflows folder and you see a list of folders for each workflow:

image

Click into the correct folder and  you see a listing of all the interesting goodies that make up an SPD declarative workflow.  Right click on the .xoml file and select “Open With –> SharePoint Designer (Open as XML)” to edit the XOML directly:

image

You may want to do a manual backup before you fiddle with things.  A regular copy/paste of the file directly in SPD is probably good enough, or you can copy paste the entire XML text and save it onto your desktop or whatever is your wont in these cases.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Getting Answers Back from the Start Approval Process Activity

I’ve been playing around with SharePoint Designer workflow’s fancy new “Start Approval Process” activity and was quickly stymied because I couldn’t right away answer the question, “was it approved or not?”. 

The short answer is that it’s quite easy to get the answer.  When you add this activity to your main workflow, SPD adds a bazillion variables to the Workflow Variables and Parameters data source, as you can see here:

SNAGHTML2350fe72

You’ll also note that if you add more than one of these, SPD appends a “1” and so forth to all of the variables. 

I found that when I deleted the first “Start Approval Process” activity, the first set of associated workflow variables remained (sadly).  So, be careful how you use this because otherwise, you’ll end up with  a very cluttered list of workflow variables.

I give Microsoft credit for following the “is” naming convention for a Boolean variable.  This convention makes it pretty clear what kind of data is supposed to be there.

In researching, I found this helpful article: http://office.microsoft.com/en-us/sharepoint-designer-help/workflow-actions-in-sharepoint-designer-2010-a-quick-reference-guide-HA010376961.aspx.  It doesn’t really address this specific issue, but has some good information on the topic so I’d go there if you want to learn more about this specific activity and its siblings.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

SharePoint Designer 2010 MOD function

I am working out some log where employees can request vacation, sick time, etc. One validation rule requires that you must always request time off in 4 hour intervals.  This is easy enough to do – use a modulo function.  Modulo function tells you the remainder in division.  If there is no remainder, modulo is zero, otherwise, it’s whatever is left.  For instance, 8 mod 4 = 0 (8 / 4 = 2 with no fraction).  On the other hand, 8 mod 5 is 3.

I needed to do this once with SPD 2007 once upon a time and I actually ended up using an InfoPath form to solve, so it was handled on the front end at the time.  In the current case, there may be an InfoPath form in the picture, but that’s not clear yet.  So, I was working out a technique to ensure that time requests are always in 4 hour increments.  I was going to do the math, save it in a string and then do some substring stuff. 

I pull up SPD 2010 and to my surprise (and a little embarrassment) there is a modulo function already:

image

I am once again pleasantly surprised that something I needed is already there out of the box.  It does seem like a weird function for Microsoft to include in the mix.  It has a sort of “this is easy, so let’s throw it in” feel to it.  I sympathize with that, as I do it myself all the time.  This CodePlex project has a bunch of little functions that result from the ItsEasy principle.  At the same time, Microsoft continues to support evidence the “95% of the way” effect with the product.  They implement the Mod function, but not the round function, for instance.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

CodePlex Project – SP2010 Explorer

As part of an on-going effort to learn the technical low level details of SharePoint 2010, I’ve created a “SharePoint Explorer” kind of tool.  The idea isn’t new.  I used this project more than once: http://sharepointexplorer.codeplex.com/.  My idea is to create a SharePoint version that uses connected web parts to show all the low-level detail that the object model can provide. 

This blog post serves as both an announcement of the project as well as a call for volunteers.  If you’re interested in working on this project, let me know via email (galvin.paul@gmail.com) and we’ll work it out.

Here is the project: http://sp2010explorer.codeplex.com/

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

SharePoint Designer 2007 Workflow Extensions CodePlex Project

I am putting together my second CodePlex project (details to be announced on Wednesday this week, plus or minus) and I had a look at my first project, “SharePoint Designer Workflow Extensions”.  I was shocked and embarrassed to see that that it’s been downloaded over 4,800 times:

image

I basically forgot about this project in the last 12 months.  I’m embarrassed because I have essentially abandoned it.

I’m going to have another look and remind myself of what it’s all about. 

If anyone is interested in working on this, let me know and we’ll see about collaborating on it.  4,800 downloads isn’t a giant amount, but it’s more than I ever realized and it’s probably worth some effort picking it up and carrying it forward.

</end>

Subscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin