Skip to content

Commit

Permalink
Updated projects to support .net 4.0 and .net 5 (#56)
Browse files Browse the repository at this point in the history
* Updated projects to support .net 4.0 and .net 5

* Update yml
  • Loading branch information
IDDesigns committed Sep 2, 2021
1 parent 7e715bf commit 046521f
Show file tree
Hide file tree
Showing 12 changed files with 487 additions and 955 deletions.
5 changes: 4 additions & 1 deletion appveyor.yml
@@ -1,12 +1,15 @@
version: 1.0.{build}
image: Visual Studio 2017
image: Visual Studio 2019
configuration: Release

build:
project: source\ConsoleControl.sln
publish_nuget: true
verbosity: minimal

before_build:
- appveyor-retry nuget restore source\ConsoleControl.sln

# Deploy to Nuget and GitHub Releases.
deploy:
- provider: NuGet
Expand Down
100 changes: 10 additions & 90 deletions source/ConsoleControl.WPF/ConsoleControl.WPF.csproj
@@ -1,37 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}</ProjectGuid>
<OutputType>library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleControl.WPF</RootNamespace>
<AssemblyName>ConsoleControl.WPF</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TargetFrameworks>net5.0-windows;net40</TargetFrameworks>
<OutputType>Library</OutputType>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWPF>true</UseWPF>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\ConsoleControl.WPF.xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
Expand All @@ -41,72 +16,17 @@
<AssemblyOriginatorKeyFile>ConsoleControl.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xaml">
<RequiredTargetFramework>4.0</RequiredTargetFramework>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
</ItemGroup>
<ItemGroup>
<Compile Include="RichTextBoxExtensions.cs" />
<Page Include="ConsoleControl.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ConsoleControl.xaml.cs">
<DependentUpon>ConsoleControl.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="ConsoleControl.snk" />
<None Include="ConsoleControl.WPF.nuspec" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ConsoleControlAPI\ConsoleControlAPI.csproj">
<Project>{a4b8573f-ebfc-4140-b8aa-7c037919ef57}</Project>
<Name>ConsoleControlAPI</Name>
</ProjectReference>
<ProjectReference Include="..\ConsoleControlAPI\ConsoleControlAPI.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
</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>
26 changes: 15 additions & 11 deletions source/ConsoleControl.sln
@@ -1,16 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
VisualStudioVersion = 14.0.22823.1
# Visual Studio Version 16
VisualStudioVersion = 16.0.31624.102
MinimumVisualStudioVersion = 14.0.22823.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleControl", "ConsoleControl\ConsoleControl.csproj", "{737CC7F2-EC7C-4800-B7EB-72637E892C42}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleControl", "ConsoleControl\ConsoleControl.csproj", "{737CC7F2-EC7C-4800-B7EB-72637E892C42}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleControlSample", "ConsoleControlSample\ConsoleControlSample.csproj", "{85D51BC3-E7F2-4C63-80B4-D16BE768707E}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleControlSample", "ConsoleControlSample\ConsoleControlSample.csproj", "{85D51BC3-E7F2-4C63-80B4-D16BE768707E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleControlAPI", "ConsoleControlAPI\ConsoleControlAPI.csproj", "{A4B8573F-EBFC-4140-B8AA-7C037919EF57}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleControlAPI", "ConsoleControlAPI\ConsoleControlAPI.csproj", "{A4B8573F-EBFC-4140-B8AA-7C037919EF57}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleControl.WPF", "ConsoleControl.WPF\ConsoleControl.WPF.csproj", "{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleControl.WPF", "ConsoleControl.WPF\ConsoleControl.WPF.csproj", "{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleControlSample.WPF", "ConsoleControlSample.WPF\ConsoleControlSample.WPF.csproj", "{4FA35552-432C-4AEF-8B5B-05883D11F098}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleControlSample.WPF", "ConsoleControlSample.WPF\ConsoleControlSample.WPF.csproj", "{4FA35552-432C-4AEF-8B5B-05883D11F098}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "0. Shared", "0. Shared", "{39EC3474-A060-422A-8D28-D6D902A65F02}"
ProjectSection(SolutionItems) = preProject
Expand Down Expand Up @@ -72,13 +73,13 @@ Global
{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{FD9FF553-D7C6-45A8-8321-5D9058B38E2D}.Release|x86.ActiveCfg = Release|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Any CPU.ActiveCfg = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Any CPU.Build.0 = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Mixed Platforms.Build.0 = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|x86.ActiveCfg = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Debug|x86.Build.0 = Debug|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Release|Any CPU.ActiveCfg = Release|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Release|Mixed Platforms.ActiveCfg = Release|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Release|Mixed Platforms.Build.0 = Release|x86
{4FA35552-432C-4AEF-8B5B-05883D11F098}.Release|x86.ActiveCfg = Release|x86
Expand All @@ -94,4 +95,7 @@ Global
{FD9FF553-D7C6-45A8-8321-5D9058B38E2D} = {75F316A9-2D1A-4788-B37B-8671FA2F17ED}
{4FA35552-432C-4AEF-8B5B-05883D11F098} = {88DD7B77-D58C-4AF8-B21B-A2FE9B3C74C2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {62B6A1F7-984A-402B-9F6E-ABF7E539A5EA}
EndGlobalSection
EndGlobal
8 changes: 4 additions & 4 deletions source/ConsoleControl/ConsoleControl.cs
Expand Up @@ -147,12 +147,12 @@ void richTextBoxConsole_KeyDown(object sender, KeyEventArgs e)
select k;

// Go through each mapping, send the message.
foreach (var mapping in mappings)
{
//foreach (var mapping in mappings)
//{
//SendKeysEx.SendKeys(CurrentProcessHwnd, mapping.SendKeysMapping);
//inputWriter.WriteLine(mapping.StreamMapping);
//WriteInput("\x3", Color.White, false);
}
//}

// If we handled a mapping, we're done here.
if (mappings.Any())
Expand Down Expand Up @@ -438,7 +438,7 @@ public RichTextBox InternalRichTextBox
/// Gets the process interface.
/// </summary>
[Browsable(false)]
public ConsoleControlAPI.ProcessInterface ProcessInterface
public ProcessInterface ProcessInterface
{
get { return processInterace; }
}
Expand Down
108 changes: 8 additions & 100 deletions source/ConsoleControl/ConsoleControl.csproj
@@ -1,56 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{737CC7F2-EC7C-4800-B7EB-72637E892C42}</ProjectGuid>
<TargetFrameworks>net5.0-windows;net40</TargetFrameworks>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleControl</RootNamespace>
<AssemblyName>ConsoleControl</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<DocumentationFile>bin\Release\ConsoleControl.xml</DocumentationFile>
</PropertyGroup>
Expand All @@ -60,78 +24,22 @@
<PropertyGroup>
<AssemblyOriginatorKeyFile>ConsoleControl.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ConsoleControl.cs">
<Compile Update="ConsoleControl.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="ConsoleControl.designer.cs">
<DependentUpon>ConsoleControl.cs</DependentUpon>
</Compile>
<Compile Include="ConsoleEventArgs.cs" />
<Compile Include="KeyMapping.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ConsoleControl.resx">
<DependentUpon>ConsoleControl.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="Console.ico" />
<None Include="ConsoleControl.nuspec" />
<EmbeddedResource Include="ConsoleControl.bmp" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ConsoleControlAPI\ConsoleControlAPI.csproj">
<Project>{a4b8573f-ebfc-4140-b8aa-7c037919ef57}</Project>
<Name>ConsoleControlAPI</Name>
</ProjectReference>
<ProjectReference Include="..\ConsoleControlAPI\ConsoleControlAPI.csproj" />
</ItemGroup>
<ItemGroup>
<None Include="ConsoleControl.snk" />
<PackageReference Include="Microsoft.Windows.Compatibility" Version="5.0.2" />
</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>
1 change: 0 additions & 1 deletion source/ConsoleControl/Properties/AssemblyInfo.cs
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down

0 comments on commit 046521f

Please sign in to comment.