locked
Adding resources to application project.

    Question

  • Hi,

    I have a problem with resources for my game like bitmaps or obj and mtl files, that I used to rendering graphic in my game. In Windows project I add this files to this folder, where the .exe files is generated and it works, but in Windows Phone project this isn't working and I get error with "cannot find file". How should put this resources correctly to my project? Thanks for help.

    Friday, February 27, 2015 12:37 PM

Answers

  • You need to add the files to the project as content so that they are included in the apps for deployment. Just copying to the appx folder may work on the build machine, but not for deployment to others.
    Friday, February 27, 2015 2:55 PM
    Moderator
  • I fix that error, there is solution: https://books.google.pl/books?id=xYv1AAAAQBAJ&pg=PT202&lpg=PT202&dq=adding+obj+file+to+windows+phone+project&source=bl&ots=T1j_vNSBe9&sig=lTz3sf6Mkn1L8bvq3dqLlW0UCoo&hl=pl&sa=X&ei=qJbwVKO2LIj7UMCZgIAD&ved=0CD4Q6AEwBA#v=onepage&q=adding%20obj%20file%20to%20windows%20phone%20project&f=false

    But still I gets error of loading a file. I add this files to the assets folder and I add a "Assets\\" to the file name, but still this isn't working. What is wrong with it?

    edit:

    Ok, it's works. Thanks for help :)

    Friday, February 27, 2015 5:04 PM

All replies

  • You need to add the files to the project as content so that they are included in the apps for deployment. Just copying to the appx folder may work on the build machine, but not for deployment to others.
    Friday, February 27, 2015 2:55 PM
    Moderator
  • Ok, so I've done this and I get an error in .obj file
    Error    1    error LNK1107: invalid or corrupt file: cannot read at 0x242C    [..]\Assets\checkerBlue.obj    1    1  
      mygame.WindowsPhone

    What does it mean? I don't want to compile this, I only want to add this to project. I add, that this is the first .obj file in the list of added resources. Can you help me with this?

    • Edited by MiXenXd Friday, February 27, 2015 3:23 PM
    Friday, February 27, 2015 3:23 PM
  • I fix that error, there is solution: https://books.google.pl/books?id=xYv1AAAAQBAJ&pg=PT202&lpg=PT202&dq=adding+obj+file+to+windows+phone+project&source=bl&ots=T1j_vNSBe9&sig=lTz3sf6Mkn1L8bvq3dqLlW0UCoo&hl=pl&sa=X&ei=qJbwVKO2LIj7UMCZgIAD&ved=0CD4Q6AEwBA#v=onepage&q=adding%20obj%20file%20to%20windows%20phone%20project&f=false

    But still I gets error of loading a file. I add this files to the assets folder and I add a "Assets\\" to the file name, but still this isn't working. What is wrong with it?

    edit:

    Ok, it's works. Thanks for help :)

    Friday, February 27, 2015 5:04 PM