Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T. August 2007 Entries
Cannot select images in Microsoft Word?
For some reason, sometimes you cannot select images within a Microsoft Word document. This has baffled me on an off for some time - and I still do not know the reason why it behaves like this. Today I stumbled across a very simple (and maybe obvious to some) solution... right-click on the image (instead of trying to left-click to select it). This causes the image to be selected and pop's up the context (right-click) menu. Just press the Esc (escape) key to close the context menu, and the image remains ......

Posted On Thursday, August 30, 2007 4:42 AM

Unit testing with NUnit and member accessibility - and the InternalsVisibleTo attribute
One of the annoying things about unit testing, is that not all members of the target code class are accessibly to the test fixtures. There are limited options to work around this (as you really don’t want to put the unit tests within the code assembly). In the past, the usual method has been to open up the access levels of the code class members. This isn’t ideal from a best practices and security point of view. However, as of .Net 2.0 a better method has been introduced. This is to use the InternalsVisibleTo ......

Posted On Thursday, August 30, 2007 4:39 AM

.Net Error: Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.ExceptionHandlingException : The type '... .LoggingExceptionHandler..' cannot be resolved.
Here's another problem I had when trying to get the Microsoft Enterprise Library - exception logging working. The following error was caused because I did not add references to all the assemblies used. MyApp.UnitTests.BuildHelper... : Microsoft.Practices.Enterpr... : The type 'Microsoft.Practices.Enterp... Microsoft.Practices.Enterpr... ......

Posted On Monday, August 27, 2007 4:24 AM

.NET Error: System.Configuration.ConfigurationErrorsException : An error occurred creating the configuration section handler for exceptionHandling: Could not load file or assembly
The following error was caused because of referencing unsigned (not strongly typed) assemblies - in my case because I was using assemblies from the Enterprise library source/working dir (C:\EntLib3Src\App Blocks\bin) instead of from the main Enterprise Library install dir (C:\Program Files\Microsoft Enterprise Library 3.1 - May 2007\Bin): MyApp.UnitTests.BuildHelper... : System.Configuration.Config... : An error occurred creating the configuration section ......

Posted On Monday, August 27, 2007 4:16 AM

NUnit not working properly - cannot find TestFixtures (Reason: Has no TestFixtures)/getting Visual Studio to automatically run NUnit
When trying to run NUnit against an assembly, it loads the assembly fine, but when you run it, it cannot find any tests (even though the assembly contains many tests). Under the 'Tests Not Run' tab, if you expand the treeview, it states: "Reason: Has no TestFixtures". This problem is caused when NUnit does not have adequate rights to the assembly. In my case it was because my project was on a network drive. A simple solution to this is to add a post build event in Visual Studio to copy the assembly ......

Posted On Thursday, August 2, 2007 2:23 AM

Copyright © Tim Huffam | Powered by: