AgUnit fail to run tests

Jan 31, 2013 at 6:49 AM
Hello,

I am using AgUnit for several weeks, but I have some problems to run my tests since few days.
Actually we upgraded our solution from .Net 4 to .Net 4.5, and we are using SL 5 from the beginning.

Regarding the Options, Plugins Tab, I see the following error:
DiscoverPluginsInDirectory The plugin “AgUnit” file C:\Program Files\JetBrains\ReSharper\v7.1\Bin\Plugins\AgUnit\AgUnit.Runner.Resharper71.pdb could not be loaded as valid a .NET assembly.

Regarding the log, I found the following errors:
_17:46:12.963: Thread:1: Can't resolve reference Microsoft.Workflow.Compiler, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 from C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Workflow.ComponentModel.dll
17:46:12.966: Thread:1: SessionStateChanged
17:46:12.981: Thread:1: SessionStateChanged
17:46:13.183: Thread:1: EXCEPTION: Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))
Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))

--- EXCEPTION #1/2 [COMException]
Message = “Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))”
ExceptionPath = Root.InnerException
ClassName = System.Runtime.InteropServices.COMException
HResult = DISP_E_MEMBERNOTFOUND=80020003
Source = mscorlib
StackTraceString = “
 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
 at JetBrains.UI.Interop.HResultsEx.AssertSucceeded(Int32 hresult)
 at JetBrains.VsIntegration.Interop.Shim.Shell.IVsWindowFrame.GetProperty[TValue](VSFPROPID propid)
 at JetBrains.VsIntegration.Whidbey.DocumentModel.VsDocumentManagerWhidbey.<>c__DisplayClass34.<>c__DisplayClass38.<OnTextManagerRegisterView>b__32()
 at JetBrains.Util.Logger.CatchSilent(Action action)


--- Outer ---

--- EXCEPTION #2/2 [LoggerException]
Message = “Member not found. (Exception from HRESULT: 0x80020003 (DISP_E_MEMBERNOTFOUND))”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.VsIntegration.Whidbey.DocumentModel.VsDocumentManagerWhidbey.<>c__DisplayClass34.<OnTextManagerRegisterView>b__2f()
 at JetBrains.Application.IShellLocksEx.ExecuteWithReadLock(IShellLocks thіs, Action F)
 at JetBrains.VsIntegration.Whidbey.DocumentModel.VsDocumentManagerWhidbey.<>c__DisplayClass34.<OnTextManagerRegisterView>b__2e()
 at JetBrains.Util.Concurrency.UnguardedCallbackMerger.<>c__DisplayClass3.<ExecuteOrQueueOrMerge>b__0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.TryExecute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuardEx.ExecuteOrQueue(ReentrancyGuard thіs, Lifetime lifetime, String name, Action F)
 at JetBrains.Util.Concurrency.UnguardedCallbackMerger.ExecuteOrQueueOrMerge(Lifetime lifetimeQueue, String name, Action F)
 at JetBrains.VsIntegration.Whidbey.DocumentModel.VsDocumentManagerWhidbey.OnTextManagerRegisterView(IVsTextView view)
 at JetBrains.DataFlow.Signal`1.NotifySinks(TValue payload)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value, Object cookie)
 at JetBrains.DataFlow.Signal`1.Fire(TValue value)
 at JetBrains.VsIntegration.Interop.Events.VsTextManagerEvents.Sink.Microsoft.VisualStudio.TextManager.Interop.IVsTextManagerEvents.OnRegisterView(IVsTextView pView)
 at Microsoft.VisualStudio.TextManager.Interop.IVsTextManager.RegisterView(IVsTextView pView, IVsTextBuffer pBuffer)
 at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Init_InitializeWpfTextView()
 at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.Init_OnActivation()
 at Microsoft.VisualStudio.Editor.Implementation.VsTextViewAdapter.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
 at Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
 at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
 at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.QueryStatus(Guid& pguidCmdGroup, UInt32 cCmds, OLECMD[] prgCmds, IntPtr pCmdText)_
I insist on the fact that AgUnit used to work properly (the plugin was correctly loaded, and the tests ran). I've tried to re-install it (corerctly unblock the assemblies, etc...).

Please Help :(
Jan 31, 2013 at 9:15 AM
After some investigations, I've seen that the path in the exception message is false:
17:46:12.963: Thread:1: Can't resolve reference Microsoft.Workflow.Compiler, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 from C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Workflow.ComponentModel.dll

A '\' is missing between "Framework" and ".NETFramework".
But I don't understand how I can change that :(
Coordinator
Jan 31, 2013 at 2:44 PM
Both of those exceptions look unrelated to AgUnit.
R# logs a lot of exceptions ...

The error "AgUnit.Runner.Resharper71.pdb could not be loaded as valid a .NET assembly" is expected, you can ignore that.

Can you describe the behavior you see when trying to run a Silverlight test ?
Do you get any error dialog ?

Have you tried debugging ? Anything in the debug output window ?

Are you using VS 2010 or VS 2012 ?
Coordinator
Jan 31, 2013 at 2:46 PM
If you get stuck, you can also try running your tests with StatLight directly.
AgUnit uses StatLight under the covers and you might get more information running it directly.
Jan 31, 2013 at 3:42 PM
Thanks for the answers.
Finally I realized that the error with the file is not relevant.

Concerning the real error, when I try to run a test, the status of the tests changes to Pending and the Output remains empty. Then I have to restart Visual Studio.
I have tried debugging but I have exactly the same issue.

I am using VS 2012.

Can you tell me how to run StatLight directly? (Or have you any other idea?)