-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Make it possible to change when client code generation runs #4924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Done
This issue has been fixed
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Milestone
Comments
dougbu
added a commit
that referenced
this issue
May 30, 2019
- `$(OpenApiGenerateBeforeCompile)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - don't remove `$(TargetFrameworks)` when invoking `OpenApiGetDocuments` target (not necessary) - consolidate into a single `$(GenerateOpenApiReferenceCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiDefaultOutputDirectory)` normalization; never concatenated with anything else - remove dangling `GenerateServiceFileReferenceCode` names
dougbu
added a commit
that referenced
this issue
May 31, 2019
- `$(OpenApiGenerateBeforeCompile)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - don't remove `$(TargetFrameworks)` when invoking `OpenApiGetDocuments` target (not necessary) - consolidate into a single `$(GenerateOpenApiReferenceCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiDefaultOutputDirectory)` normalization; never concatenated with anything else - remove dangling `GenerateServiceFileReferenceCode` names
dougbu
added a commit
that referenced
this issue
Jun 1, 2019
- `$(OpenApiGenerateBeforeCompile)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - don't remove `$(TargetFrameworks)` when invoking `OpenApiGetDocuments` target (not necessary) - consolidate into a single `$(GenerateOpenApiReferenceCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiDefaultOutputDirectory)` normalization; never concatenated with anything else - remove dangling `GenerateServiceFileReferenceCode` names
dougbu
added a commit
that referenced
this issue
Jun 3, 2019
- `$(OpenApiGenerateBeforeCompile)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - don't remove `$(TargetFrameworks)` when invoking `OpenApiGetDocuments` target (not necessary) - consolidate into a single `$(GenerateOpenApiReferenceCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiDefaultOutputDirectory)` normalization; never concatenated with anything else - remove dangling `GenerateServiceFileReferenceCode` names
dougbu
added a commit
that referenced
this issue
Jun 3, 2019
…0641) - `$(OpenApiGenerateCodeOnBuild)` controls if targets run before compile targets - #4924 - also correct multiple invocations when project has multiple target frameworks - `$(OpenApiBuildReferencedProjects)` controls whether `@(OpenApiProjectReference)` items build automatically - #6582 - rename a few other properties and targets also: - add symbols for Microsoft.Extensions.ApiDescription.Client task assembly - #10508 - unconditionally run `OpenApiGetDocuments` target in referenced projects - corrects compilation in design-time builds - no longer uses `@(ProjectReferenceWithConfiguration)`; referenced project chooses all property values nits: - consolidate into a single `$(GenerateOpenApiCodeDependsOn)` property - rename task assembly and namespaces in Microsoft.Extensions.ApiDesription.Client to match the project - allow `OpenApiGetDocuments` targets to run in parallel if `$(BuildInParallel)` is enabled - remove `$(OpenApiCodeDirectory)` normalization; never concatenated with anything else
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-mvc
Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Done
This issue has been fixed
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
Is this a Bug or Feature request?
Enhancement that's part of #4896
Description of the problem
Currently, any project that references the Microsoft.Extensions.ApiDescription.Client will have the
ServiceFileReferenceGenerator
and related targets run unconditionally before theBeforeCompile
target. Make this conditional so that users can configure the targets to run elsewhere in the build pipeline. For example, use$(BuildDependsOn)
,$(CoreBuildDependsOn)
,$(CompileDependsOn)
or$(CoreCompileDependsOn)
and make it conditional on a documented property.Not positive where hook should land but prepending it into
$(BuildDependsOn)
seems better than current spot because the code generation targets do not rely on otherBuild
orCompile
work.Version of
Microsoft.AspNetCore.Mvc
orMicrosoft.AspNetCore.App
orMicrosoft.AspNetCore.All
See the features/client.code.generation branch. That work is intended for the 2.2 Preview 3 milestone.
The text was updated successfully, but these errors were encountered: