-
Notifications
You must be signed in to change notification settings - Fork 540
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
appsettingsschema.json is in use by another process #5837
Comments
I just saw this too after upgrading a project to 9.0. It stuck around in VS until I restarted VS, and I haven't seen it since. |
I see this a bunch too |
@eerhardt Is this something you know about? |
I've only seen this in our repo, and not in a normal application. I believe it is coming from VS and not anything we can do in dotnet/aspire. cc @vijayrkn |
@bradygaster should this go back to backlog? It seems not actionable, given nobody's posted they've been able to repro. I bet it's VS and I"ll keep an eye out for it too. |
Moving to backlog as this isn't actionable. |
Based on the error, this seems to be coming from the following in <Target Name="GenerateCombinedAppSettingsSchemaTarget"
DependsOnTargets="GenerateCombinedComponentSchemaTarget"
Condition=" '@(JsonSchemaSegment)' != '' "
BeforeTargets="CompileDesignTime"
Inputs="$(SchemaGenIncrementalBuildInputs);$(JsonSchemaCombinedFilePath)"
Outputs="$(AppSettingsJsonSchemaCombinedFilePath)">
<GenerateCombinedAppSettingsSchema
AppSettingJsonSchemaFilePath="$(AppSettingJsonSchemaLoadFilePath)"
ComponentJsonSchemaCombinedFilePath="$(JsonSchemaCombinedFilePath)"
AppSettingsJsonSchemaCombinedFilePath="$(AppSettingsJsonSchemaCombinedFilePath)">
</GenerateCombinedAppSettingsSchema>
<Message Text="Generating appsettingsschema" />
</Target> Inside string path = Path.Combine(Path.GetTempPath(), "appsettingsschema.json");
System.IO.File.WriteAllText(path, end); If multiple projects are building in parallel, and hit this at the same time, one or more will fail. That would suggest this problem is more likely to occur with more projects in the solution, which would explain why we see this regularly within the aspire solution, but not so frequently elsewhere. This download should either be reworked to be downloaded once per solution rather than once per project, or use a unique filename to avoid conflicts when multiple projects build at once. I can't find this code in the repo, so I assume this is something Visual Studio specific. |
So this looks like a "simple" parallel build issue? i.e. if multiple projects are using client integrations that contribute JSON schema and they get built in parallel, you can hit this issue because the file name/path is shared. Shouldn't that file be unique per project? |
FYI @JakeRadMSFT potential lead on the issue. |
Ah I see this is the download of the base schema, not the generation of the unique combined schema. |
Is there an existing issue for this?
Describe the bug
I see this error inside VS:
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version info
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: