none
Problem with new build configuration for WPF and C++/CLI (HELP) RRS feed

  • Question

  • I develop wpf application under AnyCPU with this settings:

    Config. : Debug | Platform: AnyCPU

    PlatformTarget: 64x

    Allow Unsafe Code: True

    Everything run ok. Then I created build options with Build > Configuration Manager > and create new Platform x86 and x64 for WPF project.

    Solution build ok, but when run debuger I got this error:

    System.IO.FileNotFoundException: 'Could not load file or assembly 'MyInterop.dll' or one of its dependencies. 

    Settings for WPF for x64 platform is

    Config. : Debug | Platform: x64

    PlatformTarget: 64x

    Allow Unsafe Code: True

    ----

    EDIT:

    When I set x86 debug for WPF it run with debuger, but problem is, my C++ code doesn't save files. In AnyCPU with WPF everything working without any bug.

    ----

    EDIT 2:

    I think I found something. When I change output even for AnyCPU for example instead bin\Debug in to bin\DebugSomething I got same error as with x64 configuration.

    If it is case, how to resolve it? I have no clue what to do, because my MyInterop.dll is copied in to bin\DebugSomething with every debug files.



    Friday, August 30, 2019 9:47 AM

Answers

  • I found solution, I forgot include external dll after build, and MyInterop.dll cant find it therefore I got this error. Saving file is for another topic.
    • Marked as answer by Striebrovlas Friday, August 30, 2019 2:52 PM
    • Edited by Striebrovlas Friday, August 30, 2019 2:52 PM
    Friday, August 30, 2019 2:52 PM