Browse Source

Migrate all projects to .NET 5.0 + add AppVeyor build (#29)

pull/31/head
Igor Velikorossov 4 years ago
committed by GitHub
parent
commit
50ea97f05a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Directory.Build.props
  2. 61
      ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj
  3. 35
      ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs
  4. 3
      Project/ICSharpCode.TextEditor.csproj
  5. 38
      Test/AssemblyInfo.cs
  6. 68
      Test/ICSharpCode.TextEditor.Tests.csproj
  7. 52
      appveyor.yml
  8. BIN
      packages/NUnit.2.6.1/NUnit.2.6.1.nupkg
  9. BIN
      packages/NUnit.2.6.1/lib/nunit.framework.dll
  10. 10892
      packages/NUnit.2.6.1/lib/nunit.framework.xml
  11. 15
      packages/NUnit.2.6.1/license.txt
  12. 4
      packages/repositories.config

6
Directory.Build.props

@ -1,6 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
</PropertyGroup>
<PropertyGroup>
<Copyright>Copyright &#xA9; 2000-2010 AlphaSierraPapa // Copyright &#xA9; 2019 Git Extensions</Copyright>
<Description>This is a GitExtensions fork of SharpDevelop .NET text editor control</Description>

61
ICSharpCode.TextEditor.Sample/ICSharpCode.TextEditor.Sample.csproj

@ -1,65 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{7A53A84D-78B1-40B8-8D26-4724D829A756}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ICSharpCode.TextEditor.Sample</RootNamespace>
<AssemblyName>ICSharpCode.TextEditor.Sample</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<RuntimeIdentifier>win</RuntimeIdentifier>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<OutputType>Library</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="SampleForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SampleForm.Designer.cs">
<DependentUpon>SampleForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="SampleForm.resx">
<DependentUpon>SampleForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Project\ICSharpCode.TextEditor.csproj">
<Project>{2d18be89-d210-49eb-a9dd-2246fbb3df6d}</Project>
<Name>ICSharpCode.TextEditor</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

35
ICSharpCode.TextEditor.Sample/Properties/AssemblyInfo.cs

@ -1,35 +0,0 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ICSharpCode.TextEditor.Sample")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ICSharpCode.TextEditor.Sample")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(visibility: false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("7a53a84d-78b1-40b8-8d26-4724d829a756")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

3
Project/ICSharpCode.TextEditor.csproj

@ -2,9 +2,6 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<DeterministicSourcePaths Condition="'$(EnableSourceLink)' == ''">false</DeterministicSourcePaths>
</PropertyGroup>
<ItemGroup>

38
Test/AssemblyInfo.cs

@ -1,38 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="none" email=""/>
// <version>$Revision$</version>
// </file>
using System.Reflection;
// Information about this assembly is defined by the following
// attributes.
//
// change them to the information which is associated with the assembly
// you compile.
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all values by your own or you can build default build and revision
// numbers with the '*' character (the default):
[assembly: AssemblyVersion("2.0.0.1")]
// The following attributes specify the key for the sign of your assembly. See the
// .NET Framework documentation for more information about signing.
// This is not required, if you don't want signing let these attributes like they're.
[assembly: AssemblyDelaySign(delaySign: false)]
[assembly: AssemblyKeyFile("")]

68
Test/ICSharpCode.TextEditor.Tests.csproj

@ -1,65 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.41115</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6259D767-BA7C-484D-9472-68F350A20086}</ProjectGuid>
<RootNamespace>ICSharpCode.TextEditor.Tests</RootNamespace>
<AssemblyName>ICSharpCode.TextEditor.Tests</AssemblyName>
<OutputTarget>Library</OutputTarget>
<WarningLevel>4</WarningLevel>
<NoStdLib>False</NoStdLib>
<NoConfig>False</NoConfig>
<RunPostBuildEvent>OnSuccessfulBuild</RunPostBuildEvent>
<OutputType>Library</OutputType>
<OutputPath>..\..\..\..\bin\UnitTests</OutputPath>
<DebugType>Full</DebugType>
<RegisterForComInterop>False</RegisterForComInterop>
<PlatformTarget>AnyCPU</PlatformTarget>
<Optimize>False</Optimize>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<RuntimeIdentifier>win</RuntimeIdentifier>
<OldToolsVersion>2.0</OldToolsVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<DefineConstants>DEBUG</DefineConstants>
<OutputPath>bin\UnitTests\</OutputPath>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="HighlightingManagerTests.cs" />
<Compile Include="DocumentTests.cs" />
<Compile Include="BlockCommentTests.cs" />
<Compile Include="FoldingManagerTests.cs" />
<Compile Include="TextMarkerTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Project\ICSharpCode.TextEditor.csproj">
<Project>{2d18be89-d210-49eb-a9dd-2246fbb3df6d}</Project>
<Name>ICSharpCode.TextEditor</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.1\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<!-- VS TestExplorer uses this to identify a test project -->
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" IsImplicitlyDefined="true" />
<PackageReference Include="NUnit" Version="3.13.2" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" />
<PackageReference Include="NUnit.ConsoleRunner" Version="3.12.0" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" />
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" IsImplicitlyDefined="true" PrivateAssets="all" Publish="true" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
</Project>

52
appveyor.yml

@ -0,0 +1,52 @@
version: 4.0.2.{build}
branches:
except:
- /experimental\/*/
matrix:
fast_finish: true
# https://www.appveyor.com/docs/build-environment/#build-worker-images
image: Visual Studio 2019
# Build settings, not to be confused with "before_build" and "after_build".
# "project" is relative to the original build directory and not influenced by directory changes in "before_build".
build:
# enable MSBuild parallel builds
parallel: true
# MSBuild verbosity level
verbosity: minimal
# to run your custom scripts instead of automatic MSBuild
build_script:
- ps: |
# build .NET
dotnet build -c Release --verbosity q --nologo /bl:.\build.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# to run your custom scripts instead of automatic tests
test_script:
- ps: |
dotnet test -c Release --no-restore --nologo --verbosity q --test-adapter-path:. --logger:Appveyor --logger:trx /bl:.\tests.binlog
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
# on build failure
on_failure:
- ps: |
Get-ChildItem -recurse *.binlog -ErrorAction SilentlyContinue `
| ForEach-Object {
Push-AppveyorArtifact "$_"
}
- ps: |
Get-ChildItem -recurse Test\TestsResults\*.trx | `
ForEach-Object {
$file = $_.FullName.Replace('[', '``[').Replace(']', '``]')
#Write-Output "Processing $file"
[xml]$xml = Get-Content -Path $file
$xml.TestRun.Results.UnitTestResult | Where-Object outcome -eq 'Failed' | ForEach-Object {
$errorMessage = "$($_.Output.ErrorInfo.Message)`r`n$($_.Output.ErrorInfo.StackTrace)`r`n"
Write-Host $errorMessage -ForegroundColor Red
}
}

BIN
packages/NUnit.2.6.1/NUnit.2.6.1.nupkg

BIN
packages/NUnit.2.6.1/lib/nunit.framework.dll

10892
packages/NUnit.2.6.1/lib/nunit.framework.xml
File diff suppressed because it is too large
View File

15
packages/NUnit.2.6.1/license.txt

@ -1,15 +0,0 @@
Copyright © 2002-2012 Charlie Poole
Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov
Copyright © 2000-2002 Philip A. Craig
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required.
Portions Copyright © 2002-2012 Charlie Poole or Copyright © 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright © 2000-2002 Philip A. Craig
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.

4
packages/repositories.config

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\Test\packages.config" />
</repositories>
Loading…
Cancel
Save