Skip to content

Commit 9f44da1

Browse files
JordanSolutionslontivero
authored andcommitted
Upgraded project to new C# project format, added multiple-targets (lontivero#87)
* Upgrade to new C# project format * Removed references that were moved to conditional not standards and 3.5 item group * Modified .gitignore * removed System.Data, and System.Data.DataSetExtensions
1 parent 328b6ee commit 9f44da1

File tree

5 files changed

+51
-181
lines changed

5 files changed

+51
-181
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
bin/
77
obj/
88
packages/
9+
.vs/
910

1011
# Ignore VS files
1112
*.user

Open.Nat.sln

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25123.0
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.28010.2046
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Open.Nat", "Open.Nat\Open.Nat.csproj", "{F5D74163-145F-47BF-83DC-D0E07249C6CA}"
77
EndProject
@@ -34,14 +34,14 @@ Global
3434
Release 4.5|Any CPU = Release 4.5|Any CPU
3535
EndGlobalSection
3636
GlobalSection(ProjectConfigurationPlatforms) = postSolution
37-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 3.5|Any CPU.ActiveCfg = Debug 3.5|Any CPU
38-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 3.5|Any CPU.Build.0 = Debug 3.5|Any CPU
39-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 4.5|Any CPU.ActiveCfg = Debug 4.5|Any CPU
40-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 4.5|Any CPU.Build.0 = Debug 4.5|Any CPU
41-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 3.5|Any CPU.ActiveCfg = Release 3.5|Any CPU
42-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 3.5|Any CPU.Build.0 = Release 3.5|Any CPU
43-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 4.5|Any CPU.ActiveCfg = Release 4.5|Any CPU
44-
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 4.5|Any CPU.Build.0 = Release 4.5|Any CPU
37+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 3.5|Any CPU.ActiveCfg = Debug|Any CPU
38+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 3.5|Any CPU.Build.0 = Debug|Any CPU
39+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 4.5|Any CPU.ActiveCfg = Debug|Any CPU
40+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Debug 4.5|Any CPU.Build.0 = Debug|Any CPU
41+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 3.5|Any CPU.ActiveCfg = Release|Any CPU
42+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 3.5|Any CPU.Build.0 = Release|Any CPU
43+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 4.5|Any CPU.ActiveCfg = Release|Any CPU
44+
{F5D74163-145F-47BF-83DC-D0E07249C6CA}.Release 4.5|Any CPU.Build.0 = Release|Any CPU
4545
{E92CFA66-F518-4E66-B0BA-76A7808C939A}.Debug 3.5|Any CPU.ActiveCfg = Debug 3.5|Any CPU
4646
{E92CFA66-F518-4E66-B0BA-76A7808C939A}.Debug 3.5|Any CPU.Build.0 = Debug 3.5|Any CPU
4747
{E92CFA66-F518-4E66-B0BA-76A7808C939A}.Debug 4.5|Any CPU.ActiveCfg = Debug 4.5|Any CPU
@@ -62,6 +62,9 @@ Global
6262
GlobalSection(SolutionProperties) = preSolution
6363
HideSolutionNode = FALSE
6464
EndGlobalSection
65+
GlobalSection(ExtensibilityGlobals) = postSolution
66+
SolutionGuid = {20A4267C-4AEC-43F6-9685-5EAEA5A59407}
67+
EndGlobalSection
6568
GlobalSection(OpenDevelopProperties) = preSolution
6669
version = 0.1
6770
StartupItem = Open.Nat\Open.Nat.csproj

Open.Nat/AssemblyInfo.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

Open.Nat/AssemblyInfoAdditions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
using System.Runtime.CompilerServices;
2+
[assembly: InternalsVisibleTo("Open.Nat.UnitTests,PublicKey=" +
3+
"00240000048000009400000006020000002400005253413100040000010001004de491ec95076f"+
4+
"7054ac0562395232c4c351bce7037c7e266a5cc5dc6c60738fe649e06513ca1d58edec8e6a60e9"+
5+
"69887403a09ae158a007a592f650fe98912e7029e112e61494a47eff16138b62390241e1d8d450"+
6+
"76ac3af77b47fa67d40ba1928a37ebe073415785a23ae87b6119f63f78f04cb3b8ea280dfbf3d6"+
7+
"df437fbf")]

Open.Nat/Open.Nat.csproj

Lines changed: 30 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,43 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
1+
<Project Sdk="Microsoft.NET.Sdk">
32
<PropertyGroup>
4-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6-
<ProjectGuid>{F5D74163-145F-47BF-83DC-D0E07249C6CA}</ProjectGuid>
3+
<TargetFrameworks>netstandard2.0;net35;net45;net451;net452;net46;net461;net462;net47;net471</TargetFrameworks>
4+
<Platforms>AnyCPU;x64;x86</Platforms>
5+
<PackageId>Open.Nat</PackageId>
6+
<Authors>Alan McGovern, Ben Motmans, Lucas Ontivero</Authors>
7+
<Product>Open.Nat</Product>
8+
<PackageTags>Networking</PackageTags>
9+
<PackageReleaseNotes></PackageReleaseNotes>
10+
<Description>.NET Library for automatic network address translation</Description>
11+
<NeutralLanguage>en</NeutralLanguage>
12+
<Copyright>Copyright Alan McGovern, Ben Motmans, Lucas Ontivero © 2006-2014</Copyright>
13+
<Version>2.1.0.0</Version>
14+
<FileVersion>1.0.1.0</FileVersion>
715
<OutputType>Library</OutputType>
8-
<NoStandardLibraries>false</NoStandardLibraries>
9-
<AssemblyName>Open.Nat</AssemblyName>
10-
<RootNamespace>Open.Nat</RootNamespace>
11-
<ProductVersion>8.0.50727</ProductVersion>
12-
<SchemaVersion>2.0</SchemaVersion>
13-
<FileUpgradeFlags>
14-
</FileUpgradeFlags>
15-
<UpgradeBackupLocation>
16-
</UpgradeBackupLocation>
17-
<OldToolsVersion>2.0</OldToolsVersion>
18-
<TargetFrameworkProfile />
19-
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
20-
<RestorePackages>true</RestorePackages>
21-
</PropertyGroup>
22-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 4.5|AnyCPU' ">
23-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
24-
<DebugSymbols>true</DebugSymbols>
25-
<DebugType>full</DebugType>
26-
<Optimize>false</Optimize>
27-
<OutputPath>bin\Debug\net45\</OutputPath>
28-
<IntermediateOutputPath>obj\Debug\net45\</IntermediateOutputPath>
29-
<DefineConstants>TRACE;DEBUG;NET45</DefineConstants>
30-
<WarningLevel>0</WarningLevel>
31-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
32-
<OutputType>Library</OutputType>
33-
<RootNamespace>Open.Nat</RootNamespace>
34-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
35-
<Prefer32Bit>false</Prefer32Bit>
36-
<DocumentationFile>bin\Debug\net45\Open.Nat.XML</DocumentationFile>
37-
</PropertyGroup>
38-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' ">
39-
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
40-
<DebugSymbols>false</DebugSymbols>
41-
<DebugType>none</DebugType>
42-
<Optimize>true</Optimize>
43-
<OutputPath>bin\Release\net45\</OutputPath>
44-
<IntermediateOutputPath>obj\Release\net45\</IntermediateOutputPath>
45-
<DefineConstants>TRACE;NET45</DefineConstants>
46-
<WarningLevel>4</WarningLevel>
47-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
48-
<OutputType>Library</OutputType>
49-
<RootNamespace>Open.Nat</RootNamespace>
50-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
51-
<Prefer32Bit>false</Prefer32Bit>
52-
<DocumentationFile>bin\Release\net45\Open.Nat.XML</DocumentationFile>
16+
<StartupObject />
17+
<InternalsVisibleTo>Open.Nat.UnitTests,PublicKey=00240000048000009400000006020000002400005253413100040000010001004de491ec95076f7054ac0562395232c4c351bce7037c7e266a5cc5dc6c60738fe649e06513ca1d58edec8e6a60e969887403a09ae158a007a592f650fe98912e7029e112e61494a47eff16138b62390241e1d8d45076ac3af77b47fa67d40ba1928a37ebe073415785a23ae87b6119f63f78f04cb3b8ea280dfbf3d6df437fbf</InternalsVisibleTo>
5318
</PropertyGroup>
5419
<PropertyGroup>
20+
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
5521
<SignAssembly>true</SignAssembly>
56-
</PropertyGroup>
57-
<PropertyGroup>
5822
<AssemblyOriginatorKeyFile>Open.Nat.snk</AssemblyOriginatorKeyFile>
23+
<RepositoryUrl>https://github.com/lontivero/Open.NAT</RepositoryUrl>
24+
<RepositoryType>Github</RepositoryType>
5925
</PropertyGroup>
60-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug 3.5|AnyCPU'">
61-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
62-
<DebugSymbols>true</DebugSymbols>
63-
<OutputPath>bin\Debug\net35\</OutputPath>
64-
<IntermediateOutputPath>obj\Debug\net45\</IntermediateOutputPath>
65-
<DefineConstants>TRACE;DEBUG;NET35</DefineConstants>
66-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
67-
<DocumentationFile>bin\Debug\net35\Open.Nat.XML</DocumentationFile>
68-
<DebugType>full</DebugType>
69-
<PlatformTarget>AnyCPU</PlatformTarget>
70-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
71-
</PropertyGroup>
72-
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release 3.5|AnyCPU'">
73-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
74-
<DebugSymbols>false</DebugSymbols>
75-
<OutputPath>bin\Release\net35\</OutputPath>
76-
<IntermediateOutputPath>obj\Debug\net35\</IntermediateOutputPath>
77-
<DefineConstants>TRACE;NET35</DefineConstants>
78-
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
79-
<Optimize>true</Optimize>
80-
<DebugType>none</DebugType>
81-
<PlatformTarget>AnyCPU</PlatformTarget>
82-
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
83-
<WarningLevel>0</WarningLevel>
84-
<DocumentationFile>bin\Release\net35\Open.Nat.XML</DocumentationFile>
85-
</PropertyGroup>
86-
<ItemGroup>
26+
<ItemGroup Condition="'$(TargetFramework)'!='netstandard2.0'">
8727
<Reference Include="System" />
88-
<Reference Include="System.Data" />
28+
<Reference Include="System.Core" />
29+
<Reference Include="System.Xml.Linq" />
8930
<Reference Include="System.Xml" />
90-
<Reference Include="System.Threading, Version=1.0.2856.102, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"
91-
Condition="'$(Configuration)|$(Platform)' == 'Release 3.5|AnyCPU' OR '$(Configuration)|$(Platform)' == 'Debug 3.5|AnyCPU'">
92-
<HintPath>..\packages\TaskParallelLibrary.1.0.2856.0\lib\Net35\System.Threading.dll</HintPath>
93-
<Private>True</Private>
94-
</Reference>
9531
</ItemGroup>
96-
<ItemGroup>
97-
<Compile Include="Finalizer.cs" />
98-
<Compile Include="Utils\Guard.cs" />
99-
<Compile Include="NatDevice.cs" />
100-
<Compile Include="AssemblyInfo.cs" />
101-
<Compile Include="Enums\ProtocolType.cs" />
102-
<Compile Include="EventArgs\DeviceEventArgs.cs" />
103-
<Compile Include="Exceptions\MappingException.cs" />
104-
<Compile Include="Discovery\ISearcher.cs" />
105-
<Compile Include="Mapping.cs" />
106-
<Compile Include="Exceptions\NatDeviceNotFoundException.cs" />
107-
<Compile Include="NatDiscoverer.cs" />
108-
<Compile Include="Pmp\PmpSearcher.cs" />
109-
<Compile Include="Pmp\PmpConstants.cs" />
110-
<Compile Include="Pmp\PmpNatDevice.cs" />
111-
<Compile Include="PortMapper.cs" />
112-
<Compile Include="Discovery\Searcher.cs" />
113-
<Compile Include="Upnp\UpnpSearcher.cs" />
114-
<Compile Include="Upnp\DiscoveryResponseMessage.cs" />
115-
<Compile Include="Upnp\Messages\DiscoverDeviceMessage.cs" />
116-
<Compile Include="Upnp\Messages\Requests\CreatePortMappingMessage.cs" />
117-
<Compile Include="Upnp\Messages\Requests\DeletePortMappingMessage.cs" />
118-
<Compile Include="Upnp\Messages\Requests\GetExternalIPAddressMessage.cs" />
119-
<Compile Include="Upnp\Messages\Requests\GetGenericPortMappingEntry.cs" />
120-
<Compile Include="Upnp\Messages\Requests\GetSpecificPortMappingEntryMessage.cs" />
121-
<Compile Include="Upnp\ResponseMessageBase.cs" />
122-
<Compile Include="Upnp\Messages\Responses\GetExternalIPAddressResponseMessage.cs" />
123-
<Compile Include="Upnp\Messages\Responses\GetGenericPortMappingEntryResponseMessage.cs" />
124-
<Compile Include="Upnp\RequestMessageBase.cs" />
125-
<Compile Include="Upnp\SoapClient.cs" />
126-
<Compile Include="Upnp\UpnpConstants.cs" />
127-
<Compile Include="Upnp\UpnpNatDeviceInfo.cs" />
128-
<Compile Include="Upnp\UpnpNatDevice.cs" />
129-
<Compile Include="Utils\Extensions.cs" />
130-
<Compile Include="Utils\IIPAddressesProvider.cs" />
131-
<Compile Include="Utils\IPAddressesProvider.cs" />
132-
<Compile Include="Utils\WellKnownConstants.cs" />
32+
<ItemGroup Condition="'$(TargetFramework)'!='net35' and '$(TargetFramework)'!='netstandard2.0'">
33+
<Reference Include="Microsoft.CSharp" />
34+
<Reference Include="System.Net.Http" />
13335
</ItemGroup>
13436
<ItemGroup>
135-
<None Include="Open.Nat.nuspec">
136-
<SubType>Designer</SubType>
137-
</None>
138-
<None Include="Open.Nat.snk" />
37+
<Compile Remove="Upnp\Messages\Responses\AddPortMappingResponseMessage.cs" />
38+
<Compile Remove="Upnp\Messages\Responses\DeletePortMappingResponseMessage.cs" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<PackageReference Include="TaskParallelLibrary" Version="1.0.2856.0" Condition="'$(TargetFramework)'=='net35'" />
13942
</ItemGroup>
140-
<ItemGroup />
141-
<Target Name="AfterBuild">
142-
<!-- Load up the information from the assembly -->
143-
<GetAssemblyIdentity AssemblyFiles="$(OutputPath)$(AssemblyName).dll">
144-
<Output TaskParameter="Assemblies" ItemName="OutputAssemblyInfo" />
145-
</GetAssemblyIdentity>
146-
<Message Text="Info: %(OutputAssemblyInfo.Version)" />
147-
</Target>
148-
<Target Name="Package">
149-
<!-- Ensure the Package directory exists for this project -->
150-
<RemoveDir Directories="NuGet" />
151-
<MakeDir Directories="NuGet" />
152-
<!-- Package the project -->
153-
<Exec WorkingDirectory="$(BuildDir)" Command="NuGet.exe pack -Verbosity detailed -Symbols -OutputDir &quot;NuGet&quot; -Version %(OutputAssemblyInfo.Version) -Properties &quot;Configuration=$(Configuration)&quot;" />
154-
</Target>
155-
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
156-
<ProjectExtensions>
157-
<VisualStudio AllowExistingFolder="true" />
158-
</ProjectExtensions>
159-
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
160-
</Project>
43+
</Project>

0 commit comments

Comments
 (0)