Skip to content

Commit 8cca675

Browse files
authored
Merge pull request #173 from darvell/feature/csprojupdate
Migrate MLAPI to new csproj format and enable multi-targetting.
2 parents c3f4344 + 30a5bb1 commit 8cca675

File tree

14 files changed

+111
-479
lines changed

14 files changed

+111
-479
lines changed

GenerateApi.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ $myPath = (Get-Item -Path ".\").FullName;
22
$myPath = $myPath.Replace("\", "/")
33
$executablePath = -join ($myPath, "/Libraries/Internal/ApiParser/ApiParser.exe")
44

5-
$argList = "./MLAPI/bin/Debug/MLAPI.dll ./MLAPI/bin/Debug/MLAPI.xml ./docs/_data/api.yml ./docs/_api/"
5+
$argList = "./MLAPI/bin/Debug/net35/MLAPI.dll ./MLAPI/bin/Debug/net35/MLAPI.xml ./docs/_data/api.yml ./docs/_api/"
66

77
Start-Process -FilePath $executablePath -ArgumentList $argList

MLAPI-Editor/MLAPI-Editor.csproj

Lines changed: 11 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,25 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../common.props" />
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{A45DBD43-D640-4562-9F24-6745269CEDF7}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
104
<RootNamespace>MLAPI_Editor</RootNamespace>
11-
<AssemblyName>MLAPI-Editor</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
<TargetFrameworkProfile />
15-
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
<LangVersion>7</LangVersion>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
<LangVersion>7</LangVersion>
34-
</PropertyGroup>
35-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Lite|AnyCPU' ">
36-
<DebugSymbols>true</DebugSymbols>
37-
<DebugType>full</DebugType>
38-
<Optimize>false</Optimize>
39-
<OutputPath>bin\Lite\Debug\</OutputPath>
40-
<DefineConstants>DEBUG;TRACE;DISABLE_CRYPTOGRAPHY</DefineConstants>
41-
<ErrorReport>prompt</ErrorReport>
42-
<WarningLevel>4</WarningLevel>
43-
<LangVersion>7</LangVersion>
44-
</PropertyGroup>
45-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Lite|AnyCPU' ">
46-
<DebugType>pdbonly</DebugType>
47-
<Optimize>true</Optimize>
48-
<OutputPath>bin\Lite\Release\</OutputPath>
49-
<DefineConstants>TRACE;DISABLE_CRYPTOGRAPHY</DefineConstants>
50-
<ErrorReport>prompt</ErrorReport>
51-
<WarningLevel>4</WarningLevel>
5+
<TargetFrameworks>net35;net471;netstandard2.0</TargetFrameworks>
6+
<AssemblyTitle>MLAPI-Editor</AssemblyTitle>
7+
<Product>MLAPI-Editor</Product>
528
<LangVersion>7</LangVersion>
539
</PropertyGroup>
5410
<ItemGroup>
55-
<Compile Include="MLAPIEditor.cs" />
56-
<Compile Include="MLAPIProfiler.cs" />
57-
<Compile Include="NetworkedAnimatorEditor.cs" />
58-
<Compile Include="NetworkedBehaviourEditor.cs" />
59-
<Compile Include="NetworkedObjectEditor.cs" />
60-
<Compile Include="NetworkingManagerEditor.cs" />
61-
<Compile Include="PostProcessScene.cs" />
62-
<Compile Include="Properties\AssemblyInfo.cs" />
63-
<Compile Include="TrackedObjectEditor.cs" />
11+
<ProjectReference Include="..\MLAPI\MLAPI.csproj" />
6412
</ItemGroup>
6513
<ItemGroup>
66-
<ProjectReference Include="..\MLAPI\MLAPI.csproj">
67-
<Project>{EE431720-A9ED-43DC-9E74-10B693816D38}</Project>
68-
<Name>MLAPI</Name>
69-
</ProjectReference>
70-
</ItemGroup>
71-
<ItemGroup>
72-
<Reference Include="System" />
7314
<Reference Include="UnityEditor, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
74-
<SpecificVersion>False</SpecificVersion>
7515
<HintPath>..\Libraries\Unity\UnityEditor.dll</HintPath>
16+
<SpecificVersion>False</SpecificVersion>
17+
<Private>false</Private>
7618
</Reference>
7719
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
78-
<SpecificVersion>False</SpecificVersion>
7920
<HintPath>..\Libraries\Unity\UnityEngine.dll</HintPath>
21+
<SpecificVersion>False</SpecificVersion>
22+
<Private>false</Private>
8023
</Reference>
8124
</ItemGroup>
82-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
83-
</Project>
25+
</Project>

MLAPI-Editor/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,6 @@
44
using UnityEngine;
55

66
[assembly: AssemblyIsEditorAssembly]
7-
// General Information about an assembly is controlled through the following
8-
// set of attributes. Change these attribute values to modify the information
9-
// associated with an assembly.
10-
[assembly: AssemblyTitle("MLAPI-Editor")]
11-
[assembly: AssemblyDescription("")]
12-
[assembly: AssemblyConfiguration("")]
13-
[assembly: AssemblyCompany("")]
14-
[assembly: AssemblyProduct("MLAPI-Editor")]
15-
[assembly: AssemblyCopyright("Copyright © 2018")]
16-
[assembly: AssemblyTrademark("")]
17-
[assembly: AssemblyCulture("")]
187

198
// Setting ComVisible to false makes the types in this assembly not visible
209
// to COM components. If you need to access a type in this assembly from
@@ -23,16 +12,3 @@
2312

2413
// The following GUID is for the ID of the typelib if this project is exposed to COM
2514
[assembly: Guid("a45dbd43-d640-4562-9f24-6745269cedf7")]
26-
27-
// Version information for an assembly consists of the following four values:
28-
//
29-
// Major Version
30-
// Minor Version
31-
// Build Number
32-
// Revision
33-
//
34-
// You can specify all the values or you can default the Build and Revision Numbers
35-
// by using the '*' as shown below:
36-
// [assembly: AssemblyVersion("1.0.*")]
37-
[assembly: AssemblyVersion("1.0.0.0")]
38-
[assembly: AssemblyFileVersion("1.0.0.0")]

MLAPI-Examples/MLAPI-Examples.csproj

Lines changed: 8 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,18 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../common.props" />
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{FED83E10-8157-42C6-A58F-C2545C0D93B4}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
104
<RootNamespace>MLAPI_Examples</RootNamespace>
11-
<AssemblyName>MLAPI-Examples</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<PlatformTarget>AnyCPU</PlatformTarget>
17-
<DebugSymbols>true</DebugSymbols>
18-
<DebugType>full</DebugType>
19-
<Optimize>false</Optimize>
20-
<OutputPath>bin\Debug\</OutputPath>
21-
<DefineConstants>DEBUG;TRACE</DefineConstants>
22-
<ErrorReport>prompt</ErrorReport>
23-
<WarningLevel>4</WarningLevel>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<PlatformTarget>AnyCPU</PlatformTarget>
27-
<DebugType>pdbonly</DebugType>
28-
<Optimize>true</Optimize>
29-
<OutputPath>bin\Release\</OutputPath>
30-
<DefineConstants>TRACE</DefineConstants>
31-
<ErrorReport>prompt</ErrorReport>
32-
<WarningLevel>4</WarningLevel>
33-
</PropertyGroup>
34-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Lite|AnyCPU' ">
35-
<PlatformTarget>AnyCPU</PlatformTarget>
36-
<DebugSymbols>true</DebugSymbols>
37-
<DebugType>full</DebugType>
38-
<Optimize>false</Optimize>
39-
<OutputPath>bin\Lite\Debug\</OutputPath>
40-
<DefineConstants>DEBUG;TRACE;DISABLE_CRYPTOGRAPHY</DefineConstants>
41-
<ErrorReport>prompt</ErrorReport>
42-
<WarningLevel>4</WarningLevel>
43-
</PropertyGroup>
44-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Lite|AnyCPU' ">
45-
<PlatformTarget>AnyCPU</PlatformTarget>
46-
<DebugType>pdbonly</DebugType>
47-
<Optimize>true</Optimize>
48-
<OutputPath>bin\Lite\Release\</OutputPath>
49-
<DefineConstants>TRACE;DISABLE_CRYPTOGRAPHY</DefineConstants>
50-
<ErrorReport>prompt</ErrorReport>
51-
<WarningLevel>4</WarningLevel>
5+
<TargetFrameworks>net35;net471;netstandard2.0</TargetFrameworks>
6+
<AssemblyTitle>MLAPI-Examples</AssemblyTitle>
7+
<Product>MLAPI-Examples</Product>
528
</PropertyGroup>
539
<ItemGroup>
54-
<Reference Include="System" />
55-
<Reference Include="System.Core" />
56-
<Reference Include="System.Data" />
57-
<Reference Include="System.Xml" />
5810
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
5911
<HintPath>..\Libraries\Unity\UnityEngine.dll</HintPath>
12+
<Private>false</Private>
6013
</Reference>
6114
</ItemGroup>
6215
<ItemGroup>
63-
<Compile Include="ConvenienceMessagingPermission.cs" />
64-
<Compile Include="ConvenienceMessagingPing.cs" />
65-
<Compile Include="ManagerExamples.cs" />
66-
<Compile Include="NetworkedBehaviourCallbacks.cs" />
67-
<Compile Include="Properties\AssemblyInfo.cs" />
68-
<Compile Include="RunRpcOnOtherGameObject.cs" />
69-
<Compile Include="SerializedNetworkedVarExample.cs" />
70-
<Compile Include="UnetNetworkingManagerHud.cs" />
71-
</ItemGroup>
72-
<ItemGroup>
73-
<ProjectReference Include="..\MLAPI\MLAPI.csproj">
74-
<Project>{ee431720-a9ed-43dc-9e74-10b693816d38}</Project>
75-
<Name>MLAPI</Name>
76-
</ProjectReference>
16+
<ProjectReference Include="..\MLAPI\MLAPI.csproj" />
7717
</ItemGroup>
78-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
79-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
80-
Other similar extension points exist, see Microsoft.Common.targets.
81-
<Target Name="BeforeBuild">
82-
</Target>
83-
<Target Name="AfterBuild">
84-
</Target>
85-
-->
86-
</Project>
18+
</Project>
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,10 @@
11
using System.Reflection;
22
using System.Runtime.InteropServices;
33

4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
[assembly: AssemblyTitle("MLAPI_Examples")]
8-
[assembly: AssemblyDescription("")]
9-
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("MLAPI_Examples")]
12-
[assembly: AssemblyCopyright("Copyright © 2019")]
13-
[assembly: AssemblyTrademark("")]
14-
[assembly: AssemblyCulture("")]
15-
164
// Setting ComVisible to false makes the types in this assembly not visible
175
// to COM components. If you need to access a type in this assembly from
186
// COM, set the ComVisible attribute to true on that type.
197
[assembly: ComVisible(false)]
208

219
// The following GUID is for the ID of the typelib if this project is exposed to COM
2210
[assembly: Guid("FED83E10-8157-42C6-A58F-C2545C0D93B4")]
23-
24-
// Version information for an assembly consists of the following four values:
25-
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
30-
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]

MLAPI-Tests/MLAPI-Tests.csproj

Lines changed: 6 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,15 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<Import Project="../common.props" />
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{59E9F73A-398C-4F46-85E7-1DCDEEB2A85F}</ProjectGuid>
8-
<OutputType>Library</OutputType>
94
<RootNamespace>MLAPI_Tests</RootNamespace>
10-
<AssemblyName>MLAPI-Tests</AssemblyName>
11-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
12-
<NuGetPackageImportStamp>
13-
</NuGetPackageImportStamp>
14-
</PropertyGroup>
15-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16-
<DebugSymbols>true</DebugSymbols>
17-
<DebugType>full</DebugType>
18-
<Optimize>false</Optimize>
19-
<OutputPath>bin\Debug</OutputPath>
20-
<DefineConstants>DEBUG;</DefineConstants>
21-
<ErrorReport>prompt</ErrorReport>
22-
<WarningLevel>4</WarningLevel>
23-
<LangVersion>7</LangVersion>
24-
</PropertyGroup>
25-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26-
<Optimize>true</Optimize>
27-
<OutputPath>bin\Release</OutputPath>
28-
<ErrorReport>prompt</ErrorReport>
29-
<WarningLevel>4</WarningLevel>
30-
<LangVersion>7</LangVersion>
31-
</PropertyGroup>
32-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Lite|AnyCPU' ">
33-
<DebugSymbols>true</DebugSymbols>
34-
<DebugType>full</DebugType>
35-
<Optimize>false</Optimize>
36-
<OutputPath>bin\Lite\Debug</OutputPath>
37-
<DefineConstants>DEBUG;DISABLE_CRYPTOGRAPHY</DefineConstants>
38-
<ErrorReport>prompt</ErrorReport>
39-
<WarningLevel>4</WarningLevel>
40-
<LangVersion>7</LangVersion>
41-
</PropertyGroup>
42-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Lite|AnyCPU' ">
43-
<Optimize>true</Optimize>
44-
<OutputPath>bin\Lite\Release</OutputPath>
45-
<DefineConstants>DISABLE_CRYPTOGRAPHY</DefineConstants>
46-
<ErrorReport>prompt</ErrorReport>
47-
<WarningLevel>4</WarningLevel>
5+
<TargetFrameworks>net35;net471;netstandard2.0</TargetFrameworks>
486
<LangVersion>7</LangVersion>
497
</PropertyGroup>
508
<ItemGroup>
51-
<Reference Include="System" />
52-
<Reference Include="nunit.framework">
53-
<HintPath>..\packages\NUnit.3.10.1\lib\net35\nunit.framework.dll</HintPath>
54-
</Reference>
55-
</ItemGroup>
56-
<ItemGroup>
57-
<Compile Include="Test.cs" />
58-
<Compile Include="Data\HashCodeTest.cs" />
59-
<Compile Include="NetworkingManagerComponents\Binary\ArithmeticTest.cs" />
60-
<Compile Include="NetworkingManagerComponents\Binary\BitStreamTest.cs" />
61-
</ItemGroup>
62-
<ItemGroup>
63-
<None Include="packages.config" />
64-
</ItemGroup>
65-
<ItemGroup>
66-
<ProjectReference Include="..\MLAPI\MLAPI.csproj">
67-
<Project>{EE431720-A9ED-43DC-9E74-10B693816D38}</Project>
68-
<Name>MLAPI</Name>
69-
</ProjectReference>
9+
<PackageReference Include="NUnit" Version="3.10.1" />
10+
<PackageReference Include="OpenCover" Version="4.6.519" />
7011
</ItemGroup>
7112
<ItemGroup>
72-
<Folder Include="NetworkingManagerComponents\Cryptography\" />
13+
<ProjectReference Include="..\MLAPI\MLAPI.csproj" />
7314
</ItemGroup>
74-
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
7515
</Project>

MLAPI-Tests/packages.config

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

0 commit comments

Comments
 (0)