Is there any guidance on converting existing .NET class libraries to portable libraries?

前端 未结 3 1301
借酒劲吻你
借酒劲吻你 2020-12-12 16:57

I have some class libraries with a non-trivial amount of existing code. The class libraries currently target .NET 4.0. Is there any guidance on how to convert these librarie

3条回答
  •  旧时难觅i
    2020-12-12 17:49

    We also converted existing libraries to portable libraries and it works fine. You have to modify the project file. Replace the following line:

    
    

    with

    
    

    Add following line inside a PropertyGroup tag

    {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
    

    And remove following lines from the AssemblyInfo.cs file

    [assembly: ComVisible(false)]
    [assembly: Guid("...")]
    

    After that, Visual Studio should show you the Tab page "Library" in the project Property page and you can change the target frameworks for the portable library.

提交回复
热议问题