dll name gets 'guid-ized' when deployed RRS feed

  • Question

  • Hi - This is an odd one I think. I have two projects - the 1st is a C++ unmanaged dll, the 2nd is a C# app consuming-using that dll. Both build fine. When I deploy the consumer to the CE device, the dll comes along but the name gets messed up - looks like a guid and the consumer fails saying it can't do reach the dll. If I manually copy the DLL over with the right name -- all works as planned.
    1) I've looked through the properties/configurations of both projects. No luck. Have even openned both the sln and vs/vcprojs with notepad to have a look. No love.

    Anybody have any ideas of what I'm missing??
    Environment:  Windows 7 Pro
                        VS 2008

    Thanks in advance - Jay  --- PS -- I posted this earlier this evening on a Win Embedded forum -- got to thinking it might be better suited here.

    Jay Hamlin
    Thursday, October 7, 2010 4:39 AM

All replies

  • to be more specific -- dll name is something like - 'mydriver.dll' -- but when it gets deployed to the WinCE device it has a name like -'51436bf-13e-4091-a3a7-e566227b202.
    If I manually copy over 'mydriver.dll' all is good.




    Jay Hamlin
    Thursday, October 7, 2010 4:46 AM



    In checking with a colleague here are some things to keep in mind.


    Question: When I deploy the [C# app] to the [Windows CE] device, the dll comes along but the name gets messed up - looks like a guid


    Answer: This is a deployment issue. When you manually copy the DLL it works fine, but if you let Visual Studio deploy the DLL the name is incorrect. The C++ DLL is in a different project than the C# app.


    A general form of the question is: How do I deploy files from other projects with my project?



    Here are two ways to do this correctly:


    A. Add a "Smart Device CAB Project" to your solution. It will bundle the C# application and the DLL in a CAB setup file. Then you only have to install the CAB on the device:

    1. To your solution, add new project. Choose type "Smart Device CAB Project"

    2. In the new project, right click the "Application Folder" and, point to Add and click "Project Output"

    3. Select the app, and "Primary Output"

    4. Repeat steps 2-4 for the DLL project primary output 5. Build the CAB project 6. Copy the CAB file to the device and run it. It will install both files.





    B. Add the DLL to your App project as "Content"

    1. In Solution Explorer, right click your app project, then click Add\Existing Item 2. Navigate to the previously-built DLL file and select it 3. In the Solution Explorer, right-click the DLL, then click Properties 4. Set the following:

       Build Action: Content

       Copy to Output Dir: Copy if newer

    5. Right click your app project, then click Deploy



    Note that while deploying, Visual Studio will copy the Content as a temporary file -- this may be where the GUID-looking name is coming from. When the copy is complete, it will rename the temporary file to the output name. Perhaps the copy was not completing in your original scenario for some reason
    • Proposed as answer by billb08 - MSFT Saturday, October 16, 2010 7:05 PM
    Saturday, October 16, 2010 7:05 PM