I’m upgrading a Visual Studio 2010 solution to a Visual Studio 2012 one. It’s part of a migration of a solution from SharePoint 2010 to 2013 (and there are good details about this here). Annoyingly, though, every time I open the project it says that it has ben upgraded and shows an Upgrade Report. Nothing appears to be modified, but still, it’s shown.
Google didn’t show a lot of help on this, but in the end I decided to simply open the .csproj file and look for some sort of flag about being upgraded. I found the element:
so I tried deleting the ’0′ and reloading the project – and it didn’t show an Upgrade Report. Hurrah. Not sure why I needed to so this, though.
I’ve just had a bit of a problem with Solution Explorer in Visual Studio not showing the ‘checkout status’ icons from TFS – you know, the red tick, the padlock, etc.. These things:
I couldn’t figure out what was causing this, but found the solution on MSDN forums:
In VS 2010, while you have the solution open in Solution Explorer, select File-> Source Control-> Change Source Control, could you click on Bind for each project/solution? Binding provides version control functionality. This includes various version control icons that indicate status in Solution Explorer.
This advice was correct – I went to the binding dialog, and the solution and projects weren’t bound. I added the bindings back – and presto. I’m not sure, however, how the project became unbound…
Remarkably, I’ve only just started doing my first Sandboxed development in SharePoint 2010. (Most of our customers own their own servers, and want functionality you can’t easily build in the Sandbox alone).
Anyway, I knew that the API you could use in the sandbox was smaller than the full API, and I wanted my solution to warn me (e.g. fail to compile) if I tried to use something that wasn’t available in the sandbox. I found two approaches… Continue reading
I was trying to attach a debugger to an Outlook plugin I was working on. It was originally written for Outlook 2003, but has been progressively upgraded to 2010. However, I couldn’t breakpoint my code, or rather, the breakpoints weren’t being hit.
Found the answer on Stack Overflow:
So it turns out that Outlook doesn’t load the CLR on startup (it must be loaded shortly thereafter when it becomes necessary), which apparently confuses the VS debugger and causes it to only debug native code. To force it to load the CLR immediately, create an OUTLOOK.EXE.config file in the same folder with:
<configuration> <startup> <supportedRuntime version="v2.0.50727"/> </startup></configuration>
which is from this blog post. Then, even when VS starts attached, it will debug CLR code
So, we’ve been working on putting our SharePoint solutions through a proper build process in Team Foundation Server 2010 (TFS), and I hit a bit of a snag.
I had been given a build definition that had a build process – a Workflow Foundation workflow – that I wanted to alter. The problem was that while I had the XAML file for that workflow, and the DLL that defined some custom code activities that the process used, I didn’t have a full Visual Studio project for it. No problem, I thought, I’ll just open the XAML up in Visual Studio and edit it.
We’ve started to use SmartAssembly to obfuscate the code for some of the SharePoint products that we’ve been working on, and I’d had a few problems with it. Continue reading
With SharePoint 2007, WSPBuilder became our standard packaging tool for SharePoint solutions. It was simple, powerful, and a damn site easier than trying to write your own manifest.
Well, SharePoint 2010 and Visual Studio 2010 followed later, and Microsoft introduced much better tooling of their own. However, we’ve still got a lot of code being packaged by WSPBuilder, and we didn’t want to have to refactor all those projects just to package them for 2010.
Fortunately, Carsten Keutmann wrote a 2010 version (still in ‘BETA’, but it works fine). It offers many of the same extensions to Visual Studio as the previous version did.
However, I recently had to automate (in Team Foundation Server 2010) the build of one of our WSPBuilder based solutions, and that’s where things got more interesting… Continue reading
I’m a big fan of not raising exceptions if possible – rather than throwing and catching ‘expected exceptions’. To me, that phrase is an oxymoron – exceptions should be, um, exceptional, and it can make the wood hard to see for the trees when looking for proper exceptions.
Anyway, that aside – you can make Visual Studio break on any exception, not just the unhandled ones. Use Ctrl-Alt-E to edit – there is supposed to be some way to get to it though the menu, but I’ve not found it. Discovered in a blog post here.
More workflow fun – this time caused by my using the latest Visual Studio project for building SharePoint workflows – at this time it’s the one packaged in the VSeWSS3 version 1.2.
Back in the days of RTM, Workflows had a rubbish Visual Studio Project – I mean, awful. “Some assembly required” is really understating it. However, an improved version came along, and it was alright. Sure, there was some fiddling with batch files, but it worked. You could build it, deploy it, and test it easily, and it was pretty easy to get a simple workflow and some InfoPath forms working.
This is my first time using the 1.2 installer, which looks much more sexy – it’s got a wizard and does the ‘deploy’ bit for you, so no fiddling with .bat files. However, I couldn’t get InfoPath forms to appear for my workflow. The were getting deployed into the FEATURES folder, but when I ran the workflows – just ordinary task views appeared.
Bugger. Continue reading
A note for myself. The MSDN DVD for April 2007 (Disc 3070.1) with Visual Studio 2005 on it can’t be installed directly from the DVD. The installer asks you to ‘Install Disk 1′, which is unfortunate, as there is no disc 1, and the DVD contains both CDs in different directories on it.
The solution is to copy both CDs to a single directory on the hard disc of the machine, and run the installer from there.
Unfortunately, for some reason my virtual machine won’t let me do that directly – it complains about copying one of the files from the DVD – but I can share a folder on the host, and copy the installation files into the VM via that folder.
Once you’ve copied the files on, though, the ‘pre-filled’ licence key isn’t there anymore. You can get the key by starting installing from the DVD, writing it down, and then using it when you install from the hard disc.
It’s crazy the work-arounds you have to go through sometimes