-migrate from .net 4.7.2 to .Net standard 2.0 for the library and .Net core 3.0 for the example project

This commit is contained in:
FlorianDahn 2019-09-28 14:06:19 +02:00
parent 2e0656dc06
commit b0e6a8b981
5 changed files with 67 additions and 226 deletions

View File

@ -1,18 +1,10 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{5817184C-0D59-4924-AC6C-6B943967811C}</ProjectGuid>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <TargetFrameworks>netcoreapp3.0;net461</TargetFrameworks>
<RootNamespace>TelegramBaseTest</RootNamespace> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AssemblyName>TelegramBaseTest</AssemblyName> <Configurations>Debug;Release</Configurations>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@ -33,77 +25,9 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release Net45|AnyCPU'">
<OutputPath>bin\Release Net45\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <ProjectReference Include="..\TelegramBotBase\TelegramBotBase.csproj" />
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
<Reference Include="Telegram.Bot, Version=14.12.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Telegram.Bot.14.12.0\lib\net45\Telegram.Bot.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" /> </Project>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tests\ButtonTestForm.cs" />
<Compile Include="Tests\Controls\ButtonGridForm.cs" />
<Compile Include="Tests\Controls\CalendarPickerForm.cs" />
<Compile Include="Tests\Controls\MonthPickerForm.cs" />
<Compile Include="Tests\Controls\ToggleButtons.cs" />
<Compile Include="Tests\Controls\TreeViewForms.cs" />
<Compile Include="Tests\DataForm.cs" />
<Compile Include="Tests\ProgressTest.cs" />
<Compile Include="Tests\Register\PerForm.cs" />
<Compile Include="Tests\Register\PerStep.cs" />
<Compile Include="Tests\Register\Start.cs" />
<Compile Include="Tests\Register\Steps\Data.cs" />
<Compile Include="Tests\Register\Steps\Step3.cs" />
<Compile Include="Tests\Register\Steps\Step2.cs" />
<Compile Include="Tests\Register\Steps\Step1.cs" />
<Compile Include="Tests\SimpleForm.cs" />
<Compile Include="Tests\Start.cs" />
<Compile Include="Tests\TestForm.cs" />
<Compile Include="Tests\TestForm2.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config">
<SubType>Designer</SubType>
</None>
<None Include="packages.config">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TelegramBotBase\TelegramBotBase.csproj">
<Project>{a61eda27-cfdf-4bcb-b2d6-184f94904f2d}</Project>
<Name>TelegramBotBase</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.5.2.0")] [assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("1.5.2.0")] [assembly: AssemblyFileVersion("2.0.0.0")]

View File

@ -1,18 +1,16 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<ProjectGuid>{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}</ProjectGuid> <GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<OutputType>Library</OutputType> <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<AppDesignerFolder>Properties</AppDesignerFolder> <PackageProjectUrl>https://github.com/MajMcCloud/TelegramBotFramework</PackageProjectUrl>
<RootNamespace>TelegramBotBase</RootNamespace> <RepositoryUrl>https://github.com/MajMcCloud/TelegramBotFramework</RepositoryUrl>
<AssemblyName>TelegramBotBase</AssemblyName> <PackageReleaseNotes>- moving from .Net Framework 4.7.2 to .Net Standard 2.1 for the Library and .Net Core 3.0 for the test project!</PackageReleaseNotes>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> <Configurations>Debug;Release;</Configurations>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType> <DebugType>full</DebugType>
@ -22,6 +20,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
@ -31,96 +30,43 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\TelegramBotBase.xml</DocumentationFile> <DocumentationFile>bin\Release\TelegramBotBase.xml</DocumentationFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release Net45|AnyCPU' ">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\net45\</OutputPath> <OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion> <DocumentationFile>bin\Release\TelegramBotBase.xml</DocumentationFile>
<DocumentationFile>bin\Release\net45\TelegramBotBase.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Compile Remove="Archive\**" />
<Reference Include="System.ComponentModel.Composition" /> <EmbeddedResource Remove="Archive\**" />
<Reference Include="System.Core" /> <None Remove="Archive\**" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Numerics" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Base\Async.cs" /> <None Remove="cpack.ps1" />
<Compile Include="Base\ButtonClickedEventArgs.cs" /> <None Remove="cpush.ps1" />
<Compile Include="Base\ControlBase.cs" /> <None Remove="nuget.exe" />
<Compile Include="Base\DataResult.cs" /> <None Remove="TelegramBotBase.1.5.0.nupkg" />
<Compile Include="Base\InitEventArgs.cs" /> <None Remove="TelegramBotBase.1.5.0.zip" />
<Compile Include="Base\MessageClient.cs" /> <None Remove="TelegramBotBase.1.5.1.nupkg" />
<Compile Include="Base\MessageIncomeResult.cs" /> <None Remove="TelegramBotBase.1.5.1.zip" />
<Compile Include="Base\MessageReceivedEventArgs.cs" /> <None Remove="TelegramBotBase.1.5.2.nupkg" />
<Compile Include="Base\MessageResult.cs" /> <None Remove="TelegramBotBase.1.5.2.zip" />
<Compile Include="Base\MessageSentEventArgs.cs" /> <None Remove="TelegramBotBase.nuspec" />
<Compile Include="Base\ResultBase.cs" />
<Compile Include="Base\SessionBeginResult.cs" />
<Compile Include="Base\SystemExceptionEventArgs.cs" />
<Compile Include="Base\UnhandledCallEventArgs.cs" />
<Compile Include="Base\SystemCallEventArgs.cs" />
<Compile Include="BotBase.cs" />
<Compile Include="Constants\Telegram.cs" />
<Compile Include="Controls\ButtonGrid.cs" />
<Compile Include="Controls\CalendarPicker.cs" />
<Compile Include="Controls\MonthPicker.cs" />
<Compile Include="Controls\ProgressBar.cs" />
<Compile Include="Controls\ToggleButton.cs" />
<Compile Include="Controls\TreeView.cs" />
<Compile Include="Controls\TreeViewNode.cs" />
<Compile Include="Enums\eDeleteMode.cs" />
<Compile Include="Enums\eDeleteSide.cs" />
<Compile Include="Enums\eKeyboardType.cs" />
<Compile Include="Enums\eMonthPickerMode.cs" />
<Compile Include="Exceptions\MaxLengthException.cs" />
<Compile Include="Form\AlertDialog.cs" />
<Compile Include="Form\ArrayPromptDialog.cs" />
<Compile Include="Form\AutoCleanForm.cs" />
<Compile Include="Form\ButtonBase.cs" />
<Compile Include="Form\ButtonForm.cs" />
<Compile Include="Base\FormBase.cs" />
<Compile Include="Form\CallbackData.cs" />
<Compile Include="Form\PromptDialog.cs" />
<Compile Include="Markdown\Generator.cs" />
<Compile Include="SessionBase.cs" />
<Compile Include="Sessions\DeviceSession.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Tools\Arrays.cs" />
<Compile Include="Tools\Time.cs" />
<Compile Include="Tools\Images.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Newtonsoft.Json"> <PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<Version>12.0.2</Version> <PackageReference Include="System.Drawing.Common" Version="4.6.0" />
</PackageReference> <PackageReference Include="Telegram.Bot" Version="15.0.0" />
<PackageReference Include="System.Net.Requests">
<Version>4.3.0</Version>
</PackageReference>
<PackageReference Include="Telegram.Bot">
<Version>15.0.0</Version>
</PackageReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. </Project>
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -10,12 +10,15 @@
<projectUrl>https://github.com/MajMcCloud/TelegramBotFramework</projectUrl> <projectUrl>https://github.com/MajMcCloud/TelegramBotFramework</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance> <requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description> <description>$description$</description>
<releaseNotes>First release on nuget for easier use.</releaseNotes> <releaseNotes>This is a context based application framework for the C# TelegramBot library.</releaseNotes>
<copyright>Copyright 2019</copyright> <copyright>Copyright 2019</copyright>
<tags>Telegram Bot Framework C# Addon Context Modules</tags> <tags>Telegram Bot Framework C# Addon Context Modules</tags>
<dependencies> <dependencies>
<dependency id="Telegram.Bot" version="14.3.0" /> <dependency id="Telegram.Bot" version="14.3.0" />
<dependency id="Newtonsoft.Json" version="11.0.2" /> <dependency id="Newtonsoft.Json" version="11.0.2" />
<dependency id="System.Net.Requests" version="4.3.0" />
</dependencies> </dependencies>
<repository type="git"
url="https://github.com/MajMcCloud/TelegramBotFramework" />
</metadata> </metadata>
</package> </package>

View File

@ -1,40 +1,11 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.29025.244 VisualStudioVersion = 16.0.29324.140
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramBaseTest", "TelegramBaseTest\TelegramBaseTest.csproj", "{5817184C-0D59-4924-AC6C-6B943967811C}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelegramBotBase", "TelegramBotBase\TelegramBotBase.csproj", "{0BD16FB9-7ED4-4CCB-83EB-5CEE538E1B6C}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TelegramBotBase", "TelegramBotBase\TelegramBotBase.csproj", "{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TelegramBaseTest", "TelegramBaseTest\TelegramBaseTest.csproj", "{9BBFA9F7-64A7-4D7D-86FC-812E6D7578B8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E9AE1280-C1F3-4960-9D3D-D4F25142E838}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "images", "images", "{AF4C8238-A0F0-41AC-8C0A-33E143AEBFCD}"
ProjectSection(SolutionItems) = preProject
images\alertdialog.PNG = images\alertdialog.PNG
images\buttongrid.gif = images\buttongrid.gif
images\calendarpicker.gif = images\calendarpicker.gif
images\calendarpicker.PNG = images\calendarpicker.PNG
images\example1.PNG = images\example1.PNG
images\example2.PNG = images\example2.PNG
images\example3.PNG = images\example3.PNG
images\example4.1.PNG = images\example4.1.PNG
images\example4.2.PNG = images\example4.2.PNG
images\example4.3.PNG = images\example4.3.PNG
images\example4.4.PNG = images\example4.4.PNG
images\monthpicker1.PNG = images\monthpicker1.PNG
images\monthpicker2.PNG = images\monthpicker2.PNG
images\progressbar.PNG = images\progressbar.PNG
images\promptdialog.PNG = images\promptdialog.PNG
images\togglebutton.gif = images\togglebutton.gif
images\treeview1.PNG = images\treeview1.PNG
images\treeview2.PNG = images\treeview2.PNG
images\treeview3.PNG = images\treeview3.PNG
images\treeview4.PNG = images\treeview4.PNG
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -42,22 +13,19 @@ Global
Release|Any CPU = Release|Any CPU Release|Any CPU = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5817184C-0D59-4924-AC6C-6B943967811C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0BD16FB9-7ED4-4CCB-83EB-5CEE538E1B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5817184C-0D59-4924-AC6C-6B943967811C}.Debug|Any CPU.Build.0 = Debug|Any CPU {0BD16FB9-7ED4-4CCB-83EB-5CEE538E1B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5817184C-0D59-4924-AC6C-6B943967811C}.Release|Any CPU.ActiveCfg = Release|Any CPU {0BD16FB9-7ED4-4CCB-83EB-5CEE538E1B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5817184C-0D59-4924-AC6C-6B943967811C}.Release|Any CPU.Build.0 = Release|Any CPU {0BD16FB9-7ED4-4CCB-83EB-5CEE538E1B6C}.Release|Any CPU.Build.0 = Release|Any CPU
{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9BBFA9F7-64A7-4D7D-86FC-812E6D7578B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}.Debug|Any CPU.Build.0 = Debug|Any CPU {9BBFA9F7-64A7-4D7D-86FC-812E6D7578B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}.Release|Any CPU.ActiveCfg = Release|Any CPU {9BBFA9F7-64A7-4D7D-86FC-812E6D7578B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A61EDA27-CFDF-4BCB-B2D6-184F94904F2D}.Release|Any CPU.Build.0 = Release|Any CPU {9BBFA9F7-64A7-4D7D-86FC-812E6D7578B8}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{AF4C8238-A0F0-41AC-8C0A-33E143AEBFCD} = {E9AE1280-C1F3-4960-9D3D-D4F25142E838}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {4245F162-E263-45E0-A16A-ED5F411A4AFC} SolutionGuid = {59CB40E1-9FA7-4867-A56F-4F418286F057}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal