locked
"MSB3030: Could not copy the file because it was not found" error RRS feed

  • Question

  • I am working on a Windows Store App that requires an assembly named hidapi.dll. All of the research I have done tells me that this just needs to be placed in the same folder as the *.exe file, so I copied in to \bin\x86\Appx\hidapi.dll and set the Build Action to Content and the Copy to Output Directory property to Copy if newer. However, when I attempt to debug the app, I receive the following error:

    C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(3821,5): error MSB3030: Could not copy the file "C:\Users\Nathan\Documents\Visual Studio 2013\Projects\EV3Testing\EV3MiscTesting\bin\x86\Appx\hidapi.dll" because it was not found.

    Even though the file is there. Why can't Visual Studio 2013 find or copy the file? Do I need to somehow modify the configuration? What is the problem? Thanks.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, December 30, 2013 8:28 PM

Answers

  • In your project properties right click and select Add Existing Item... and browse to the assemblies you want to include. Once you've done that, open the item's properties in the solution explorer and make sure it's marked as content to be copied to the output directory.

    --Rob

    Saturday, January 11, 2014 12:37 AM
    Moderator

All replies

  • You need to add it to your source project, not copy it manually into the Appx directory. You shouldn't modify anything in the \bin directories directly.

    --Rob

    Monday, December 30, 2013 8:31 PM
    Moderator
  • How exactly do I add it to my source project? It is an assembly used by another assembly I am using, and I believe it is a com component (although I am not entirely sure, and am not very familiar with using com components, but either way it will not let me add it as an assembly). The place I got the assemblies from and from which I am trying to follow the instructions on where I need to put hidapi.dll are at:

    http://www.monobrick.dk/software/monobrick/

    http://www.monobrick.dk/guides/setting-up-monobrick-under-windows/

    This is my first time ever writing a Windows Store App that requires assemblies that I do not just reference in the project configuration, so this is a new area for me. Thank you.


    Nathan Sokalski njsokalski@hotmail.com http://www.nathansokalski.com/

    Monday, December 30, 2013 9:01 PM
  • In your project properties right click and select Add Existing Item... and browse to the assemblies you want to include. Once you've done that, open the item's properties in the solution explorer and make sure it's marked as content to be copied to the output directory.

    --Rob

    Saturday, January 11, 2014 12:37 AM
    Moderator