Helpless error in Windows Phone Unit Test output - c#

Under Visual Studio express 2012 update 4 I have created windows phone app, for which i added Windows Phone unit test App. When I try to run the tests, Tests output windows shows following error:
------ Run test started ------
Failed to import IDeployService. Cannot proceed with xap deployment. This failure can be observed if the component model cache (typically located in %LocalAppData%\Microsoft\VisualStudio\[version]\ComponentModelCache) is not up-to-date. To come out of this error, close all instances of visual studio, delete the component model cache folder and try again.
Unit tests in source D:\projekty\PhoneApp3\TestApp1\Bin\x86\Debug\TestApp1.dll cannot be run. Please create a Windows Store or Windows Phone Unit Test project.
========== Run test finished: 0 run (0:00:00,0009998) ==========
Deleting of %LocalAppData%\Microsoft\VisualStudio\[version]\ComponentModelCache does not help
EDIT:
If I open the same solution in VS 2013 Express for Windows I can successfully run those tests

Is it a side-by-side installation of VS21012+Update4 and VS2013 Express?
Maybe you could try repairing your VS2012 installation from "Programs & Features" in control panel and see if that resolves this issue?

Related

Runnings tests in visual studio after publish profile finishes successfully

I have an ASP.NET Core project in Visual Studio 2015 that contains a number of publish profiles to deploy my website to various IIS web servers on an intranet. I also have a project containing a set of Selenium tests. Both of these projects are part of the same solution. I want these tests to run on a specified web server if a publish profile finishes successfully. The closest I have got to this is enabling 'Run Tests After Build' in Visual Studio which runs the tests when the project is built manually but doesn't seem to be linked to the pubish profiles finishing.
I don't have access to Team Foundation Server which I beleive is one way to acheive what I want so I was wondering if there were any other solutions, possibly through explicitely running the tests through PowerShell.

"WireUpCoreRuntime" tasks fails unexpectedly with a System.BadImageFormatException

I am having trouble with a MSBuild 14.0 issue. I am creating a UWP/x64 Application (we have written the source to be able to run on Windows 8.x, Windows 10 and now Windows 10 Mobile. My current environment is VS 2015 update 1 running on Windows 8.1. My code exists on a TFS 2013 local server. I have a build controller and build agent installed from TFS 2015 running on a separate server (server 2012 R2) assigned to my XAML Build Definition. I can build locally on my server within a Visual Studio 2015 session. When I Queue a Build. I get the following error:
C:\Program Files
(x86)\MSBuild\Microsoft.NetNative\Microsoft.Net.CoreRuntime.targets
(235): The "WireUpCoreRuntime" task failed unexpectedly.
System.BadImageFormatException: An attempt was made to load a program
with an incorrect format. (Exception from HRESULT: 0x8007000B) at
Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.CopyWin32Resources(String
lpPEFileToReadResourcesFrom, String lpPEFileToInsertResourcesInto)
at
Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.InternalExecute()
at Microsoft.Build.Net.CoreRuntimeTask.WireUpCoreRuntime.Execute()
at
Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at
Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
Initially I thought this was an environment issue with the build system not on a Windows 10 platform, however, if this was the case I would not be able to build locally in Visual Studio.
I have Disabled AV on my server for a build with no luck.
the build Configuration is x64/Release. I have also tried x64/Debug, ARM/Debug and ARM/Release. none of these build configurations work. I think it might have something to do with .NetNative but I cannot be certain.
This error usually occurs when the file image of a DLL or executable program is invalid, check following things first:
Make sure that you are not using a component that was created with a
different version of the .NET Framework.
Make sure that the file
image is a valid managed assembly or module.
Detailed information: Troubleshooting Exceptions: System.BadImageFormatException

store test kit do not appear in my Project menu

I am testing Windows Phone App 8.1 with Visual Studio 2013. I found out that the option Store Test Kit does not appear in the menĂº.
I have download a code example from https://channel9.msdn.com/Series/Windows-Phone-8-Development-for-Absolute-Beginners/Part-23-Testing-and-Submitting-to-the-Store and it appear in that example.
What i am missing? I need to register my App?
Thanks.
The video was done with vs2012, which has that nice Store Test interface with drag and drop features. I don't think that is available in vs2013 ultimate (the version that I am using). However, Run Project > Store > Launch Windows Phone App Certification Test.
NB: You may not run the test if you have not yet installed the certification kit, which is available here: https://dev.windows.com/en-us/develop/app-certification-kit
If the test succeeds you can go ahead and publish the app.
If it fails then you will get a nice report telling you exactly why it failed. You will then need to sort them out manually one at a time. Build your application every time after correction and run the test until it succeeds.
That is what I did.

Unable to deploy on Windows 10 Mobile

I was coding normally on visual Studio 2015 Community, I did some deployments on my Lumia Icon device, but suddenly, when I was developing an app with OAuth 2.0 to interact with LinkedIn and tried to deploy this app, visual studio started to crash, and I got that error list
2>------ Deploy started: Project: OAuth2, Configuration: Debug Any CPU ------
2>Deploying X:\...\...\Documents\Visual Studio 2015\Projects\OAuth2\OAuth2\Bin\Debug\OAuth2_Debug_AnyCPU.xap...
2>Connecting to Device...
2>Deployment of application to device failed.
2>External component has thrown an exception.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
And now this is happening with any app that I try to deploy on my phone (I've.. tried with VS2013 and got the same problem).
My device has the "Developer Mode" On and is unlocked to deploy WP apps.
Lumia Icon: Running Windows 10 Mobile Build 10586
Anyone already had that issue?
UPDATE: Error box show this
Error : DEP6100 : The following unexpected error occurred during bootstrapping stage 'Connecting to the device'
If you didn't install VS 2015 Update 1, please do so:
https://www.visualstudio.com/en-us/news/vs2015-update1-vs.aspx
If it is already installed, then maybe Windows 10 SDK is out of date. See
https://dev.windows.com/en-US/downloads/windows-10-sdk
...for standalone SDK installer.
SOLUTION:
The main issue was with my VS2015.
First, I've already seen that the solution submitted by #SrdjanJovcic works fine, that one is the first step if you have a problem with your VS.
The second step (do it if the issue remains even after installing the updates): go to Control Panel of your PC, go to Programs, and then "repair" your Visual Studio.
(My problem was with VS Studio SDK Update for W10M 10586.11, it installed the update with some erros, but after repair, everything works fine)
Hi i also have windows 10 mobile 10586.11 build after doing reset my device is not connected in my PC/Visual Studio 2015.
I think this is may be 10586.11 build issue please upvote this issues in Feedback app.

Can't run unit tests on smart device emulator

I'm running Visual Studio 2008 and have a C# program that runs beautifully on the "Pocket PC 2003 Second Edition" emulator. However, when I try to run any unit tests I get an error on the first test:
The test adapter ('Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter,
Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter, Version=9.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a') required to execute this test could not be loaded.
Check that the test adapter is installed properly.
ActiveSync bootstrap initialization failed.
Please connect/cradle a real device or download the User-level Windows Mobile Device Center Application
from http://go.microsoft.com/fwlink?linkid=67763
Comparing the properties for the unit test and the application:
Conditional compilation symbols are identical
Platform target is identical ("Any CPU")
Framework Version is identical (v3.5)
Platform is identical ("Windows CE")
Output file folder is identical
Both have "Display the latest version of the .NET Compact Framework" checked
Output type for the application is "Windows Application", for the unit test is "Class Library" but it seems like that's what it wants.
The error message seems to indicate the VS2008 can't connect to the emulator, but since the program is running I know that isn't the case. Can I not run unit tests on an emulator?
Or am I missing files? Is there something I need to install, in order to perform unit tests? Nowhere on my system do I have a file named Microsoft.VisualStudio.TestTools.TestTypes*.*.
The problem was in the SmartDeviceTestRun.testrunConfig file, it was set to run on the actual device instead of the emulator. This web site was helpful:
https://msdn.microsoft.com/en-us/library/bb384146%28v=vs.90%29.aspx

Categories

Resources