Visual Studio always upgrade my solution

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:

<FileUpgradeFlags>0</FileUpgradeFlags>

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.

Visual Studio always upgrade my solution

TFS: Solution Explorer missing file status icons

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…

 

TFS: Solution Explorer missing file status icons

Sandbox Development – Reference the User Code DLL

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 “Sandbox Development – Reference the User Code DLL”

Sandbox Development – Reference the User Code DLL

Attaching Visual Studio 2010 to Outlook 2010 plugin for Debugging

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

Attaching Visual Studio 2010 to Outlook 2010 plugin for Debugging

Editing a XAML build process

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.

Wrong.

Continue reading “Editing a XAML build process”

Editing a XAML build process

WSPBuilder 2010 and TFS2010

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 “WSPBuilder 2010 and TFS2010”

WSPBuilder 2010 and TFS2010

Make Visual Studio break on all Exceptions

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.

Make Visual Studio break on all Exceptions

Stupid Visual Studio 2005 MSDN DVD

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 😦

Stupid Visual Studio 2005 MSDN DVD

MSI Setup projects in Visual Studio : 2005 != 2008

I’ve been working on a project that is a shared plugin to Office 2003. I was writing this in Visual Studio 2005, but for a variety of reasons (not least of which was having a tidier dev environment), I decided to move this onto a convenient VM which happened to have a lot of the things I needed (MOSS, a domain controller, AD, exchange).

Unfortunately, it also had Visual Studio 2008 too. I didn’t think this would be a problem, though, and so I when I opened the project on it for the first time and it asked me to upgrade the project to 2008, I was happy do. I didn’t think there’d be a problem.

Well, during development, there wasn’t. Whenever I went to test my MSI installer, though, I started to have problems. Installation kept failing and I kept getting the error:

Error 1937. An error occurred during the installation of assembly ‘Extensibility,Version=”7.0.3300.0″,Culture=”neutral”,PublicKeyToken=”B03F5F7F11D50A3A”,ProcessorArchitecture=”MSIL”‘. The signature or catalog could not be verified or is not valid. HRESULT: 0x80131045. assembly interface: IAssemblyCacheItem, function: Commit, component: {8C306A7E-AE8E-14F0-4168-C43060985CF4}

This was surprising. Extensibility.dll isn’t one of mine – it’s a Microsoft one that should’ve been in the Primary Interop Assemblies for Office. Anyway, it’s not one of mine, it hadn’t changed, and it was signed correctly. So what gives? Continue reading “MSI Setup projects in Visual Studio : 2005 != 2008”

MSI Setup projects in Visual Studio : 2005 != 2008