Migrate solution to project SDK

Sharp7.csproj is now in cool new SDK format. Also is targets NetStandard2.0 properly.

Nuget.exe and pack.ps1 are removed because msbuild can do their job a lot better. The buildprocess on appveyor has to be updated.
This commit is contained in:
Alexander Seminjakiw
2018-11-21 08:08:28 +01:00
parent 52db944189
commit 4cb8e06ea3
6 changed files with 19 additions and 164 deletions

View File

@@ -5,11 +5,6 @@ VisualStudioVersion = 15.0.27004.2009
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sharp7", "Sharp7\Sharp7.csproj", "{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_nuspec", "_nuspec", "{FD318289-9BB8-4FF2-BB45-DFA4FE6BAEF8}"
ProjectSection(SolutionItems) = preProject
_nuspec\Sharp7.nuspec = _nuspec\Sharp7.nuspec
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -22,16 +17,16 @@ Global
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x64.ActiveCfg = Debug|x64
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x64.Build.0 = Debug|x64
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x86.ActiveCfg = Debug|x86
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x86.Build.0 = Debug|x86
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x64.ActiveCfg = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x64.Build.0 = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x86.ActiveCfg = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Debug|x86.Build.0 = Debug|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|Any CPU.Build.0 = Release|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x64.ActiveCfg = Release|x64
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x64.Build.0 = Release|x64
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x86.ActiveCfg = Release|x86
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x86.Build.0 = Release|x86
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x64.ActiveCfg = Release|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x64.Build.0 = Release|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x86.ActiveCfg = Release|Any CPU
{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
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("Sharp7")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Sharp7")]
[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(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4fe194af-7ffe-48ba-9dfc-425e9d5b9f46")]
// 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")]

View File

@@ -1,88 +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>{4FE194AF-7FFE-48BA-9DFC-425E9D5B9F46}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Sharp7</RootNamespace>
<AssemblyName>Sharp7</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFramework>netstandard2.0</TargetFramework>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<Authors>Federico Barresi</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/fbarresi/Sharp7</PackageProjectUrl>
<PackageLicenseUrl>https://raw.githubusercontent.com/fbarresi/Sharp7/master/LICENSE</PackageLicenseUrl>
<PackageTags>snap7 s7 simantic</PackageTags>
<Company />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\out\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\out\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\out\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>..\out\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\out\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\out\x86\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<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>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="S7.cs" />
<Compile Include="S7Client.cs" />
<Compile Include="S7Consts.cs" />
<Compile Include="S7MultiVar.cs" />
<Compile Include="S7Timer.cs" />
<Compile Include="MsgSocket.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

Binary file not shown.

View File

@@ -1,11 +0,0 @@
$version = [System.Reflection.Assembly]::LoadFile("C:\projects\sharp7\out\Release\Sharp7.dll").GetName().Version
$versionStr = "{0}.{1}.{2}" -f ($version.Major, $version.Minor, $version.Build)
Write-Host "Setting .nuspec version tag to $versionStr"
$content = (Get-Content _nuspec\Sharp7.nuspec)
$content = $content -replace '\$version\$',$versionStr
$content | Out-File _nuspec\Sharp7.compiled.nuspec
& _nuspec\NuGet.exe pack _nuspec\Sharp7.compiled.nuspec

View File

@@ -1,19 +0,0 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Sharp7</id>
<version>$version$</version>
<title>Sharp7</title>
<authors>Federico Barresi</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Multi-platform Ethernet S7 PLC communication suite (C# port of Snap7 Client by davenardella)</description>
<projectUrl>https://github.com/fbarresi/Sharp7</projectUrl>
<licenseUrl>https://raw.githubusercontent.com/fbarresi/Sharp7/master/LICENSE</licenseUrl>
<copyright>Copyright 2018</copyright>
</metadata>
<files>
<file src="..\out\Release\Sharp7.*" target="lib\net45" />
<file src="..\out\Release\Sharp7.*" target="lib\netcore" />
<file src="..\out\Release\Sharp7.*" target="lib\netstandard" />
</files>
</package>