You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance support for file-based apps and optimize AppHost SDK
- Modified Sdk.in.props to auto-import Microsoft.NET.Sdk
- Refined Sdk.in.targets to streamline implicit references and removed workaround targets for file-based apps no longer needed as of rc.2.
- Introduced CSharpAppResource class to represent C# projects or file-based apps which doesn't suppress build of the project.
- Updated DcpExecutor to handle file-based apps with appropriate run commands.
- Enhanced IProjectMetadata to include suppress build functionality.
- Improved ProjectResourceBuilderExtensions to support adding C# projects or file-based apps.
- Updated project templates to reflect changes in SDK references.
- Added unit tests for resource icon resolution to cover file extensions.
<!-- If the AppHost is a file-based app, then force disable AOT and Trimming.
55
-
This can be removed once https://github.com/dotnet/sdk/pull/50885 is merged and flows through to .NET 10 SDK as the values set in Sdk.props will be sufficient. -->
/// <param name="name">The name of the resource. This name will be used for service discovery when referenced in a dependency.</param>
296
+
/// <param name="path">The path to the file-based app file, project file, or project directory.</param>
297
+
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
298
+
/// <remarks>
299
+
/// <para>
300
+
/// This overload of the <see cref="AddCSharpApp(IDistributedApplicationBuilder, string, string)"/> method adds a C# project or file-based app to the application
301
+
/// model using a path to the file-based app .cs file, project file (.csproj), or project directory.
302
+
/// If the path is not an absolute path then it will be computed relative to the app host directory.
303
+
/// </para>
304
+
/// <example>
305
+
/// Add a file-based app to the app model via a file path.
306
+
/// <code lang="csharp">
307
+
/// var builder = DistributedApplication.CreateBuilder(args);
/// <param name="name">The name of the resource. This name will be used for service discovery when referenced in a dependency.</param>
330
+
/// <param name="path">The path to the file-based app file, project file, or project directory.</param>
331
+
/// <param name="configure">An optional action to configure the C# app resource options.</param>
332
+
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
333
+
/// <remarks>
334
+
/// <para>
335
+
/// This overload of the <see cref="AddCSharpApp(IDistributedApplicationBuilder, string, string)"/> method adds a C# project or file-based app to the application
336
+
/// model using a path to the file-based app .cs file, project file (.csproj), or project directory.
337
+
/// If the path is not an absolute path then it will be computed relative to the app host directory.
338
+
/// </para>
339
+
/// <example>
340
+
/// Add a file-based app to the app model via a file path.
341
+
/// <code lang="csharp">
342
+
/// var builder = DistributedApplication.CreateBuilder(args);
// File-based apps are only supported on .NET 10 and later
335
-
thrownewDistributedApplicationException($"File-based apps are only supported on .NET 10 and later. The current version is {version?.ToString()??"unknown"}.");
368
+
// File-based apps are only supported on .NET 10 or later
369
+
thrownewDistributedApplicationException($"File-based apps are only supported on .NET 10 or later. The current version is {version?.ToString()??"unknown"}.");
0 commit comments