AspireFileDisplayExtension–part 3–how to use

Now how to use the nuget https://www.nuget.org/packages/AspireFileDisplayExtension/

You will reference the nuget and wrote this kind of code into AppHost.cs

var resDisplayFiles = builder.CreateFileDisplay(36308);
//I want to display AppHost.cs
resDisplayFiles.AddFile(relativePath: "AppHost.cs", lines: ["resDisplayFiles.AddFile"]);
//I want to display test.spec.ts
resDisplayFiles.AddFile(relativePath: "../tests/tests/test.spec.ts", lines: ["makeVideo"]);

And then start the ASPIRE project and browse to http://127.0.0.1:36308/files/AppHost.cs and http://127.0.0.1:36308/files/test.spec.ts

Or you can see the video


Posted

in

,

by

Tags: