• 将类库生成多个版本类库


    参考官方文档 文档 

    今天在官网上看了一篇文档,内容是如何实现在自己的类库生成多个版本的dll  然后安装上面的说明进行了实践,实现的效果如下,没去测试会不会出问题,下次有时间再详细来一遍

    先贴个代码吧,以后再接着弄,,好像不能打包了,有时间再看看什么回事

    <Project Sdk="Microsoft.NET.Sdk">
    
      <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <NeutralLanguage>中国</NeutralLanguage>
        <RepositoryType>git</RepositoryType>
      </PropertyGroup>
    
    <PropertyGroup>
                <TargetFrameworks>net40;net45;netstandard1.0;netstandard2.0</TargetFrameworks>
     </PropertyGroup>
    
      <PropertyGroup Condition="'$(Configuration)|$(Platform)|$(TargetFramework)' == 'Debug|AnyCPU|net40'">
    
        <DefineConstants>TRACE;DEBUG</DefineConstants>
        <DocumentationFile>....Bin
    et45XCode.xml</DocumentationFile>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)|$(TargetFramework)' == 'Release|AnyCPU|net45'">
        
        <DefineConstants>TRACE</DefineConstants>
        <DocumentationFile>....Bin
    et45XCode.xml</DocumentationFile>
      </PropertyGroup>
      
          <PropertyGroup Condition="'$(Configuration)|$(Platform)|$(TargetFramework)'=='Debug|AnyCPU|netstandard1.0'">
        
        <DocumentationFile>....Bin
    etstandard1.0XCode.xml</DocumentationFile>
        <DefineConstants>TRACE;DEBUG</DefineConstants>
      </PropertyGroup>
      
        <PropertyGroup Condition="'$(Configuration)|$(Platform)|$(TargetFramework)'=='Debug|AnyCPU|netstandard2.0'">
        
        <DocumentationFile>....Bin
    etstandard2.0XCode.xml</DocumentationFile>
        <DefineConstants>TRACE;DEBUG</DefineConstants>
      </PropertyGroup>
           
    
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
        <DefineConstants />
        <Optimize>true</Optimize>
        <NoWarn>1701;1702;1705;1591;0618</NoWarn>
      </PropertyGroup>
    
    </Project>

    文档上还有标出,包不兼容要做处理,

  • 相关阅读:
    初探动态规划(DP)
    高精度压位
    Poi写文件时报java.io.IOException: Read error
    mysql合并和时间函数
    线程池子线程先执行再执行主线程
    linux常用命令
    使用线程池应该注意的问题
    分页查询千万级数据慢
    待簳的题......
    记录脑残失误,让达摩克利斯之剑永远高悬
  • 原文地址:https://www.cnblogs.com/lsgControl/p/10143498.html
Copyright © 2020-2023  润新知