DotnetProjectResource
Classnet10.0
A resource that represents a specified C# project or file-based app added by path.
namespace Aspire.Hosting.Dotnet;
public class DotnetProjectResource : Aspire.Hosting.ApplicationModel.ExecutableResource, Aspire.Hosting.ApplicationModel.IContainerFilesDestinationResource, Aspire.Hosting.ApplicationModel.IDotnetProgramResource, Aspire.Hosting.ApplicationModel.IResource, Aspire.Hosting.ApplicationModel.IResourceWithEndpoints, Aspire.Hosting.IResourceWithServiceDiscovery{ // ...}ExecutableResourceIContainerFilesDestinationResourceIDotnetProgramResourceIResourceIResourceWithEndpointsIResourceWithServiceDiscovery
Remarks
Section titled Remarks A Dotnet is added by path and is launched as an executable: dotnet run - for a project file, or dotnet run - for a file-based app (a .cs file).
Resources created by Add support the same .NET SDK container-publishing pipeline as resources created by Add. A directly constructed resource must be given project metadata and explicitly configured for publishing by its builder.
Constructors1
Section titled Constructors Initializes a new instance of the
DotnetProjectResource class.