Copying file failed (2) error Please help me

Hi all,
I am trying to buid and run the 2D unity project sample for Windows Store and I am the following error
Copying file failed (2)
Copying
C:/Users/Andrew/reign-unity-plugin/Assets/MetroTestCertificate.pfx
to Temp.StagingArea/MetroTestCertificat.pfx

– CONSOLE
Error building Player: IOException: Failed to Copy File / Directory from ‘C:/Users/Alejandro/Reign/reign-unity-plugin/Assets/MetroTestCertificate.pfx’ to ‘Temp/StagingArea/MetroTestCertificate.pfx’.

I tried to fix it according one post here
http://forum.unity3d.com/threads/210...with-Unity-4-3

Then I created the pfx named MetroTestCertificate in PlayerSettings window and under “Plublishing Settings/Certificate”. certificate but now I got the these new two error:

FALSE != acquireNewContextResult
UnityEditor.HostView:OnGUI()

INVALID_HANDLE_VALUE != file
UnityEditor.HostView:OnGUI()

Could anybody help me with this problem?
Thanks in advance
Alejandro

Are you using 4.3.1?

Hi Tomas1856,
First, thanks for your answer
On the other hand I am using the Unity 4.3.0, so I will try with the new version(4.3.1) and I will tell you if the problem was fixed.
Best Regards
Alejandro

Hi Tomas1856,
I installed the new version (4.3.1f1) and unfortunate I got the same problem:

Copying file failed (2)
Copying
C:/Users/Alejandro/reign-unity-plugin/Assets/MetroTestCertificate.pfx
to Temp.StagingArea/MetroTestCertificat.pfx

– CONSOLE
Error building Player: IOException: Failed to Copy File / Directory from ‘C:/Users/Alejandro/Reign/reign-unity-plugin/Assets/MetroTestCertificate.pfx’ to ‘Temp/StagingArea/MetroTestCertificate.pfx’.

INVALID_HANDLE_VALUE != file
UnityEditor.HostView:OnGUI()

FALSE != acquireNewContextResult
UnityEditor.HostView:OnGUI()

and now I got 2 news errors:

INVALID_HANDLE_VALUE != file
UnityEditor.Metro:SetCertificate(String, String)
PostProcessMetroPlayer:PostProcess(BuildTarget, BuildOptions, String, String, String, String) (at C:/BuildAgent/work/d3d49558e4d408f4/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:506)
UnityEditor.HostView:OnGUI()

FALSE != acquireNewContextResult
UnityEditor.EditorUtility:MetroCreateTestCertificate(String, String, String, Boolean)
PostProcessMetroPlayer:PostProcess(BuildTarget, BuildOptions, String, String, String, String) (at C:/BuildAgent/work/d3d49558e4d408f4/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessMetroPlayer.cs:496)
UnityEditor.HostView:OnGUI()

Please, let me know if you know how fix the problem
Thanks for your help !
Alejandro

Does this happen with empty project as well?

I am going to try it with the empty project and I will tell you…

Hi Tomas1856
I tried with a empty project and I have the same problem.
I also changed the differents Types and SDK and nothing happens( the problem is the same)
Hope this help you !
Thanks for your help
Alejandro

Okay, that’s interesting… Could you attach Editor.log?

Hi Tomas1856,
Sorry for my ignorance but I cannot find the option to attach here the editor and the editor pre files, for it, Could you say me How add them to this post? or Where I could send them?
Thanks
Alejandro
PS: Sorry for my little english

Hit Reply Thread->Go Advanced, then find Attachements button above.

Hi
I send you in add one rar file with the Editor and Editor prev log files
Thanks for your help !
Best Regards
Alejandro

1449663–78295–$EditorUnity.rar (6.43 KB)

Hmph,weird, could u try to create project in the directory, for ex., C:\Temp and see if it works there ?

Hi
Sorry but it is not work yet
I built an empty Unity project in

C:\Temp

and

C:\Temp/StagingArea

and I got the same error…
Thanks
Alejandro

Could you zip your project, and attach it.

Hi
Do you want the empty project or 2D project into the zip?
Thanks
Alejandro

Hi
I send in add the zip file with the empty project.
Please if you need the 2D project into the zip, let me know it
Thanks
Alejandro

1449790–78305–$New Unity Project 12.rar (65.2 KB)

Go to PlayerSettings → Certificate->Create, and then build

Hi Tomas1856
Sorry but I am a little confused myself because in the project I sent you, I had a Certificate named MetroTestCertificate created for me before through PlayerSettings/Publishing Setting/Certificate/Expiration Date and then I built again the project and selected the a folder to save the build and I got

Copying file failed (2)
Copying Assets/MetroTestCertificate.pfx
to Temp.StagingArea/MetroTestCertificat.pfx

and the Console the following
Error building Player: IOException: Failed to Copy File / Directory from ‘Assets/MetroTestCertificate.pfx’ to ‘Temp/StagingArea/MetroTestCertificate.pfx’

Then, I created a new empty project and I created a new Certificate with other name and password and Unity create it with the MetroTestCertificate.pfx automatically and I got

FALSE != acquireNewContextResult
UnityEditor.HostView:OnGUI()

INVALID_HANDLE_VALUE != file
UnityEditor.HostView:OnGUI()

Sorry for my ignorance but What name and password should I add there to avoid these error above?.
Thanks for your help and understand
Alejandro

PS: I was thinking maybe and if it would be possible, Could you share with me some Unity project yours to built in PC machne?

The project you’ve sent me didn’t had MetroTestCertificate.pfx in it, that’s why it was failing it should have been located in Assets folder.

Hi Tomas
Sorry but I did not understand what it is happens.

I created the MetroTestCertificate.pfx from PlayerSettings/Publishing Setting/Certificate/Expiration Date in the Unity project

I did the following:

I clicked Create button
Fill in the Publisher option with Multimedia
Fill in the Password option with 1234
Fill in the confirm password with 1234
Finally I clicked button CREATE
and I got in the Console

FALSE != acquireNewContextResult
UnityEditor.HostView:OnGUI()

INVALID_HANDLE_VALUE != file
UnityEditor.HostView:OnGUI()

Then, I saw the Asset folder in the Project folder and I did not find any MetroTestCertificate.pfx file

Maybe if I fix these error in the console

FALSE != acquireNewContextResult
UnityEditor.HostView:OnGUI()

INVALID_HANDLE_VALUE != file
UnityEditor.HostView:OnGUI()

for it, How I could fix these errors? Please let me know it

Thanks and sorry for my little english
Alejandro