Jump to content


P4API.NET for dotnetCore (.NET Core) support?

P4API.NET C# .NET Core dotnetcore p4bridge .NET dotnet core migration

  • Please log in to reply
2 replies to this topic

#1 forum1234

forum1234

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 November 2019 - 08:47 PM

Hi all,

I have a quick question.

Is the latest P4API.NET library compatible with .NET Core? If not, is there any plan for supporting it anytime soon?

I'm in the process of migrating our projects from .NET Framework to .NET Core, and have been running into compatibility issues with the library.

Related question
: https://forums.perfo...ge__hl__netcore

#2 JamesNix

JamesNix

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 18 November 2019 - 01:48 PM

I've had this working for over a year.  The way I did it was to get the p4api.net solution set up and building.  

1. Add a .Net Standard project to the solution and set up the project output dll / folders.
2. Delete the included class file that the New Project template creates for you so that you have a completely empty project.  
3. Add Existing Items.... to the project.  Navigate to the p4api.net folder and select all the files and the errors folder and click Add As Link (dropdown on the Add button).  Now all of the source is included in the .Net Standard project.
4. Build it and now you have a .Net Standard assembly that can be used by .Net Core.  

I have an assembly created in this way running in .Net Core under IIS in production and it works great.

#3 forum1234

forum1234

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 03 December 2019 - 09:22 PM

I ended up creating a new nuget package (targeted .net core 3) which spits out the "p4api.net.dll" and "p4bridge.net.dll", then published it to our private nuget server.
And it seems to do the trick.

Thanks for the reply, giving me some idea James





Also tagged with one or more of these keywords: P4API.NET, C#, .NET Core, dotnetcore, p4bridge, .NET, dotnet core, migration

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users