-
Notifications
You must be signed in to change notification settings - Fork 543
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
close #2636: added json schemas for Aspire.Hosting.AppHost and Aspire.Hosting.Azure #4912
close #2636: added json schemas for Aspire.Hosting.AppHost and Aspire.Hosting.Azure #4912
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution, @vladimir-shirmanov!
@@ -16,7 +16,7 @@ | |||
</PropertyGroup> | |||
|
|||
<ItemGroup> | |||
<None Include="**/*.props;**/*.targets" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)" /> | |||
<None Include="**/*.props;**/*.targets;*.json" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<None Include="**/*.props;**/*.targets;*.json" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)" /> | |
<None Include="**/*.props;**/*.targets" Pack="true" PackagePath="%(RecursiveDir)%(Filename)%(Extension)" /> | |
<None Include="AspireAppHostConfiguration.json" Pack="true" /> |
Maybe we should just pack the one file we want, that way we don't accidently start including other .json files we don't intend to put in the nupkg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, fixed it
<Project> | ||
<ItemGroup> | ||
<JsonSchemaSegment Include="$(MSBuildThisFileDirectory)..\AspireAzureConfigurationSchema.json" | ||
FilePathPattern="appsettings\..*json" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of times these properties go into "User Secrets", which is a secrets.json
file. This is a Regex, so I think we should also add secrets.json
to it. @alexgav - did we ever hook up the FilePathPattern correctly in VS?
FilePathPattern="appsettings\..*json" /> | |
FilePathPattern="appsettings\..*json|secrets.json" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to add it, but it didn't work for me. So I skipped for now
@@ -0,0 +1,6 @@ | |||
<Project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we only need a .targets file in buildTransitive
. We shouldn't need the other 2 targets files. Just move this logic in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, removed all unnecessary ones
@@ -19,11 +19,15 @@ | |||
<Compile Include="..\Aspire.Hosting\Dcp\Process\ProcessUtil.cs" Link="Provisioning\Utils\ProcessUtil.cs" /> | |||
<Compile Include="..\Shared\Cosmos\CosmosConstants.cs" Link="Shared\CosmosConstants.cs" /> | |||
</ItemGroup> | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nit) this can be reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah sorry, removed it as well
@eerhardt thank you for the feedback. |
Add some more descriptions and tweak wording.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @vladimir-shirmanov! Thank you for this contribution. This looks good to me. I'm setting it to 'auto-merge' when CI passes.
Description
fixed an issues with intellisense inside appsettings.json when using Aspire.Hosting.AppHost or Aspire.Hosting.Azure
Changes:
This will close #2636
Microsoft Reviewers: Open in CodeFlow