When trying to execute Unit Testing On a SmartDevice project on Visual Studio 2008 Pro, I get an error "VSTestHost.exe has stopped working".
When debuging the Unit Test, I have the following exception FileNotFoundException
and the stack trace is as follows :
Microsoft.VisualStudio.DeviceConnectivity.Interop.ConManServerClass.DownloadPackage(String pwszPackageId)
at Microsoft.SmartDevice.Connectivity.FileDeployer.DownloadPackage(ObjectId packageId)
at Microsoft.VisualStudio.SmartDevice.TestHostAdapter.DeviceAgent.RunConfigDevice.InitializeStreamingWithDevice()
at Microsoft.VisualStudio.SmartDevice.TestHostAdapter.DeviceAgent.DeviceHostAdapter.initializeInternal()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Any suggestions ?
Using this thread, it worked.
I used filemon.exe and saw that for some reason the vstesthost.exe was looking for Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll in the public assemblies folder of VS 2010 (c:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies) instead of VS 2008 (c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies).
Maybe not the most elegant solution, but I just copied the SmartDevice.UnitTestFramework.dll with its xml config file from the VS 2008 public assemblies folder to VS 2010 public assemblies folder and it worked for me.