diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..80f498ab
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,5 @@
+
+
+ true
+
+
diff --git a/samples/AspireShop/AspireShop.ServiceDefaults/AspireShop.ServiceDefaults.csproj b/samples/AspireShop/AspireShop.ServiceDefaults/AspireShop.ServiceDefaults.csproj
index 6fff2f15..ffadfeb5 100644
--- a/samples/AspireShop/AspireShop.ServiceDefaults/AspireShop.ServiceDefaults.csproj
+++ b/samples/AspireShop/AspireShop.ServiceDefaults/AspireShop.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/AspireWithAzureFunctions/ImageGallery.ServiceDefaults/ImageGallery.ServiceDefaults.csproj b/samples/AspireWithAzureFunctions/ImageGallery.ServiceDefaults/ImageGallery.ServiceDefaults.csproj
index 98787973..e1646629 100644
--- a/samples/AspireWithAzureFunctions/ImageGallery.ServiceDefaults/ImageGallery.ServiceDefaults.csproj
+++ b/samples/AspireWithAzureFunctions/ImageGallery.ServiceDefaults/ImageGallery.ServiceDefaults.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/samples/AspireWithDapr/AspireWithDapr.ServiceDefaults/AspireWithDapr.ServiceDefaults.csproj b/samples/AspireWithDapr/AspireWithDapr.ServiceDefaults/AspireWithDapr.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/AspireWithDapr/AspireWithDapr.ServiceDefaults/AspireWithDapr.ServiceDefaults.csproj
+++ b/samples/AspireWithDapr/AspireWithDapr.ServiceDefaults/AspireWithDapr.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/AspireWithJavaScript/AspireJavaScript.ServiceDefaults/AspireJavaScript.ServiceDefaults.csproj b/samples/AspireWithJavaScript/AspireJavaScript.ServiceDefaults/AspireJavaScript.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/AspireWithJavaScript/AspireJavaScript.ServiceDefaults/AspireJavaScript.ServiceDefaults.csproj
+++ b/samples/AspireWithJavaScript/AspireJavaScript.ServiceDefaults/AspireJavaScript.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/AspireWithNode/AspireWithNode.ServiceDefaults/AspireWithNode.ServiceDefaults.csproj b/samples/AspireWithNode/AspireWithNode.ServiceDefaults/AspireWithNode.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/AspireWithNode/AspireWithNode.ServiceDefaults/AspireWithNode.ServiceDefaults.csproj
+++ b/samples/AspireWithNode/AspireWithNode.ServiceDefaults/AspireWithNode.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/AspireWithPython/AspireWithPython.ServiceDefaults/AspireWithPython.ServiceDefaults.csproj b/samples/AspireWithPython/AspireWithPython.ServiceDefaults/AspireWithPython.ServiceDefaults.csproj
index 6c036a13..90b19efe 100644
--- a/samples/AspireWithPython/AspireWithPython.ServiceDefaults/AspireWithPython.ServiceDefaults.csproj
+++ b/samples/AspireWithPython/AspireWithPython.ServiceDefaults/AspireWithPython.ServiceDefaults.csproj
@@ -12,8 +12,8 @@
-
-
+
+
diff --git a/samples/ClientAppsIntegration/ClientAppsIntegration.AppDefaults/ClientAppsIntegration.AppDefaults.csproj b/samples/ClientAppsIntegration/ClientAppsIntegration.AppDefaults/ClientAppsIntegration.AppDefaults.csproj
index 725c7a87..e5c35391 100644
--- a/samples/ClientAppsIntegration/ClientAppsIntegration.AppDefaults/ClientAppsIntegration.AppDefaults.csproj
+++ b/samples/ClientAppsIntegration/ClientAppsIntegration.AppDefaults/ClientAppsIntegration.AppDefaults.csproj
@@ -11,8 +11,8 @@
-
-
+
+
diff --git a/samples/ClientAppsIntegration/ClientAppsIntegration.ServiceDefaults/ClientAppsIntegration.ServiceDefaults.csproj b/samples/ClientAppsIntegration/ClientAppsIntegration.ServiceDefaults/ClientAppsIntegration.ServiceDefaults.csproj
index ad7e11d2..f907bd11 100644
--- a/samples/ClientAppsIntegration/ClientAppsIntegration.ServiceDefaults/ClientAppsIntegration.ServiceDefaults.csproj
+++ b/samples/ClientAppsIntegration/ClientAppsIntegration.ServiceDefaults/ClientAppsIntegration.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/DatabaseContainers/DatabaseContainers.ServiceDefaults/DatabaseContainers.ServiceDefaults.csproj b/samples/DatabaseContainers/DatabaseContainers.ServiceDefaults/DatabaseContainers.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/DatabaseContainers/DatabaseContainers.ServiceDefaults/DatabaseContainers.ServiceDefaults.csproj
+++ b/samples/DatabaseContainers/DatabaseContainers.ServiceDefaults/DatabaseContainers.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/DatabaseMigrations/DatabaseMigrations.MigrationService/ApiDbInitializer.cs b/samples/DatabaseMigrations/DatabaseMigrations.MigrationService/ApiDbInitializer.cs
index 9d5cde0e..791b54b5 100644
--- a/samples/DatabaseMigrations/DatabaseMigrations.MigrationService/ApiDbInitializer.cs
+++ b/samples/DatabaseMigrations/DatabaseMigrations.MigrationService/ApiDbInitializer.cs
@@ -33,7 +33,7 @@ protected override async Task ExecuteAsync(CancellationToken cancellationToken)
}
catch (Exception ex)
{
- activity?.RecordException(ex);
+ activity?.AddException(ex);
throw;
}
diff --git a/samples/DatabaseMigrations/DatabaseMigrations.ServiceDefaults/DatabaseMigrations.ServiceDefaults.csproj b/samples/DatabaseMigrations/DatabaseMigrations.ServiceDefaults/DatabaseMigrations.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/DatabaseMigrations/DatabaseMigrations.ServiceDefaults/DatabaseMigrations.ServiceDefaults.csproj
+++ b/samples/DatabaseMigrations/DatabaseMigrations.ServiceDefaults/DatabaseMigrations.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/HealthChecksUI/HealthChecksUI.ServiceDefaults/HealthChecksUI.ServiceDefaults.csproj b/samples/HealthChecksUI/HealthChecksUI.ServiceDefaults/HealthChecksUI.ServiceDefaults.csproj
index f7c397de..47139057 100644
--- a/samples/HealthChecksUI/HealthChecksUI.ServiceDefaults/HealthChecksUI.ServiceDefaults.csproj
+++ b/samples/HealthChecksUI/HealthChecksUI.ServiceDefaults/HealthChecksUI.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/Metrics/ServiceDefaults/ServiceDefaults.csproj b/samples/Metrics/ServiceDefaults/ServiceDefaults.csproj
index 57627bc5..033e7df7 100644
--- a/samples/Metrics/ServiceDefaults/ServiceDefaults.csproj
+++ b/samples/Metrics/ServiceDefaults/ServiceDefaults.csproj
@@ -12,10 +12,10 @@
-
+
-
+
diff --git a/samples/OrleansVoting/OrleansVoting.Service/OrleansVoting.Service.csproj b/samples/OrleansVoting/OrleansVoting.Service/OrleansVoting.Service.csproj
index f2e7af1f..9843e4a5 100644
--- a/samples/OrleansVoting/OrleansVoting.Service/OrleansVoting.Service.csproj
+++ b/samples/OrleansVoting/OrleansVoting.Service/OrleansVoting.Service.csproj
@@ -9,8 +9,9 @@
-
-
+
+
+
diff --git a/samples/OrleansVoting/OrleansVoting.ServiceDefaults/OrleansVoting.ServiceDefaults.csproj b/samples/OrleansVoting/OrleansVoting.ServiceDefaults/OrleansVoting.ServiceDefaults.csproj
index 064328a9..b5854466 100644
--- a/samples/OrleansVoting/OrleansVoting.ServiceDefaults/OrleansVoting.ServiceDefaults.csproj
+++ b/samples/OrleansVoting/OrleansVoting.ServiceDefaults/OrleansVoting.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/samples/StandaloneDashboard/ConsoleApp/ConsoleApp.csproj b/samples/StandaloneDashboard/ConsoleApp/ConsoleApp.csproj
index 7b8fc775..0d2cd290 100644
--- a/samples/StandaloneDashboard/ConsoleApp/ConsoleApp.csproj
+++ b/samples/StandaloneDashboard/ConsoleApp/ConsoleApp.csproj
@@ -9,8 +9,8 @@
-
-
+
+
diff --git a/samples/StandaloneDashboard/ConsoleApp/NuGetDownloader.cs b/samples/StandaloneDashboard/ConsoleApp/NuGetDownloader.cs
index 3912ae5e..2d1ccda4 100644
--- a/samples/StandaloneDashboard/ConsoleApp/NuGetDownloader.cs
+++ b/samples/StandaloneDashboard/ConsoleApp/NuGetDownloader.cs
@@ -23,7 +23,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
}
catch (Exception ex)
{
- activity?.RecordException(ex);
+ activity?.AddException(ex);
throw;
}
diff --git a/samples/VolumeMount/VolumeMount.ServiceDefaults/VolumeMount.ServiceDefaults.csproj b/samples/VolumeMount/VolumeMount.ServiceDefaults/VolumeMount.ServiceDefaults.csproj
index d0e5b26a..c4a05057 100644
--- a/samples/VolumeMount/VolumeMount.ServiceDefaults/VolumeMount.ServiceDefaults.csproj
+++ b/samples/VolumeMount/VolumeMount.ServiceDefaults/VolumeMount.ServiceDefaults.csproj
@@ -13,8 +13,8 @@
-
-
+
+