none
Running .NET 2.0 app on .NET 4.0 using manifest instead of config? RRS feed

  • Question

  • Hi All,

    I have an application which is compiled for .NET 2.0 in VS2010. I want to allow this application to run on platforms from 2003 SP1 (.NET 2.0) to Win8 (.NET 4.0). We have used the app.config modification for other processes(supportedRuntime=..). However, I want this utility to be a stand-alone download for our customers. Is there a way to do the same work in my manifest as what is usually done in the app.config? I have read about clickonce projects, however my app is a simple windows forms app, so that doesn't seem like the right approach.

    Thanks in advance,
    Nick

    Thursday, September 27, 2012 8:49 PM

All replies

  • Hi Nick,

    Welcome to the MSDN Forum.

    Please take a look at the assembly manisest content: http://msdn.microsoft.com/en-us/library/1w45z383(v=vs.100).aspx 

    There is no field to specify this runtime version.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, September 28, 2012 7:39 AM
    Moderator
  • Hi Mike,
    That is interesting, but also seems incomplete since I can add requested execution level to a manifest and that is not documented in the reference you provided.

    If I cannot do it in the manifest, is there a way to embed the app.config in the assembly so the assembly can be self contained? I really need my assembly to be a single file deliverable and support .NET 2.0 and .NET 4.0 runtimes. The manifest was the preferred approach, but if my only answer is doing it via app.config, then I need a way to embed it in the assembly to simply deployment by the user.

    Thanks,
    Nick

    Friday, September 28, 2012 2:56 PM
  • Hi Nick,

    I doubt If manifest can be used in this case. The recommended way of using redirecting to use .NET 4.0 or changed supported runtime is through config file. I donot see any other option.

    Thanks,

    Gaurav

    Friday, December 7, 2012 12:33 AM