[fix]修正UdpServer在接收广播时连续启动接收的错误,在StarAgent中,此时可能收到广播包,SocketFlags是Broadcast,需要清空,否则报错“参考的对象类型不支持尝试的操作”; 无需设置SocketOptionName.PacketInformation,在ReceiveMessageFromAsync时会自动设置,并且支持ipv6;
石头 authored at 2024-10-10 00:36:00 石头 committed at 2024-10-10 00:45:43
10.54 KiB
X
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
  <PropertyGroup>
    <TargetFrameworks>net45;net461;netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net5.0-windows;net6.0-windows;net7.0;net7.0-windows;net8.0;net8.0-windows</TargetFrameworks>  
    <AssemblyName>NewLife.Core</AssemblyName>
    <RootNamespace>NewLife</RootNamespace>
    <AssemblyTitle>NewLife组件核心库</AssemblyTitle>
    <Description>Core basic components: log (file / network), configuration (XML / JSON / HTTP), cache (memory / redis), network (TCP / UDP / HTTP), RPC framework, serialization (binary / XML / JSON), APM performance tracking. 核心基础组件,日志(文件/网络)、配置(XML/Json/Http)、缓存(内存/Redis)、网络(Tcp/Udp/Http)、RPC框架、序列化(Binary/XML/Json)、APM性能追踪。</Description>
    <Company>新生命开发团队</Company>
    <Copyright>©2002-2024 NewLife</Copyright>
    <VersionPrefix>10.10</VersionPrefix>
    <VersionSuffix>$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</VersionSuffix>
    <Version>$(VersionPrefix).$(VersionSuffix)</Version>
    <FileVersion>$(Version)</FileVersion>
    <AssemblyVersion>$(VersionPrefix).$([System.DateTime]::Now.ToString(`yyyy.MMdd`))</AssemblyVersion>
    <OutputPath>..\Bin</OutputPath>
    <GenerateDocumentationFile>True</GenerateDocumentationFile>
    <LangVersion>latest</LangVersion>
    <Nullable>enable</Nullable>
    <ImplicitUsings>enable</ImplicitUsings>
    <SignAssembly>True</SignAssembly>
    <AssemblyOriginatorKeyFile>..\Doc\newlife.snk</AssemblyOriginatorKeyFile>
    <NoWarn>1701;1702;NU5104;NU1505;NETSDK1138;CS7035</NoWarn>
  </PropertyGroup>
  <PropertyGroup>
    <PackageId>$(AssemblyName)</PackageId>
    <Authors>$(Company)</Authors>
    <PackageProjectUrl>https://newlifex.com/core</PackageProjectUrl>
    <PackageIcon>leaf.png</PackageIcon>
    <RepositoryUrl>https://github.com/NewLifeX/X</RepositoryUrl>
    <RepositoryType>git</RepositoryType>
    <PackageTags>新生命团队;X组件;NewLife;$(AssemblyName)</PackageTags>
    <PackageReleaseNotes>新增TimerProvider支持修正绝对定时器时间差;Binary二进制序列化支持完整时间;新增ProcessHelper;改进IJsonHost;新增CreateConfigOnMissing减少配置文件</PackageReleaseNotes>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PublishRepositoryUrl>true</PublishRepositoryUrl>
    <EmbedUntrackedSources>true</EmbedUntrackedSources>
    <IncludeSymbols>true</IncludeSymbols>
    <SymbolPackageFormat>snupkg</SymbolPackageFormat>
    <PackageReadmeFile>Readme.MD</PackageReadmeFile>
  </PropertyGroup>
  <ItemGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
    <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
      <PrivateAssets>all</PrivateAssets>
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
    </PackageReference>
  </ItemGroup>

  <PropertyGroup Condition="'$(TargetFramework)'=='net45' or '$(TargetFramework)'=='net461' or '$(TargetFramework)'=='net5.0-windows' or '$(TargetFramework)'=='net6.0-windows' or '$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net8.0-windows'">
    <DefineConstants>$(DefineConstants);__WIN__</DefineConstants>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetFramework)'=='net5.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="5.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net6.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="6.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="7.0.0" />
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net8.0-windows'">
    <FrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms" IsImplicitlyDefined="true" TargetingPackVersion="8.0.0" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)'!='netstandard2.1'">
    <!--<PackageReference Include="System.Management" Version="6.0.0" />-->
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='netstandard2.0'">
    <!--<PackageReference Include="IndexRange" Version="1.0.2" />-->
    <!--<PackageReference Include="System.Memory" Version="4.5.5" />-->
  </ItemGroup>
  <ItemGroup Condition="'$(TargetFramework)'=='net45' or '$(TargetFramework)'=='net461'">
    <!--<PackageReference Include="System.Net.Http" Version="4.3.4" />-->
    <!--<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />-->
    <PackageReference Include="System.ValueTuple" Version="4.5.0" />
  </ItemGroup>
  
  <ItemGroup Condition="'$(TargetFramework)'=='net45' or '$(TargetFramework)'=='net461'">
    <Using Include="System.Net.Http" />
    <Reference Include="Microsoft.VisualBasic" />
    <Reference Include="System.Management" />
    <Reference Include="System.Net.Http" />
    <Reference Include="System.IO.Compression" />
    <Reference Include="System.Web" />
    <Reference Include="System.Windows.Forms" />
  </ItemGroup>

  <ItemGroup>
    <Compile Remove="Agent\**" />
    <Compile Remove="Applications\**" />
    <Compile Remove="Compression\**" />
    <Compile Remove="Expressions\**" />
    <Compile Remove="Json\**" />
    <Compile Remove="Remoting\Controllers\**" />
    <Compile Remove="Remoting\Filters\**" />
    <Compile Remove="Web\OAuth\**" />
    <Compile Remove="Yun\**" />
    <EmbeddedResource Remove="Applications\**" />
    <EmbeddedResource Remove="Compression\**" />
    <EmbeddedResource Remove="Expressions\**" />
    <EmbeddedResource Remove="Json\**" />
    <EmbeddedResource Remove="Remoting\Controllers\**" />
    <EmbeddedResource Remove="Remoting\Filters\**" />
    <EmbeddedResource Remove="Yun\**" />
    <None Remove="Applications\**" />
    <None Remove="Compression\**" />
    <None Remove="Expressions\**" />
    <None Remove="Json\**" />
    <None Remove="Remoting\Controllers\**" />
    <None Remove="Remoting\Filters\**" />
    <None Remove="Yun\**" />
  </ItemGroup>
  <ItemGroup>
    <Compile Remove="Algorithms\BilinearInterpolation.cs" />
    <Compile Remove="Algorithms\BucketModes.cs" />
    <Compile Remove="Algorithms\BucketSource.cs" />
    <Compile Remove="Algorithms\LagrangeInterpolation.cs" />
    <Compile Remove="Algorithms\LTOBSampling.cs" />
    <Compile Remove="Algorithms\LTTBSampling.cs" />
    <Compile Remove="Algorithms\MaxSampling.cs" />
    <Compile Remove="Algorithms\MinSampling.cs" />
    <Compile Remove="Algorithms\SumSampling.cs" />
    <Compile Remove="Caching\Redis.cs" />
    <Compile Remove="Caching\RedisClient.cs" />
    <Compile Remove="Caching\RedisEncoder.cs" />
    <Compile Remove="Collections\BloomFilter.cs" />
    <Compile Remove="Collections\DictionaryCache.cs" />
    <Compile Remove="Collections\ICluster.cs" />
    <Compile Remove="Collections\QueueService.cs" />
    <Compile Remove="Data\BinaryTree.cs" />
    <Compile Remove="Data\GeoAddress.cs" />
    <Compile Remove="Data\GeoArea.cs" />
    <Compile Remove="Data\GeoPoint.cs" />
    <Compile Remove="Data\IMemoryEncoder.cs" />
    <Compile Remove="Extension\EndPointExtensions.cs" />
    <Compile Remove="Http\DefaultHttpClientFactory.cs" />
    <Compile Remove="Http\HttpClient.cs" />
    <Compile Remove="Http\HttpCodec.cs" />
    <Compile Remove="Http\HttpEncoder.cs" />
    <Compile Remove="Http\IHttpClientFactory.cs" />
    <Compile Remove="IO\EncodingHelper.cs" />
    <Compile Remove="IO\FileSource.cs" />
    <Compile Remove="Log\CodeTimer.cs" />
    <Compile Remove="Log\TimeCost.cs" />
    <Compile Remove="Log\TraceStream.cs" />
    <Compile Remove="Model\IFactory.cs" />
    <Compile Remove="Net\NetException.cs" />
    <Compile Remove="Net\SerialPortConfig.cs" />
    <Compile Remove="Net\SerialTransport.cs" />
    <Compile Remove="Net\WebSocketSession.cs" />
    <Compile Remove="Properties\AssemblyInfo.cs" />
    <Compile Remove="Reflection\EmitHelper.cs" />
    <Compile Remove="Reflection\EmitReflect.cs" />
    <Compile Remove="Reflection\IIndexAccessor.cs" />
    <Compile Remove="Remoting\ApiAction.cs" />
    <Compile Remove="Remoting\ApiAttribute.cs" />
    <Compile Remove="Remoting\ApiClient.cs" />
    <Compile Remove="Remoting\ApiHost.cs" />
    <Compile Remove="Remoting\ApiHttpServer.cs" />
    <Compile Remove="Remoting\ApiNetServer.cs" />
    <Compile Remove="Remoting\ApiServer.cs" />
    <Compile Remove="Remoting\ClientPoolCluster.cs" />
    <Compile Remove="Remoting\ClientSingleCluster.cs" />
    <Compile Remove="Remoting\IApi.cs" />
    <Compile Remove="Remoting\IApiHandler.cs" />
    <Compile Remove="Remoting\IApiHost.cs" />
    <Compile Remove="Remoting\IApiManager.cs" />
    <Compile Remove="Remoting\IApiServer.cs" />
    <Compile Remove="Remoting\IApiSession.cs" />
    <Compile Remove="Remoting\IEncoder.cs" />
    <Compile Remove="Remoting\JsonEncoder.cs" />
    <Compile Remove="Security\AlgorithmKeyBlob.cs" />
    <Compile Remove="Security\Certificate.cs" />
    <Compile Remove="Security\ECDsaHelper.cs" />
    <Compile Remove="Security\ECKey.cs" />
    <Compile Remove="Serialization\Accessor.cs" />
    <Compile Remove="Serialization\BinaryCodec.cs" />
    <Compile Remove="Serialization\BinaryCodec2.cs" />
    <Compile Remove="Serialization\Binary\BinaryPair.cs" />
    <Compile Remove="Serialization\Binary\BinaryUnknown.cs" />
    <Compile Remove="Serialization\JsonCodec.cs" />
    <Compile Remove="Serialization\JsonCodec2.cs" />
    <Compile Remove="Serialization\Json\JsonTest.cs" />
    <Compile Remove="Web\OAuthClient.cs" />
    <Compile Remove="Web\OAuthConfig.cs" />
    <Compile Remove="Web\OAuthServer.cs" />
    <Compile Remove="Web\Pager.cs" />
    <Compile Remove="Web\WebHelper.cs" />
    <Compile Remove="Windows\MySpeech.cs" />
    <Compile Remove="Windows\SpeechRecognition.cs" />
    <Compile Remove="Xml\SerializableDictionary.cs" />
    <Compile Remove="发布NuGet.cs" />
  </ItemGroup>
  <ItemGroup>
    <None Remove="Remoting\ApiClient.cd" />
    <None Remove="Remoting\ApiServer.cd" />
    <None Remove="UpdateInfo.txt" />
    <None Remove="X组件.txt" />
    <None Remove="说明.txt" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Yun\OssClient.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="..\Doc\leaf.png" Link="leaf.png" PackagePath="\" />
  </ItemGroup>
  <ItemGroup>
    <None Include="..\Readme.MD">
      <Pack>True</Pack>
      <PackagePath>\</PackagePath>
    </None>
  </ItemGroup>


</Project>