diff --git a/src/libp2p/Libp2p.Core.Benchmarks/Libp2p.Core.Benchmarks.csproj b/src/libp2p/Libp2p.Core.Benchmarks/Libp2p.Core.Benchmarks.csproj
index c59e7b8e..c2c9eec8 100644
--- a/src/libp2p/Libp2p.Core.Benchmarks/Libp2p.Core.Benchmarks.csproj
+++ b/src/libp2p/Libp2p.Core.Benchmarks/Libp2p.Core.Benchmarks.csproj
@@ -8,7 +8,6 @@
true
latest
Exe
- true
Nethermind.$(MSBuildProjectName)
Nethermind.$(MSBuildProjectName.Replace(" ", "_"))
diff --git a/src/libp2p/Libp2p.Protocols.Quic/Libp2p.Protocols.Quic.csproj b/src/libp2p/Libp2p.Protocols.Quic/Libp2p.Protocols.Quic.csproj
index 809095b0..05713c89 100644
--- a/src/libp2p/Libp2p.Protocols.Quic/Libp2p.Protocols.Quic.csproj
+++ b/src/libp2p/Libp2p.Protocols.Quic/Libp2p.Protocols.Quic.csproj
@@ -1,10 +1,10 @@
+ net8.0
enable
enable
latest
- true
Nethermind.$(MSBuildProjectName)
Nethermind.$(MSBuildProjectName.Replace(" ", "_"))
diff --git a/src/libp2p/Libp2p.Protocols.Quic/QuicProtocol.cs b/src/libp2p/Libp2p.Protocols.Quic/QuicProtocol.cs
index e002d4a9..016b9b31 100644
--- a/src/libp2p/Libp2p.Protocols.Quic/QuicProtocol.cs
+++ b/src/libp2p/Libp2p.Protocols.Quic/QuicProtocol.cs
@@ -11,6 +11,7 @@
using System.Net.Quic;
using System.Net.Security;
using System.Net.Sockets;
+using System.Runtime.Versioning;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
//using Nethermind.Libp2p.Protocols.Quic;
@@ -18,10 +19,11 @@
namespace Nethermind.Libp2p.Protocols;
#pragma warning disable CA1416 // Do not inform about platform compatibility
-#pragma warning disable CA2252 // EnablePreviewFeatures is set in the project, but build still fails
+
///
/// https://github.com/libp2p/specs/blob/master/quic/README.md
///
+[RequiresPreviewFeatures]
public class QuicProtocol : IProtocol
{
private readonly ILogger? _logger;
diff --git a/src/libp2p/Libp2p/Libp2p.csproj b/src/libp2p/Libp2p/Libp2p.csproj
index 062cfb10..fbf68fa2 100644
--- a/src/libp2p/Libp2p/Libp2p.csproj
+++ b/src/libp2p/Libp2p/Libp2p.csproj
@@ -5,7 +5,6 @@
enable
latest
Nethermind.$(MSBuildProjectName.Replace(" ", "_"))
- true
Nethermind.$(MSBuildProjectName)
diff --git a/src/libp2p/Libp2p/Libp2pPeerFactoryBuilder.cs b/src/libp2p/Libp2p/Libp2pPeerFactoryBuilder.cs
index 84946754..6c0a8f19 100644
--- a/src/libp2p/Libp2p/Libp2pPeerFactoryBuilder.cs
+++ b/src/libp2p/Libp2p/Libp2pPeerFactoryBuilder.cs
@@ -4,9 +4,11 @@
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols;
using Nethermind.Libp2p.Protocols.Pubsub;
+using System.Runtime.Versioning;
namespace Nethermind.Libp2p.Stack;
+[RequiresPreviewFeatures]
public class Libp2pPeerFactoryBuilder : PeerFactoryBuilderBase,
ILibp2pPeerFactoryBuilder
{
diff --git a/src/libp2p/Libp2p/ServiceProviderExtensions.cs b/src/libp2p/Libp2p/ServiceProviderExtensions.cs
index aa4ab79e..9110e332 100644
--- a/src/libp2p/Libp2p/ServiceProviderExtensions.cs
+++ b/src/libp2p/Libp2p/ServiceProviderExtensions.cs
@@ -4,11 +4,13 @@
using Microsoft.Extensions.DependencyInjection;
using Nethermind.Libp2p.Core;
using Nethermind.Libp2p.Protocols.Pubsub;
+using System.Runtime.Versioning;
namespace Nethermind.Libp2p.Stack;
public static class ServiceProviderExtensions
{
+ [RequiresPreviewFeatures]
public static IServiceCollection AddLibp2p(this IServiceCollection services, Func factorySetup)
{
return services
diff --git a/src/samples/chat/Chat.csproj b/src/samples/chat/Chat.csproj
index e2a1e1dc..dc1f757b 100644
--- a/src/samples/chat/Chat.csproj
+++ b/src/samples/chat/Chat.csproj
@@ -18,7 +18,6 @@
-
diff --git a/src/samples/chat/README.md b/src/samples/chat/README.md
index e69de29b..51df31a5 100644
--- a/src/samples/chat/README.md
+++ b/src/samples/chat/README.md
@@ -0,0 +1,9 @@
+
+```
+$ ./Chat
+[...]info: Chat[0] Listener started at /ip4/0.0.0.0/tcp/58641/p2p/ABCDEF
+```
+
+```
+$ ./Chat -d /ip4/127.0.0.1/58641
+```
\ No newline at end of file
diff --git a/src/samples/perf-benchmarks/PerfBenchmarks.csproj b/src/samples/perf-benchmarks/PerfBenchmarks.csproj
index f04f7490..931a5714 100644
--- a/src/samples/perf-benchmarks/PerfBenchmarks.csproj
+++ b/src/samples/perf-benchmarks/PerfBenchmarks.csproj
@@ -11,14 +11,10 @@
-
-
-
-
diff --git a/src/samples/perf-benchmarks/PerfTesting.csproj b/src/samples/perf-benchmarks/PerfTesting.csproj
deleted file mode 100644
index c298cccd..00000000
--- a/src/samples/perf-benchmarks/PerfTesting.csproj
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
- Exe
- net8.0
- enable
- enable
- true
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/samples/pubsub-chat/PubsubChat.csproj b/src/samples/pubsub-chat/PubsubChat.csproj
index 7e451026..84c66c97 100644
--- a/src/samples/pubsub-chat/PubsubChat.csproj
+++ b/src/samples/pubsub-chat/PubsubChat.csproj
@@ -14,7 +14,6 @@
-