3

I have fixed the bug by uninstalling whole Visual Studio (2012 & 2013) and Windows Phone 8 SDK. Then install back Visual Studio 2012 and Windows Phone 8 SDK again.

I think that the bug happened when more than 1 Visual Studio installed on the same computer.


Old thread:

i can't deploy an app into my phone

it said "optimization failed with error 1104" when i deploying, and this show at the output

1>------ Deploy started: Project: PhoneApp1, Configuration: Debug Any CPU ------
1>Deployment of application to device failed.
1>Error: Cancelled
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

i create a new wp8 app and deploy it, it show the same error too


EDIT NEW: i have fixed the "A specified communication resource (port) is already in use by another application" bug by running XdeCleanup.exe and restart computer, now it left error 1104

NEW OUTPUT:

NuGet package restore started.
Restoring NuGet packages for solution C:\Users\--\documents\visual studio 2012\Projects\---\---.sln.
NuGet Package restored finished for solution C:\Users\--\documents\visual studio 2012\Projects\---\---.sln.
Restoring NuGet packages for project ---.
Restoring NuGet packages listed in file C:\Users\--\documents\visual studio 2012\Projects\---\---\packages.config.
Skipping NuGet package WPtoolkit 4.2013.08.16 since it is already installed.
NuGet Package restored finished for project ---.
All packages are already installed and there is nothing to restore.
NuGet package restore finished.
1>------ Deploy started: Project: ---, Configuration: Debug Any CPU ------
1>Deployment of application to device failed.
1>Error: Cancelled
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

--------

this error happen after i fix "LocalizedString" bug (by delete all folders inside %localappdata%\Microsoft\Phone Tools\CoreCon)

it show "LocalizedString" at before deploying this happened during i screenshot, it doesn't appear after i clean the build

visual studio deploy has only "start" option, there is error before and after I deploying, please view the image Fixed by uninstall and install wp8 sdk

computer spec: windows 7, intel atom CPU N2600 1.6GHz

PS: i only debug app to my phone, not via emulator

after deploy

wuiyang
  • 300
  • 1
  • 4
  • 14
  • What's ur OS and VS versions? You are probably missing the latest VS update. – MVarman Apr 23 '14 at 16:41
  • This problem mainly arises due to issue with window phone sdk. – Muhammad Umar Apr 23 '14 at 16:44
  • forgot to mention, i have repair it using visual studio 2012 update 4, im using windows 7, i use cmd to download and install all file (some doesn't work) using [wp8 sdk].exe /layout , this happen after i have installed 2013 version update 2 RC, both visual studio were went nuts, and i have uninstalled visual 2013 and visual studio bug was fixed, after that, i was testing around, and this bug happened – wuiyang Apr 24 '14 at 07:19
  • Maybe I am missing out something here, but how are you able to create and deploy Windows Phone 8 apps on Windows 7 as WP8 sdk and VS 2012 have a minimum requirement of Windows 8 ?? – Hitesh Apr 29 '14 at 13:45
  • VS 2012 able to install in windows 7, SDK aren't, i use command line to download all file [wp8 sdk installer].exe /layout – wuiyang Apr 29 '14 at 14:19
  • Please enable verbose build logging(in visual studio Tools->Options->Projects and Solutions->Build and Run->MSBuild project build output verbosity, set it to `Detailed` or `Diagnostic`) and provide us the log. – alex.b May 01 '14 at 17:24

4 Answers4

1

Try the following things:

1- Turn off Skype while using Visual Studio and the windows phone emulator. Then restart Visual Studio and try again

2- End/kill any other instance of visual studio running the background using the Task Manager and try again

3- Download emulator images again using this link

4- In the end try this one : The name "LocalizedStrings" does not exist in the namespace

Community
  • 1
  • 1
nfsleo07
  • 66
  • 7
  • i dont have skype on, i killed other instances but still happen, 3 doesn't work for me, sometime the "localizedstrings" happens, but sometime doesn't – wuiyang Apr 24 '14 at 15:08
1

follow these steps hope this may help.

1) Uninstall your app from emulator/device. 2)clean your solution 3) rebuild our solution 4) right click on your solution and click on deploy solution, which explicitly deploys your solution on the device or emulator. 5) now press F5 or run your application.

i had the same problem, following the above steps solved my issue.

AMS
  • 538
  • 6
  • 21
  • i uninstall my app everytime i test my app, failed to deploy at step 4 – wuiyang Apr 26 '14 at 09:29
  • i see you have upgraded your VS, did you restart your machine? if not please restart your machine. that may help you. – AMS Apr 26 '14 at 09:35
  • yes i have restarted my computer, it happened after i created page 4, before that i still can deploy and it has installed update 4 before i create page 4, i cant deploy a new fresh app created – wuiyang Apr 26 '14 at 10:36
0

The communication port problem should have been resolved via restarting the phone and/or your computer. The best way to resolve the issue is a repair of the Windows Phone SDK.

Rohit Minni
  • 240
  • 3
  • 8
0

To avoid all these kinds of issues verify in Windows Phone App Manifest in VS the GUID parameters IS NOT present or static, instead use the RANDOM keyword.

source: & find "PublisherID" http://msdn.microsoft.com/en-us/library/windows/apps/jj207030(v=vs.105).aspx

drs
  • 4,828
  • 3
  • 33
  • 59
Alberto
  • 1
  • 1