Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dotnet/src/SemanticKernel.AotTests/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System.Diagnostics.CodeAnalysis;
using SemanticKernel.AotTests.UnitTests.Core.Functions;
using SemanticKernel.AotTests.UnitTests.Core.Plugins;
using SemanticKernel.AotTests.UnitTests.Search;
Expand All @@ -19,6 +20,7 @@ private static async Task<int> Main(string[] args)
return success ? 1 : 0;
}

[UnconditionalSuppressMessage("AOT", "IL3050:Calling members annotated with 'RequiresDynamicCodeAttribute' may break functionality when AOT compiling.", Justification = "Test application intentionally tests dynamic code paths. VectorStoreTextSearch LINQ filtering requires reflection for dynamic expression building from runtime filter specifications.")]
private static readonly Func<Task>[] s_unitTests =
[
// Tests for functions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.

using System.Diagnostics.CodeAnalysis;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel;
Expand All @@ -10,6 +11,7 @@ namespace SemanticKernel.AotTests.UnitTests.Search;

internal sealed class VectorStoreTextSearchTests
{
[RequiresDynamicCode("Calls Microsoft.SemanticKernel.Data.VectorStoreTextSearch<TRecord>.GetTextSearchResultsAsync(String, TextSearchOptions, CancellationToken)")]
public static async Task GetTextSearchResultsAsync()
{
// Arrange
Expand Down Expand Up @@ -37,6 +39,7 @@ public static async Task GetTextSearchResultsAsync()
Assert.AreEqual("test-link", results[0].Link);
}

[RequiresDynamicCode("Calls Microsoft.SemanticKernel.Data.VectorStoreTextSearch<TRecord>.GetTextSearchResultsAsync(String, TextSearchOptions, CancellationToken)")]
public static async Task AddVectorStoreTextSearch()
{
// Arrange
Expand Down
Loading