You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILD.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,14 @@
2
2
3
3
These are Build instructions for P4API.net and its required DLL and various test utilities
4
4
5
-
## The .NET Core (6.0) cross-platform port
5
+
## The .NET Core (8.0) cross-platform port
6
6
7
7
With the 2021.2 release, `P4API.NET` has been extended to support .NET CORE and to be cross-platform on three Target OS's (Windows, Linux, OSX)
8
8
9
9
With the 2024.2 release, 'P4API.NET' has been extended to support Linux and Mac ARM64 architecture systems.
10
10
11
+
With the 2025.1 release, 'P4API.NET' has been extended to support .NET 8.0 and to be cross-platform on three Target OS's (Windows, Linux, OSX) and has dropped support for .NET 6.0.
12
+
11
13
P4API.NET consists of a DLL written in C++ which contains the Perforce C++ API, which is wrapped by a layer of C# code which exports the .NET interface.
12
14
13
15
Within this directory are several subprojects. p4bridge, p4bridge-unit-test, p4bridgeStressTest, p4api.net and p4api.net-unit-test
@@ -17,15 +19,15 @@ Within this directory are several subprojects. p4bridge, p4bridge-unit-test, p4
17
19
### p4apicore.net.sln
18
20
19
21
[p4apicore.net.sln](p4apicore.net.sln) - This solution includes projects [p4api.net.csproj](./p4api.net/p4api.net.csproj) and [p4api.net-unit-test.csproj](./p4api.net-unit-test/p4api.net-unit-test.csproj).
20
-
Both of the projects target frameworks .NET Framework 4.6.2, .Net Core 6.0 and .NET Standard 2.0.
22
+
Both of the projects target frameworks .NET Framework 4.6.2, .Net Core 8.0 and .NET Standard 2.0.
21
23
> It only includes the C# portions of the project.
22
24
> It can be built using the `dotnet build p4apicore.net.sln` command.
23
25
This solution can be opened by the "dotnet" executable on any supported platform, or by VS2019+ on windows only.
24
26
This is the primary solution to be used for building and/or debugging P4API.NET and its unit tests.
25
27
26
28
### Sample Applications
27
29
28
-
Sample Console Applications for .NET 6.0 are provided here:
30
+
Sample Console Applications for .NET 8.0 are provided here:
29
31
[consoleApps/ControlCTest.sln](consoleApps/ControlCTest.sln) and [consoleApps/P4DotNetConsole.sln](consoleApps/P4DotNetConsole.sln)
30
32
31
33
Sample Applications for .NET framework are provided here:
@@ -90,14 +92,14 @@ The source, build and configuration instructions for these tests is in the *p4br
90
92
91
93
**IMPORTANT!** - The C++ bridge must have already been built before building P4API.NET.
92
94
93
-
Make sure you have an updated .NET 6.0 SDK (or better) installed for your platform.
95
+
Make sure you have an updated .NET 8.0 SDK (or better) installed for your platform.
94
96
download from here: [Microsoft .NET Downloads](https://dotnet.microsoft.com/download)
95
97
96
98
in the p4api.net root folder run
97
99
`dotnet build p4apicore.net.sln`
98
100
99
-
This will create The .NET DLL in `p4api.net\bin\Debug\net60\p4api.net.dll`, `p4api.net\bin\Debug\net462\p4api.net.dll`, `p4api.net\bin\Debug\netstandard2.0\p4api.net.dll`
100
-
And the Unit test in `\p4api.net-unit-test\bin\Debug\net60\p4api.net-unit-test.dll`, `\p4api.net-unit-test\bin\Debug\net462\p4api.net-unit-test.dll`, `\p4api.net-unit-test\bin\Debug\netstandard2.0\p4api.net-unit-test.dll`
101
+
This will create The .NET DLL in `p4api.net\bin\Debug\net80\p4api.net.dll`, `p4api.net\bin\Debug\net462\p4api.net.dll`, `p4api.net\bin\Debug\netstandard2.0\p4api.net.dll`
102
+
And the Unit test in `\p4api.net-unit-test\bin\Debug\net80\p4api.net-unit-test.dll`, `\p4api.net-unit-test\bin\Debug\net462\p4api.net-unit-test.dll`, `\p4api.net-unit-test\bin\Debug\netstandard2.0\p4api.net-unit-test.dll`
101
103
It will also copy the p4bridge.dll from the appropriate place in the ../p4bridge output into the default output directory.
102
104
103
105
On Windows, you can specify a specific Configuration and Platform with parameters:
@@ -115,10 +117,10 @@ into proper runtime locations.
115
117
`dotnet test p4apicore.net.sln`
116
118
117
119
> Filter on the dotnet framework to run upon
118
-
>> `dotnet test p4apicore.net.sln -f net60`
120
+
>> `dotnet test p4apicore.net.sln -f net80`
119
121
>
120
122
> Filter on the specific test to run
121
-
>> `dotnet test p4apicore.net.sln -f net60 --filter TestName`
123
+
>> `dotnet test p4apicore.net.sln -f net80 --filter TestName`
122
124
123
125
124
126
***Visual Studio 2019** can be used to debug the .NET unit tests if you are running in Windows.
@@ -134,7 +136,7 @@ Unfortunately, you cannot debug through the C++ code using Rider.
134
136
2. Build the four varieties of p4bridge first
135
137
3.`dotnet pack p4apicore.net.sln`
136
138
137
-
This will create an Assembly DLL in *.\bin\p4api.net\bin\Debug\net6.0\p4api.net.dll*
139
+
This will create an Assembly DLL in *.\bin\p4api.net\bin\Debug\net8.0\p4api.net.dll*
0 commit comments