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.IResource, Aspire.Hosting.ApplicationModel.IResourceWithEndpoints, Aspire.Hosting.IResourceWithServiceDiscovery{ // ...}ExecutableResourceIResourceIResourceWithEndpointsIResourceWithServiceDiscovery
Remarks
Section titled Remarks A DotnetProjectResource is added by path and is launched as an executable: dotnet run --project <path> for a project file, or dotnet run --file <path> for a file-based app (a .cs file).
Automatic publishing is not supported. Use AddProject<TProject>(...) or AddCSharpApp(...) for standard .NET project publishing, explicitly configure container publishing with PublishAsDockerFile(...), or exclude an intentionally run-only resource with ExcludeFromManifest().