Unknown Build Error RG1000

After manually merging a set of source changes to a .csproj file, my project would no longer build, giving this error:

Common.targets(588,5): error RG1000: Unknown build error, ‘An item with the same key has already been added.’

Not particularly helpful, especially if there are a large number of changes in the .csproj file. To get more information in such a case, in VS2010 you can go to Tools->Options->Projects and Solutions->Build and Run and set the MSBuild output verbosity to ‘Diagnostic’. After attempting to build again, the error now becomes much more useful:

Error 2 The item “ViewsFeedbackView.xaml.cs” was specified more than once in the “Sources” parameter. Duplicate items are not supported by the “Sources” parameter. C:WindowsMicrosoft.NETFrameworkv4.0.30319Microsoft.CSharp.targets 160 9 MyCompany.MyProduct.WebClient

Interestingly, after I reset the verbosity level back to Minimal (without making any code changes), the more detailed error still appeared. Weird.

Integrating Agent Ransack with FreeCommander

FreeCommander is my Windows Explorer replacement of choice, however it’s search feature is pretty basic. It pails in comparison to the free Agent Ransack which is fast, simple, and most importantly, lets you view snippets of the file contents in which a search term was found without having to open the file itself. Luckily, it is easy to replace FreeCommander’s built-in search feature with Agent Ransack instead:

  1. Install Agent Ransack.
  2. In FreeCommander, go to Extras->Favorite Tools->Edit
  3. Click the blue drop-down triangle next to the ‘Program’ field and seek to ‘C:Program Files (x86)MythicsoftAgent RansackAgentRansack.exe’
  4. Set the ‘Parameter’ field to ‘-d “%ActivDir%”‘ (without the single quotes, but including the double quotes around %ActiveDir% to ensure it works when there are spaces in the current directory path).
  5. Optionally set the icon by selecting AgentRansack.exe from the installation location.
  6. Select ‘Maximized’.
  7. Most importantly, set the HotKey to something and choose ‘global hotkey’.

Now you can press the defined hotkey (I use Ctrl+0) to launch Agent Ransack in the active folder, ready to search.

Error when opening Word documents

OS: Windows 7 64-bit
Office: 2010 Premium

When double-clicking a .doc/x file in Windows Explorer, or launching it via a different explorer, such as FreeCommander, you may see this error message:

Many, many people have seen this issue. I tried several solution, including deleting the word Data key, as recommended by Microsoft, checking that ‘Run this program as an administrator’ is not checked and renaming normal.dotm, but all failed to fix the error. Finally, here’s what fixed it for me:

  1. Right-click a .doc/x file -> Open With -> Choose program
  2. Select Word 2007 and hit OK.

After doing that, I could open word documents from outside word successfully.