c# - How do I find the applications that require the .NET framework?

07
2014-07
  • Questioner

    Is there a way to look at all the applications installed on a users computer and determine which, if any, are utilizing the .NET framework? My problem is that I want to upgrade our users computers from .NET 4.0 to 4.5. In order to do this I am required to also re-test all the installed applications that are built for 4.0. I know that it is backward compatible and a 4.0 application should run fine on 4.5 but I can't get away with that statement alone. And nobody can tell me why 4.0 was even put onto the computers so I don't know if any of the applications that are currently there require it. I don't have the capability to uninstall 4.0 and run all the applications to see which ones fail either. Any suggestions? Are there tools I can use to look at all the applications?

  • Answers
  • FreeAsInBeer

    It looks like Hans Passant's answer may provide some assistance. Essentially he explains how to write a script to enumerate all executables and determine which version of .NET, if any, they require.

    Jakob's right though. There's no need to uninstall 4.0 when the frameworks can run side by side without negative impact. Thanks Falanwe.


  • Related Question

    performance - Warm-up .NET application
  • boj

    We have speed problems in corporate enviroment.

    Most of the notebooks are strongly loaded: the start-up time of Excel is 3-5 minutes, Outlook 10-15 minutes etc.

    Our application has the same start-up time, instead of the normal 10-20 seconds. If once it started, after a program restart it works fine.

    How is it possible to warm-up our application?

    My first tought was to write a small script and run it right before our application startup:

    • connect to the local SQL Server and get some data
    • preload assemblies
    • ???

    But I think it's not enough - or totally a mistake.

    Edit:

    They have IBM Thinkpad X40 notebooks with 1GB RAM. Specialized Windows XP installed (I think this + background installers are the root of all our problems).


  • Related Answers
  • gridzbi

    If the machines are this grossly under-powered then I'd make the argument to your superiors that the problems lie in the companies IT provision to staff. I'd say any development time spent on this would be ill-spent.

  • sventevit

    Maybe a bit naive, but still... format & reinstal Windows :-)

  • Rick

    What do you mean strongly loaded?

    From your symptoms the problem might be that they do not have enough RAM. In which case when you start your applications they will have to swap previously running applications into virtual memory.

    When you close that application and restart it straight away, you will have free RAM so it will restart quickly.

    But it will do no good if you do something else in the meantime, i.e. open Outlook, close Outlook, open Excel - do some work, then if you open Outlook again it will not open quickly, i.e. your original suggestion to try and automatically open and close your application (at bootup?) won't help.

  • David Basarab

    Perhaps this is a roaming profile issue? I don't know about your program, but Excel and Outlook make significant use of the User folder, which is probably stored somewhere on your corporate network for each Active Directory account. My guess is that either the network or the storage system is too slow for your 300+ users.

  • Florian Doyon

    You should also consider distributed optimized native assemblies that will take some work off the JIT at startup/early app lifecycle time.

    Have a look at NGEN, it's basically doing JIT at compile time, and some other preloading magic!

    http://msdn.microsoft.com/en-us/library/6t9t5wcf%28VS.80%29.aspx

    Cheers, Florian

  • Psycogeek

    What are the metrics you see via Task Manager ?

    Which Process is consuming the most CPU ?

    Which Processes are consuming RAM ?

    Is there an anti virus running in the background doing a full scan every time a computer starts ?

    how many Page Faults by which processes ?

    Whats the Configuration of Computers and which Softwares ?

  • Klay

    As Simon hinted at above, this shouldn't be the type of issue you try to work around using a warmup script. I'd suggest serious hardware and software upgrades. I mean 15 minutes to start outlook?