.NET 4 application missing a pre-requisite

Unanswered .NET 4 application missing a pre-requisite

  • Wednesday, March 07, 2012 4:22 PM
     
     

    (moved from:  .NET Framework Setup )

    I have a windows forms application (C#/VS2010) which I have been developing under .NET 3.5 and Click Once successfully for some time, however I'm having difficulty moving this to .NET 4.

    The application uses a number of third-party DLLs.

    When I build my application using .NET 4, I find that it runs perfectly well on my development machine or on a machine which has VS2010 installed. If I try to run it on a machine that doesn't have VS2010 installed, then I get a message telling me that one of my 3rd party DLLs could not be found.

    I can achieve this effect either by installing my application on a second machine using click once, or by simply copying the bin/Debug or bin/Release directory of my application to a data-key and moving it across to the second machine.

    The second machine has .NET 4 framework installed.

    All I had to do was install VS2010 (not actually run it) and suddenly my application was able to find and load this 3rd party DLL.

    Sounds like I'm missing something somewhere .... all help gratefully received.

    Richard

All Replies

  • Wednesday, March 07, 2012 9:37 AM
     
     

    I have a windows forms application (C#/VS2010) which I have been developing under .NET 3.5 and Click Once successfully for some time, however I'm having difficulty moving this to .NET 4.

    The application uses a number of third-party DLLs.

    When I build my application using .NET 4, I find that it runs perfectly well on my development machine or on a machine which has VS2010 installed. If I try to run it on a machine that doesn't have VS2010 installed, then I get a message telling me that one of my 3rd party DLLs could not be found.

    I can achieve this effect either by installing my application on a second machine using click once, or by simply copying the bin/Debug or bin/Release directory of my application to a data-key and moving it across to the second machine.

    The second machine has .NET 4 framework installed.

    All I had to do was install VS2010 (not actually run it) and suddenly my application was able to find and load this 3rd party DLL.

    Sounds like I'm missing something somewhere .... all help gratefully received.

    Richard

  • Wednesday, March 07, 2012 3:56 PM
     
     

    As your issue appears to be associated with application deployment, please consider asking in the dedicated forum for best suggestions:

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/threads 

  • Wednesday, March 07, 2012 4:22 PM
     
     

    ok - have done, moved to:

    http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/eaee0c49-7e59-48ca-bdb0-ee10c5e8742b

  • Friday, March 09, 2012 2:49 AM
    Moderator
     
     

    Hi Richard,
    This could be the project doesn’t include the third part dll or the Prerequisites don’t include .NET Framwrok 4.
    According to your description, I think it’s mostly like Prerequisites don’t include .NET Framwrok 4. However, it is weird that it gives a third part dll missing error on the machine without .Net Framework 4.
    Anyway, please follow the steps below.
    Open the Properties Windows of the Project, Click “Publish” tab.
    Click “Application Files..”, check if the third part dll’s Publish Status, Download Group and Hash, it should be include, required and include.
    If you can’t find the dll, check the Show all files.

    Click ok to close the Application Files dialog box.
    Click the “Prerequisites” button on the Publish tab. In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components box is checked and make sure that Microsoft .NET Framework 4 is checked.
    If the third part dll’s produce could be found in this dialog box, please check it too.

    If you still have any doubt about this issue, please let us know.
    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, March 09, 2012 12:03 PM
     
     

    I believe I may have found my problem.

    The issue appears to be with the Visual C++ runtime support.

    Although my application is not written in C++, the third party DLL I am importing is written in C++ (I just happen to know).

    Would I therefore be right in saying that I need to include that C++ run-time library support for my application?

    This didn't used to be the case for .NET 3.5.

    Richard

  • Monday, March 12, 2012 9:16 AM
    Moderator
     
     
    Yes, I think so. But how could this issue happen if you just change the .Net framework from 3.5 to 4.0 and every setting is same to my last reply?
    Anyway, I glad to hear that it solved.
    Best Regards,

    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Tuesday, March 13, 2012 9:10 AM
     
     

    Is it possible that .NET 3.5 included the C++ run-time support built in, or that applications written in C++ using .NET 3.5 didn't need the run-time support.

    It is, after all, called Visual C++ *2010* run-time libraries.

    Richard

  • Wednesday, March 14, 2012 9:15 AM
    Moderator
     
     
    No, I don’t think so.
    If you move the application to .NET framework 4.0 and install it on a machine with .NET framework 3.5, you will get an error said that .NET framework 4.0 is not installed rather than can’t find the 3rd part dlls.
    Anyway, you have already found the solution.
    Best Regards,


    Bob Wu [MSFT]
    MSDN Community Support | Feedback to us

  • Wednesday, March 14, 2012 4:18 PM
     
     

    I know, but I'd like to get to the bottom of this.

    If you want to build an application which uses a 3rd party DLL:

    a) If you build for NET.3.5, YOU DON'T have to worry whether the 3rd party DLL was written in C++

    b) If you build for NET.4, YOU DO have to worry whether the 3rd party DLL was written in C++

    Correct?

    Assuming your application includes a DLL which IS written in C++:

    In case (a), your application WILL run on a machine with NET.3.5 installed. Nothing else is needed.

    In case (b), your application WILL NOT run on a machine with NET.4 installed UNLESS it also has the C++ support installed as well. The message you will receive if you do not have C++ support installed is that the DLL or one of its dependencies could not be found.

    If you don't mind me saying so, if I'm right about this, then you should publicise it in some way. People do not, generally speaking, know what language a third party DLL has been written in.

    Richard