Skip to content

Add mechanism to disable project build for ProjectServiceReference #6582

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

Closed
JunTaoLuo opened this issue Jan 10, 2019 · 5 comments
Closed

Add mechanism to disable project build for ProjectServiceReference #6582

JunTaoLuo opened this issue Jan 10, 2019 · 5 comments
Assignees
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

Comments

@JunTaoLuo
Copy link
Contributor

From the meeting, it seems like a ProjectServiceReference requires the project referenced to be built. We'd like to add a mechanism to disable this requirement since it would be redundant in GRPC scenarios.

cc @dougbu @rynowak

@JunTaoLuo JunTaoLuo added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Jan 10, 2019
@dougbu dougbu added 1 - Ready enhancement This issue represents an ask for new feature or an enhancement to an existing one labels Jan 11, 2019
@dougbu dougbu self-assigned this Jan 11, 2019
@dougbu dougbu added this to the ClientCodeGen milestone Jan 11, 2019
@glennc
Copy link
Contributor

glennc commented Jan 16, 2019

In addition, when working on this issue, we currently are over-zealous in not doing work. Which means we aren't always generating a new client when the server changes. We need to fix that :).

@mkArtakMSFT mkArtakMSFT modified the milestones: ClientCodeGen, 3.0.0-preview5 Feb 6, 2019
@mkArtakMSFT
Copy link
Contributor

@glennc and @dougbu please sync up regarding this during your next sync up meeting.

@dougbu
Copy link
Contributor

dougbu commented Apr 16, 2019

We sync'd up.

This property (renamed to $(OpenApiGenerateOnBuild)) remains useful after the client / server split. Will control whether projects with (say) an NSwag.AspNetCore dependency get generated JSON files in their project. When false, the documents will not be saved to disk unless the user manually runs one of the CLI tools or hooks an <Exec/> of a tool into their project.

@dougbu
Copy link
Contributor

dougbu commented Apr 18, 2019

This will come just after #8242

@dougbu dougbu added Working and removed 1 - Ready labels May 29, 2019
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
@dougbu
Copy link
Contributor

dougbu commented Jun 3, 2019

2567233

@dougbu dougbu closed this as completed Jun 3, 2019
@dougbu dougbu added Done This issue has been fixed and removed Working labels Jun 3, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
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
Projects
None yet
Development

No branches or pull requests

4 participants