Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Gidaio · Sep 22, 2013 at 09:19 PM · windows phonedeployment

System.UnauthorizedAccessException when deploying to Windows Phone 8

I am almost head-desking over this problem. Here's the deal: I'm trying to build stuff for my Windows Phone 8. I downloaded the SDK, make a small Unity project with just a GUIText and deployed it. Magically, it worked! So awesome! So I decided to add a sphere that moves. Built, deployed, boom! Worked again! I then tried to add back-button support with code like so (in C#, btw):

 bool backPressed = false;

 void Update()
 {
     if(Input.GetKeyDown(KeyCode.Escape))
     {
         if(backPressed)
         {
             Application.Quit();
         }
         else
         {
             guiText.text = "You pressed the back button! Press again to exit game."; 
             backPressed = true;
         }
     }
 }

I went to deploy, and I got this error:

 { a bunch of stuff with serial numbers and whatnot that I'm not going to put on the internet }
 [13:54:14.233] Deleting app icon.
 [13:54:14.264] System.UnauthorizedAccessException: Access is denied.

    at Microsoft.VisualStudio.DeviceConnectivity.Interop.ConManServerClass.InstallApplication(String in_pProductId, String in_pInstanceId, String in_bstrApplicationGenre, String in_bstrAppIconPath, String in_bstrXapPath)
    at Microsoft.SmartDevice.Connectivity.Device.InstallApplication(Guid productId, Guid instanceId, String applicationGenre, String iconPath, String xapPackage)
    at Microsoft.SmartDevice.Connectivity.Wrapper.DeviceObject.InstallApplication(Guid productId, Guid instanceId, String applicationGenre, String iconPath, String xapPackage)
    at Unity.Program.Run(Guid appId, String iconPath, String xapPath, Boolean test)
    at Unity.Program.Run(String xapPath, Boolean test)
    at Unity.Program.Main(String[] args)
 [13:54:14.264] Exiting Windows Phone 8 Runner.

What the dang?! I tried a bunch of stuff to fix it, starting with just trying again - that didn't work. I commented out the code I just added - nope. I deleted the generated VS2012 solution and rebuilt it - that didn't work either. I unregistered and then reregistered my phone, but to no avail. I disconnected and reconnected my phone. I closed and reopened Unity. I even went so far as to unregister my phone, unplug it, shut down my computer, turn it back on (not using the 'Restart' action - literally 'Shut Down'ing) reconnect and reregister my phone, and restart Unity. Nothin'. Same dang error.

What's going on? How can I fix this strange problem?

Update:

Just built the app detailed here. It deploys fine, but the Unity app still does not.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Gidaio · Sep 23, 2013 at 12:59 AM

I think I figured it out, and if I'm right, it's entirely my fault.

I deployed this before I had actually made a way to exit the game via the back button. I think (think) what happened is that I hackishly closed it without actually ending the process. When Unity went to overwrite it with the new version, the process was still running, and you can't overwrite a running file. Turning my phone off and then on again solved this issue, which is what leads me to believe this.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

15 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

UWP Deployment Error :: DEP0001 : Unexpected Error: -2146958844 2 Answers

Android not working 1 Answer

Deployment to android 1 Answer

Combining 3 Games into a single APK 1 Answer

Is there a way to optimize Input.GetAxis on windows phone? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges