Forums

Error with image sourcing
Last Post 06 Aug 2016 09:01 PM by Вадим Плетняков. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Вадим ПлетняковUser is Offline
New Member
New Member
Posts:6


--
27 Jul 2016 12:47 AM
    After some tinkering (mostly just renaming stuff) with Example I got error with using Image, defined in dictionary.xaml ( <BitmapImage x:Key="Image" UriSource="Images/MonogameLogo.png" />
    Output:
    Error while copying image asset: Images/MonogameLogo.png
    1> System.IO.FileNotFoundException: Could not find file 'D:\!CLOUDS\Code\LWar\packages\EmptyKeysUI_Generator.2.3.0.0\tools\Images/MonogameLogo.png'.
    1> File name: 'D:\!CLOUDS\Code\LWar\packages\EmptyKeysUI_Generator.2.3.0.0\tools\Images/MonogameLogo.png'

    Post-build event:
    CD "$(SolutionDir)packages\EmptyKeysUI_Generator*\tools"
    ekUIGen.exe -i="$(ProjectDir)\" -o="$(ProjectDir)..\EKGameLibrary\GeneratedUI" -oa="$(ProjectDir)..\Content" -rm=MonoGame -da=EKUserInterface /generate-bindings
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:676


    --
    27 Jul 2016 08:05 AM
    Two options

    a) You should set Build Action to Content and Copy to Output to Copy if newer. Use -bd="$(TargetDir)\" command line option for UI Generator. This will check if image exists and it will copy image to output asset directory (-oa).

    b) Or you can turn this feature off by using -no-copy-images command line option on UI Generator. In this case you will have to add image to your content directory yourself.
    Вадим ПлетняковUser is Offline
    New Member
    New Member
    Posts:6


    --
    06 Aug 2016 09:01 PM
    Thank you, including -bd="$(TargetDir)\" solved the problem
    You are not authorized to post a reply.