Failed to connect to device '192.168.1.17' using Universal Authentication

0

I try to deploy WPA application to Windows IoT core 10 from Visual Studio 2015.
When I try to deploy, I get error:

Failed to connect to device '192.168.1.17' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings. 0x89740016: Exception from HRESULT: 0x89740016

If I change Auth Mode to none, I get error:

Unable to connect to the Microsoft Visual Studio Remote Debugger named 'minwinpc'. The Visual Studio 2015 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer. Please see Help for assistance on configuring remote debugging.

This is configuration page:

Deployment configuration

If I try to deploy CurrencyExchange_1.0.9.0_ARM_Debug.appx from Windows Device Portal I get error:

Failure reason: Windows cannot install package e0c3666e-088b-4aed-8c79-8f7ddb1541fa_1.0.9.0_arm__ya2k1rc7yvhh6 because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.CoreRuntime.1.0" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or ARM processor architecture and minimum version 1.0.23819.0, along with this package to install. The frameworks with name "Microsoft.NET.CoreRuntime.1.0" currently installed are: {} Failure text: Package failed updates, dependency or conflict validation. (0x80073cf3)

This is screenshot from Device Portal:

Device Portal

If I try to enable debugging in Device Portal, I get error:

Failed to start the Visual Studio Remote Debugger. The Remote Debugger needs to be copied to the device. This can be done by deploying an application to the device using Visual Studio.

If I run command devenv /resetuserdata from VS I get error:

Command "devenv" is not valid.

This is screenshot from VS:

Visual Studio

I removed CurrencyExchange.csproj.user manually and made:

  • Clean
  • Rebuild
  • Deploy
  • Change configuration between Releas and Debug
  • Change platforms between ARM, Any CPU and x64
  • Other dancing with a tambourine

This is configuration of firewall:

Firewall

Nothing helps.
Problems started after I reflashed Windows IoT for Raspberry Pi 3.
Before it was deploying.

I read forums but nothing helps... What can be a problem?

UPDATE

When I create App Package: Store -> Create App Package, some times it succeeds, and I get CurrencyExchange_1.0.X.0_x86_x64_arm_Debug.appxbundle, but some times I get error:

All app package manifests in a bundle must declare the same values under the XPath [local-name()='Package']/[local-name()='Dependencies']. The values under this XPath declared in the manifest for the package with file name "CurrencyExchange_1.0.20.0_ARM_Debug.appx" and package full name "robodem_1.0.20.0_arm__ya2k1rc7yvhh6" at line 11, column 4 don't match those declared in the manifest for the package with file name "CurrencyExchange_1.0.20.0_x86_Debug.appx" and package full name "robodem_1.0.20.0_x86__ya2k1rc7yvhh6" at line 11, column 4

UPDATE

Device is updated, now, after bundleFailure reason: Windows cannot install package e0c3666e-088b-4aed-8c79-8f7ddb1541fa_1.0.9.0_arm__ya2k1rc7yvhh6 because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.CoreRuntime.1.0" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or ARM processor architecture and minimum version 1.0.23819.0, along with this package to install. The frameworks with name "Microsoft.NET.CoreRuntime.1.0" currently installed are: {} Failure text: Package failed updates, dependency or conflict validation. (0x80073cf3)

Remote deploy still failing.
I reassembled bundle after remove/clone reinit project in VS.

UPDATE

My PC IP address is 192.168.1.46, issuing:

Set-Item WSMan:\localhost\Client\TrustedHosts -Value 192.168.1.46

Doesn't help.

UPDATE

If I try to run debugger from remote Power Shell, I get:

[192.168.1.17]: PS C:\Data\Users\administrator\Documents> MSVSMON.EXE
The term 'MSVSMON.EXE' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify that the path is correct and try again.
    + CategoryInfo          : ObjectNotFound: (MSVSMON.EXE:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

UPDATE

I tried this answer, and this didn't helps.

UPDATE

As Rita Han suggested I uploaded two dependencies, and application successfully deployed. I can run it on the device. How ever, I have nothing runs over 8116 port:

PowerShell net stat

Telnet

Processes

UPDATE

If I start the debugger via Start Debugger option, I get error:

Failed to start the Visual Studio Remote Debugger. The Remote Debugger needs to be copied to the device. This can be done by deploying an application to the device using Visual Studio.

And I still have same error when deploying application via VS:

The Visual Studio 2015 Remote Debugger (MSVSMON.EXE) does not appear to be running on the remote computer. This may be because a firewall is preventing communication to the remote computer.

UPDATE

As Rita Han suggested in further conversation, I enabled 8116 in both firewall of the raspberry and firewall of the PC, I get Ok. terminal answer, but I still have no replay when search 8116 port listening process:

  • telnet from PC
  • Power Shell net stat on Raspberry Pi 3
  • Running Processes in Windows Device Portal

UPDATE

As I wrote before: I opened port on Raspberry Pi 3, restarted device, and here is screenshot proofing, that there is nothing listening for 8116:

Nothing listening for 8116

UPDATE

To start process manually also don't helps

Start process manually

UPDATE

As Rita asks, I share .csproj and .csproj.user files.

.csproj:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProjectGuid>{AB466423-7430-49A4-AF63-2F6C031394BC}</ProjectGuid>
    <OutputType>AppContainerExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>CurrencyExchange</RootNamespace>
    <AssemblyName>CurrencyExchange</AssemblyName>
    <DefaultLanguage>en-US</DefaultLanguage>
    <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
    <TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
    <TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
    <MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <PackageCertificateKeyFile>CurrencyExchange_TemporaryKey.pfx</PackageCertificateKeyFile>
    <AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
    <AppxBundle>Always</AppxBundle>
    <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x86\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
    <OutputPath>bin\x86\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x86</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\ARM\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>ARM</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
    <OutputPath>bin\ARM\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>ARM</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>false</UseDotNetNativeToolchain>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\x64\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <DebugType>full</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
    <OutputPath>bin\x64\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>x64</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <Prefer32Bit>true</Prefer32Bit>
    <UseDotNetNativeToolchain>true</UseDotNetNativeToolchain>
  </PropertyGroup>
  <ItemGroup>
    <!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
    <None Include="project.json" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="App.xaml.cs">
      <DependentUpon>App.xaml</DependentUpon>
    </Compile>
    <Compile Include="Calibrator\Box.cs" />
    <Compile Include="Calibrator\TestStorage.cs" />
    <Compile Include="Common\Delegates.cs" />
    <Compile Include="Constants\Consts.cs" />
    <Compile Include="Constants\Messages.cs" />
    <Compile Include="Constants\Exceptions.cs" />
    <Compile Include="Enums\Severity.cs" />
    <Compile Include="Enums\Status.cs" />
    <Compile Include="Controls\wHeader.xaml.cs">
      <DependentUpon>wHeader.xaml</DependentUpon>
    </Compile>
    <Compile Include="Exceptions\InvalidNodeType.cs" />
    <Compile Include="Exceptions\UnhandledControlStatus.cs" />
    <Compile Include="Exceptions\UnhandledMessageSeverity.cs" />
    <Compile Include="Settings\wIncasation.xaml.cs">
      <DependentUpon>wIncasation.xaml</DependentUpon>
    </Compile>
    <Compile Include="Settings\wNominals.xaml.cs">
      <DependentUpon>wNominals.xaml</DependentUpon>
    </Compile>
    <Compile Include="Settings\wUpload.xaml.cs">
      <DependentUpon>wUpload.xaml</DependentUpon>
    </Compile>
    <Compile Include="Controls\wMoneyAdjust.xaml.cs">
      <DependentUpon>wMoneyAdjust.xaml</DependentUpon>
    </Compile>
    <Compile Include="Pages\wManual.xaml.cs">
      <DependentUpon>wManual.xaml</DependentUpon>
    </Compile>
    <Compile Include="Pages\wMainPage.xaml.cs">
      <DependentUpon>wMainPage.xaml</DependentUpon>
    </Compile>
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="Pages\wSettings.xaml.cs">
      <DependentUpon>wSettings.xaml</DependentUpon>
    </Compile>
    <Compile Include="Pages\wStatistics.xaml.cs">
      <DependentUpon>wStatistics.xaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <AppxManifest Include="Package.appxmanifest">
      <SubType>Designer</SubType>
    </AppxManifest>
    <None Include="CurrencyExchange_TemporaryKey.pfx" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="Properties\Default.rd.xml" />
    <Content Include="Assets\LockScreenLogo.scale-200.png" />
    <Content Include="Assets\SplashScreen.scale-200.png" />
    <Content Include="Assets\Square150x150Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
    <Content Include="Assets\StoreLogo.png" />
    <Content Include="Assets\Wide310x150Logo.scale-200.png" />
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Page Include="Controls\wHeader.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Settings\wIncasation.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Settings\wNominals.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Settings\wUpload.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Controls\wMoneyAdjust.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Pages\wManual.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Pages\wMainPage.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Pages\wSettings.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Pages\wStatistics.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\..\..\..\RoboLine\IoT\IoT.csproj">
      <Project>{2f12492d-4625-4edf-8497-d9e49f320bef}</Project>
      <Name>IoT</Name>
    </ProjectReference>
    <ProjectReference Include="..\Lib\CurrencyExchange.Lib\CurrencyExchange.Lib.csproj">
      <Project>{5299129a-cee9-4530-8789-e2dcd7d24430}</Project>
      <Name>CurrencyExchange.Lib</Name>
    </ProjectReference>
    <ProjectReference Include="..\Lib\TouchPanels\TouchPanels.csproj">
      <Project>{8220b292-cf54-43af-8873-5ad16715fc8a}</Project>
      <Name>TouchPanels</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <SDKReference Include="WindowsIoT, Version=10.0.14393.0">
      <Name>Windows IoT Extensions for the UWP</Name>
    </SDKReference>
  </ItemGroup>
  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
    <VisualStudioVersion>14.0</VisualStudioVersion>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    <DebugSymbols>true</DebugSymbols>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants>
    <NoWarn>;2008</NoWarn>
    <NoStdLib>true</NoStdLib>
    <DebugType>full</DebugType>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP;CODE_ANALYSIS</DefineConstants>
    <Optimize>true</Optimize>
    <NoWarn>;2008</NoWarn>
    <NoStdLib>true</NoStdLib>
    <DebugType>pdbonly</DebugType>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <UseVSHostingProcess>false</UseVSHostingProcess>
    <ErrorReport>prompt</ErrorReport>
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
    <Prefer32Bit>true</Prefer32Bit>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

.csproj.user:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <AppxPackageIsForStore>False</AppxPackageIsForStore>
    <AppxShowAllApps>False</AppxShowAllApps>
    <AppxBuildConfigurationSelection>x86|x64|arm</AppxBuildConfigurationSelection>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
    <DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>
    <UseEmulator>false</UseEmulator>
    <RemoteDebugMachine>192.168.1.17</RemoteDebugMachine>
    <AuthenticationMode>None</AuthenticationMode>
    <RemoteDebugEnabled>true</RemoteDebugEnabled>
    <DeploymentType>CopyToDevice</DeploymentType>
    <RemoveNonLayoutFiles>true</RemoveNonLayoutFiles>
    <CreateCleanLayout>true</CreateCleanLayout>
    <EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
    <DebugEngines>
    </DebugEngines>
    <BackgroundTaskDebugEngines>
    </BackgroundTaskDebugEngines>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
    <DeviceId>30F105C9-681E-420b-A277-7C086EAD8A4E</DeviceId>
    <UseEmulator>false</UseEmulator>
    <RemoteDebugEnabled>true</RemoteDebugEnabled>
    <AuthenticationMode>Universal</AuthenticationMode>
    <RemoteDebugMachine>192.168.1.17</RemoteDebugMachine>
  </PropertyGroup>
</Project>

In addition, I have good news. I found kind manual in this forum. I run debugger on Raspberry, and have new error in visual studio.

manual power shell

I see that debugger running:

manual debugger

However I don't see it among ports in netstat:

manual netstat

And this is new error from VS:

1>------ Deploy started: Project: CurrencyExchange, Configuration: Debug ARM ------
1>DEP0110 : Unable to check remote machine '192.168.1.17' for developer mode. Please verify that the remote tools are installed correctly on the remote machine, and that the correct remote authentication mode is specified in the project debug settings.
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

UPDATE

I found msvsmon process in netstat using [192.168.1.17]: PS C:\Data\Users\administrator\Documents> netstat -b -a:

Manual port

And I adjusted the port in Debug config in VS:

Manual port VS

However, I had same error.

visual-studio-2015
deployment
uwp
windows-iot-core-10
asked on Stack Overflow Feb 16, 2019 by Olga Pshenichnikova • edited Feb 18, 2019 by Olga Pshenichnikova

1 Answer

1

If I try to deploy CurrencyExchange_1.0.9.0_ARM_Debug.appx from Windows Device Portal I get error: Failure reason: Windows cannot install package xxx because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.CoreRuntime.1.0"...

Make sure you install the dependencies along with the .appxbundle. These dependencies files, for example(ARM device), in this path:

AppPackages\App21_1.0.0.0_Debug_Test\Dependencies\ARM

enter image description here

You can install these denpendecies(.appx) via device portal->Allow me to select optional packages after Select the application package(.appxbundle)

enter image description here

Detailed steps you can refer to this answer.

Update:

Failed to connect to device '192.168.1.17' using Universal Authentication. Please verify the correct remote authentication mode is specified in the project debug settings.

I can reproduce this issue with Visual Studio 2015 Update 3 when deploying a UWP application to Windows IoT Core (version 17763).

There is a similar issue that solved by install new Windows SDK related to the version of Windows IoT Core running on the device.

This seems to be an error reflecting a mismatch between the Windows SDK installed on the Visual Studio machine and the OS version on the IoT device.

But I can't install newer version than 14393 of Windows SDK for Visual Studio 2015. So it seems VS2015 can't remote debug on new Windows IoT Core version like 17763. You need upgrade to VS2017.

answered on Stack Overflow Feb 18, 2019 by Rita Han • edited Feb 22, 2019 by Rita Han

User contributions licensed under CC BY-SA 3.0