miércoles, 11 de enero de 2012
Upgrade TFS diff
In VS goto Tools -> Options -> Source Coltrol -> Visual Studio Team Foundation -> Configure User Tools
There add an entry for winmerge, would like something like below
You can configure any diff tool here, but WinMerge is good enough for me.
viernes, 18 de noviembre de 2011
Getting "Error Unit Test Adapter threw exception: Unable to find assembly 'The assembly'" when running your tests
I was getting exception below running tests that were already running:
“Error Unit Test Adapter threw exception: Unable to find assembly 'The assembly’”
And I had to do below steps to fix this, I don’t think this is the best way to do it but so far is the only way I’ve found to fix it, link at the bottom contains more info.
Assuming VS2008 is installed on your development computer in "C:\Program Files\Microsoft Visual Studio 9.0", create the folder "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\UnitTestAssemblies". Copy YourTested.dll to that new folder.
Next, you need to edit the file "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTestHost.exe.config". There should be a line that looks like:
Change it to:
Restart VS2008 and run your unit tests again.
Always keep the assemblies in UnitTestAssemblies up-to-date. If you build a new Csla.dll, then copy it to UnitTestAssemblies before trying to execute your unit tests.
http://forums.lhotka.net/forums/t/5297.aspx
sábado, 12 de noviembre de 2011
.NET Interop pitfalls
I faced a few issues on the Migration Utility when loading COM objects (VB) from .NET and I want to share fixes so you could avoid wasting hours of your life.
Don’t trust on VB class Terminate event: it does not get fired! I load lots of SUI_WEB.SUI_Container objects and I was having a memory leak since memory is released internally on this event, even if you call Marshal.ReleaseComObject() and then set it to null.
Call Marshal.ReleaseComObject() method when you no longer need it: yes, we are coding on a managed code environment but if COM object is expensive, it’s recommended.
Don’t use two dots on a single line: .net wrappers seems to be not releasing objects for us, more details in links below.
http://stackoverflow.com/questions/158706/how-to-properly-clean-up-excel-interop-objects-in-c-sharp
http://www.velocityreviews.com/forums/showpost.php?s=f87f0674feda4442dcbd40019cbca65b&p=528575&postcount=2