C# Static Variable forgets value
<p>It sounds a little weird, but I've got some code (which actually is a plugin for MS Blend) that runs perfect in unit testing, but is not working within Blend.</p>

<p>The code is the following.</p>

<pre><code>    private static volatile QWGUIRepository s_instance;

    public static void Initialize(IUnityContainer container, string themeuri)
    {
        lock (s_lock)
        {
            s_instance = new QWGUIRepository();
            QWRepository.Initialize(container);
        }
    }
</code></pre>

<p>In the debugger (after attaching it to Blend), I can see that s_instance gets initialized with a value (is not null afterwards), however as soon as I get out of the method "s_instance" will forget it's value and will be null. </p>

<p>Any ideas?</p>

<p>Thanks,
Andreas</p>
