none
Unable to load Managed DirectX9.0 assemblies in .NETCore 3.1 which is built against version v1.1.4322. RRS feed

  • Question

    • We have a VS2019 .NET Windows Forms application which is using Managed DirectX 9.0, built against v1.1.4322 run time of .NET.

    We are using   useLegacyV2RuntimeActivationPolicy = true setting in  app.Config  to load the DirectX assemblies.

    <configuration>

          <startup useLegacyV2RuntimeActivationPolicy="true">

    • Now we are trying to port this application to .NET core 3.1 . In .net core, app.config is not available and  we could not find the alternative solution for the useLegacyV2RuntimeActivationPolicy configuration setting which is required for loading ManagedDirectX9.0.

    Are there any methods to make Managed DirectX 9.0 work in .NET Core 3.1?

    We observed that Managed Wrapper (C++/CLI library ) developed using Visual studio 2005  (.net 2.0) is not loading in .netcore 3.1 Win Forms application.

    Please suggest how to load C++/CLI Managed wrapper library which is targeting .NET 2.0  in .netcore 3.1.

    Are there any configuration settings available similar to useLegacyV2RuntimeActivationPolicy?

    Friday, February 28, 2020 11:02 AM

All replies

  • Hi SMathew1979,
    Based on your description, I have a suggestion that the CLR Hosting API includes a means of setting this programmatically via the ICLRRuntimeInfo interface.
    More details you can refer to this document
    [Setting useLegacyV2RuntimeActivationPolicy At Runtime]
    Hope it could be helpful for you.
    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
    Best Regards
    Daniel Zhang


    MSDN Community Support
    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 MSDNFSF@microsoft.com.

    Monday, March 2, 2020 7:18 AM
  • On setting it programmatically PlatformNotsupported exception occurred as shown below
    Monday, March 2, 2020 11:29 AM