zoukankan      html  css  js  c++  java
  • 将类库生成多个版本类库

    参考官方文档 文档 

    今天在官网上看了一篇文档,内容是如何实现在自己的类库生成多个版本的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>

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

  • 相关阅读:
    ASP.NET Core 中间件 中间件(Middleware)和过滤器(Filter)的区别
    ASP.NET Core 中间件详解及项目实战
    开源项目1:某大学校友管理系统
    web安全浅析
    p2p网贷平台设计简析
    一些常见的并且比较难解决的设计问题
    CentOS 新增swap交换空间
    策略模式
    Centos6.4 本地yum源配置
    Linux(CentOs6.4)安装Git
  • 原文地址:https://www.cnblogs.com/lsgControl/p/10143498.html
Copyright © 2011-2022 走看看