2

I'm getting the following error when I try to execute WinRT MSTests from the command line:

EXEC : error : Could not start test run for unit tests for Windows Store app: No valid developer license found for running unit tests for Windows Store apps. Please install/renew your developer license..

This used to work, but has suddenly started failing. The odd thing is that they execute fine from within visual studio.

I'm using the following MSBuild task.

<Target Name="UnitTest" DependsOnTargets="Compile" >
       <ItemGroup>
        <TestAppx Include="$(SolutionDir)\**\*x86*\**\*Tests*.appx" />
       </ItemGroup>

    <Message Importance="high" Text="Running tests for %(TestAppx.Identity)" />

    <Exec Command='"$(VSINSTALLDIR)\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" %(TestAppx.Identity) /InIsolation /platform:x86 /Logger:trx /UseVsixExtensions:true'
          WorkingDirectory="$(SolutionDir)"/>
</Target>
Jon Rea
  • 9,337
  • 4
  • 32
  • 35

1 Answers1

2

Still not exactly sure why VisualStudio and vstest were out-of-sync, but I found a solution.

  • Open PowerShell as an administrator
  • Execute: Unregister-WindowsDeveloperLicense
  • Open the solution in visual studio
  • Log in to your live account when prompted to re-create your developer licence

Source: http://msdn.microsoft.com/en-us/library/windows/apps/hh974578.aspx#getting_a_developer_license_at_a_command_prompt

Jon Rea
  • 9,337
  • 4
  • 32
  • 35