Copying .NET Framework DLLs RRS feed

  • Question

  • I have an app that depends on the .NET Framework 4.5. However, that .NET framework is not installed on the system on which I need to use the program. Further, I am not allowed to install it, either (policy). Is it possible to just copy the dlls into the directory in which the application resides? If so, how do I find out which dlls it needs? The dependency walker doesn't seems to list .NET Framework related dlls.
    Wednesday, February 7, 2018 3:27 AM

All replies

  • Hi hfaum,

    In advance, sorry if I misunderstand your situation/question.

    I'm afraid it would be hard or almost impossible for us to copy DLLs required.

    about .NET Framework as a Runtime (Client Profile or Full package):
    .NET Framework 4 / 4.5.x / 4.6.x / 4.7.x cannot coexist in one computer. The newer version of .NET Framework of 4.x could support the earlier version of 4.x (sorry, I cannot guarantee all cases). And it depends on Windows version which version of .NET Framework can be installed ... very confusing...

    Would you provide the version of .NET Framework 4.x, and Windows in your computer?
    How to: Determine Which .NET Framework Versions Are Installed



    Wednesday, February 7, 2018 5:51 AM
  • Well, I don't ask "you" to copy the DLLs. I am just asking if this is possible incl. some potential pitfalls. If so, I can copy the dlls myself.

    The computer is a Win7 x64 system. I didn't check but I assume it means it has .NET Framework 3.5 (since no updates can be installed it's probably stuck at v3.5).

    I understand any 4x versions cannot coexist. However, in my case I would have 3.5 and 4.5. Further, 4.5 wouldn't be installed as a feature. Instead, I would simply copy the necessary dlls to the directory where the program is located. Is that possible?

    Wednesday, February 7, 2018 6:16 AM
  • I am not an expert but I doubt you can do it. One big barrier is security; Microsoft has to keep things like that protected.

    Go to:

    C:\Program Files (x86)\Microsoft SDKs\Windows

    in your system and search for "ildasm.exe". You will probably find multiple versions. I don't know which one to use; they probably all work for what you need. That might help. The following are a couple more worth trying. AsmSpy appears to be a command-line program. ILSpy is a GUI application.

    Sam Hobbs

    Wednesday, February 7, 2018 6:35 AM
  • Hi hfaun,

    Welcome to MSDN forum.

    How did you deploy your app, using ClickOnce deployment or something else?

    If you use clickonce, and you can add a dependency on the .NET Framework:

    1.Open the app project you want to publish.

    2.In Solution Explorer, open the shortcut menu for your project, and then choose Properties.

    3.Choose the Publish pane.

    4.Choose the Prerequisites button.

    5.In the Prerequisites dialog box, make sure that the Create setup program to install prerequisite components check box is selected.

    6.In the prerequisites list, locate and select the version of the .NET Framework that you've used to build your project.

    7.In the Property Pages dialog box, choose OK.

    The more you can have a look at here:

    Best regards,


    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, February 8, 2018 2:52 AM