locked
Multi-Target-Pack 4.0 for Windows 10 RRS feed

  • Question

  • Hi,

    my Software is compiling .NET classes that need to run on .NET 4.0 IoT devices.

    Developer PCs need to install the .NET Framework Reference Assemblies 4.0. They come with "Microsoft Windows SDK for Windows 7 and .NET Framework 4". Works fine on Windows 7.

    For Windows 10 installations this SDK cannot be used. Even extracting MTPack/ and installing the contained “netfx_dtp.msi” fails. The "Windows 10 SDK" does not contain the Reference Assemblies of .NET Framework versions earlier than 4.7.

    The only way I know is to install VisualStudio. It contains the required Reference Assemblies.

    But my users do not want to install the complete VisualStudio and may have trouble with the licenses using the free Community edition.

    And: no I cannot switch to .NET core, since my application uses C++ & C++CLI.

    Is there any solution?

     

    Thanks
        dsg-online

    Wednesday, October 4, 2017 9:53 AM

All replies

  • Hi dsg-online,

    Thank you for posting here.

    If you want to use .net framework and do not want to install the Visual Studio, you could only install .net framework from the following link.

    https://www.microsoft.com/net/download/framework

    >>And: no I cannot switch to .NET core, since my application uses C++ & C++CLI.

    As I know, there is no plan to support C++/ CLI with .Net Core. For more details, you could refer to the discussion in following link.

    https://github.com/dotnet/coreclr/issues/659

    But you could try to use P/Invoke to call C++ dll. .Net Core support that. For more details, please refer to the following link.

    https://docs.microsoft.com/en-us/dotnet/standard/native-interop

    Best Regards,

    Wendy


    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.

    Friday, October 6, 2017 5:45 AM
  • Hi Wendy,

    thanks for the information.
    However, it does not exactly target my problem.
    I try to explain again:

    My problem is, my customers installs my application. This application needs to compile C#-Code for .NET Framework 4.0. Exactly 4.0, since the compiled assembly needs to execute on IoT devices which only support .NET Framework 4.0.

    Since  newer .NET Frameworks are installed as replacement for any previous version, it is not possible to solve the problem by installing different .NET Frameworks.

    What I need is an install package for the "Reference Assemblies" to compile against v4.0 and *not* the most recent version installed.

    This links describes how to target a specific .NET Framework version in VisualStudio:
    https://msdn.microsoft.com/en-us/library/bb398202.aspx
    VisualStudio installs the Reference Assemblies of all previous .NET Framework versions.
    This is where they are installed:
    C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework

    But I cannot tell my customers to install complete VisualStudio, just to compile some small C# code snippets.

    The "Microsoft Windows SDK for Windows 7 and .NET Framework 4" installs the .NET 4 Framework Reference Assemblies.

    This article about the "SDK for Windows 8" refers to the Reference Assemblies of .NET 4.5 Framework and explains to use "SDK for Windows 7" if the Reference Assemblies for 4.0 are required:
    https://developer.microsoft.com/en-us/windows/downloads/windows-8-sdk

    Unfortunately, this solution does not work with Windows 10. Since the old SDK won't install anymore.

    Thanks
     dsg-online
    Wednesday, October 11, 2017 9:32 AM
  • Hi dsg-online,

    Thank you for feedback.

    What is the version of Win10?

    Windows 10 Creators Update preinstalled with the OS .net framework 4.7.  Microsoft .NET Framework 4 is already a part of this operating system.  You do not need to install the .NET Framework 4 redistributable.

    With the development and update of .net framework and OS, maybe some assembly is obsolete. You could run your application in win10 to test and update the assembly which is obsolete. 

    Hope it helps.

    Best Regards,

    Wendy


    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.

    Thursday, October 12, 2017 7:24 AM