Search code examples
c#xmlvisual-studiowindows-10windows-10-mobile

How to install apps directly to Windows 10 Lumia device


I have Nokia Lumia 720 running Windows 10 Mobile Insider Preview 10.0.10512.100

I amn new to Windows phone development. I want to push the app directly to my Lumia device.

Steps I followed:

1) Followed instructions on stackoverflow question

2) I enabled developers mode on my Windows 10 pc.

3) Followed step and enabled the following Window's policies:

->Allow all trusted apps to install
->Allows development of Windows Store apps and installing them from an integrated development environment (IDE) 

Then I created a Windows blank Visual C# app. Now I am editing the Package.appxmanifest file to edit the following lines:

<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.1.0" MaxVersionTested="10.0.1.0" />
</Dependencies>

But when right click on the Package.appxmanifest file and click of view code. There are no dependency lines in the code.

<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">

  <Identity Name="a75442ea-6a4d-42f1-abf8-77ecbdc087f6"
            Publisher="CN=Abhimanyu Aryan"
            Version="1.0.0.0" />

  <mp:PhoneIdentity PhoneProductId="a75442ea-6a4d-42f1-abf8-77ecbdc087f6" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

  <Properties>
    <DisplayName>Test</DisplayName>
    <PublisherDisplayName>Abhimanyu Aryan</PublisherDisplayName>
    <Logo>Assets\StoreLogo.png</Logo>
  </Properties>

  <Prerequisites>
    <OSMinVersion>6.3.1</OSMinVersion>
    <OSMaxVersionTested>6.3.1</OSMaxVersionTested>
  </Prerequisites>

  <Resources>
    <Resource Language="x-generate"/>
  </Resources>

  <Applications>
    <Application Id="App"
        Executable="$targetnametoken$.exe"
        EntryPoint="Test.App">
        <m3:VisualElements
            DisplayName="Test"
            Square150x150Logo="Assets\Logo.png"
            Square44x44Logo="Assets\SmallLogo.png"
            Description="Test"
            ForegroundText="light"
            BackgroundColor="transparent">
            <m3:DefaultTile Wide310x150Logo="Assets\WideLogo.png" Square71x71Logo="Assets\Square71x71Logo.png"/>
            <m3:SplashScreen Image="Assets\SplashScreen.png"/>
        </m3:VisualElements>
    </Application>
  </Applications>
  <Capabilities>
    <Capability Name="internetClientServer" />
  </Capabilities>
</Package>

Solution

  • To run your app on your phone , you've to enable Developer Mode on your PHONE .

    To Check if your developing UWP application :

    1. Right click on your soliton and click Unload Project
    2. After that right click on it and click Edit YourApp.csproj
    3. Then check if <TargetPlatformIdentifier>UAP</TargetPlatformIdentifier> exist or no? If it is,then you are in right place!