Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
785 views
in Technique[技术] by (71.8m points)

visual studio 2015 - Failed to connect to device '192.168.1.17' using Universal Authentication

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:localhostClientTrustedHosts -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:DataUsersadministratorDocuments> 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>binx86Debug</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>binx86Release</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>binARMDebug</OutputPath>
    <DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
    <NoWarn>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:

AppPackagesApp21_1.0.0.0_Debug_TestDependenciesARM

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...