First Unity 1.2 drop up - now in Codeplex source control

Aug 19, 2008 at 1:11 AM
Hey folks. I'll be writing the formal release notes tomorrow, but I wanted to give people a heads up now that I just did our first drop. We'll be doing drops from the entlib 4.1 / Unity 1.2 development every other week until we ship.

We've got the automation going, so we'll be doing source drops for now right into codeplex source control. So if you want to take a look, just click on the Source Code tab at the top of your screen and take a look.

The most important changes here are:

  • Fix for a CLR bug that we hit that caused issues when running in release mode without a debugger attached,
  • Refactorings to support an easier Silverlight port, and
  • Got generic decorator chains working.
I'll add an actual release to this as well, but in the meantime, take a look at the code and let us know what you think.

-Chris
Aug 20, 2008 at 2:49 AM
Edited Aug 20, 2008 at 2:50 AM
I plugged Unity into my CompositeWPF solution and all Unit Test (456) passed with the exception of one:

Test method Microsoft.Practices.Unity.Tests.MediumTrustFixture.GeneratesVerifiableIL threw exception:  System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. --->  System.Security.VerificationException: Operation could destabilize the runtime..

I plugged in the catch{} statement below and now all 456 test pass (I'm on Vista Ultimate w/VS2008)

    public class MediumTrustFixture
    {
        [TestMethod]
        public void GeneratesVerifiableIL()
        {
            AppDomain spawnedDomain = CreateRestrictedDomain("spawned");
            try
            {
                UnityProxy proxy = (UnityProxy)
                    spawnedDomain.CreateInstanceAndUnwrap(typeof(UnityProxy).Assembly.FullName, typeof(UnityProxy).FullName);
                Assert.IsTrue(proxy.CreateSomething());
            }
            catch { }
            finally
            {
                AppDomain.Unload(spawnedDomain);
            }
        }

Aug 20, 2008 at 5:51 AM
Bill,

Thanks for the report. Did you compile the drop with VS 2008? Are you using .NET 3.5 SP1?

That test passes in our environment, so anything you can give me to help track down the differences and reproduce the issue would really help.

Thanks,

-Chris
Aug 20, 2008 at 1:47 PM
Edited Aug 20, 2008 at 1:51 PM

[Edited] Note the referenced failures were during unit test run - the solution would compile after setting Specific Version to false.

[Chris] Did you compile the drop with VS 2008?

Yes, and there were a lot of failures - it wasn't good enough to turn the "Specific Version" of the Microsoft.VisualStudio.QualityTools.UnitTestFramework reference to false, I had to remove it and then add a reference to the 9.0.0.0 version.  As I did this for each test project the test would start passing again.

[Chris] Are you using .NET 3.5 SP1?

Yes,  I had installed it for Microsoft SQL Server 2008, I don't know if this is a consideration but I was unable to install SQL Server 2008 because it told me I was missing a Windows update; I checked my update log and it appears that this update had been trying to install for some time but continually fails. 

Your welcome
Bill

Aug 20, 2008 at 6:20 PM
Bill,

Thanks. The unit test tool reference is a known issue with the VS 2005 -> VS 2008 conversion wizard.

Unity doesn't care about Sql Server, so that doesn't affect this result.

I'll see what I can do to repro the problem here.

-Chris