Skip to content

Commit

Permalink
Another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
barthamark committed Feb 27, 2025
1 parent 45ae722 commit 8ef1e76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ public static Task ExecuteEmailClientSampleRecipeDirectlyAsync(this UITestContex
public static Task InitSampleEmailsAsync(this UITestContext context)
{
var basePath = Path.Combine(AppContext.BaseDirectory, "TestEmails");

// If not found, use the NuGet contentFiles path.
if (!Directory.Exists(basePath))
{
basePath = Path.Combine(AppContext.BaseDirectory, "contentFiles", "any", "net8.0", "TestEmails");
}

return context.CreateAndUseLocalSmtpClientToSendEmailsFromFilesAsync([
Path.Combine(basePath, "sample_important_1.eml"),
Path.Combine(basePath, "sample_important_2.eml"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</ItemGroup>

<ItemGroup>
<Content Include="TestEmails\*.eml" CopyToOutputDirectory="PreserveNewest" Pack="true" PackagePath="TestEmails" />
<Content Include="TestEmails\*.eml" Pack="true" PackagePath="contentFiles/any/net8.0/TestEmails" />
</ItemGroup>

</Project>

0 comments on commit 8ef1e76

Please sign in to comment.