Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -987,10 +987,11 @@ Copyright (c) .NET Foundation. All rights reserved.
<PropertyGroup>
<!-- IntermediateDepsFilePath is the location where the deps.json file is originally created
PublishDepsFilePath is the location where the deps.json resides when published
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update the comments here to say:
In the single-file case, we write deps file to intermediate dir, and it is bundled into the single-file app.
In the non-single-file case, we write deps file directly in the publish directory due to legacy reasons.

PublishDepsFilePath is empty (by default) for PublishSingleFile, since the deps.json file is embedde within the single-file bundle -->
PublishDepsFilePath is empty (by default) for PublishSingleFile, since the deps.json file is embedded within the single-file bundle -->
<IntermediateDepsFilePath Condition=" '$(PublishDepsFilePath)' != ''">$(PublishDepsFilePath)</IntermediateDepsFilePath >
<IntermediateDepsFilePath Condition=" '$(PublishDepsFilePath)' == ''">$(IntermediateOutputPath)$(ProjectDepsFileName)</IntermediateDepsFilePath >
<PublishDepsFilePath Condition=" '$(PublishDepsFilePath)' == '' And '$(PublishSingleFile)' != 'true'">$(PublishDir)$(ProjectDepsFileName)</PublishDepsFilePath>
<IntermediateDepsFilePath Condition=" '$(PublishDepsFilePath)' == '' And '$(PublishSingleFile)' != 'true'">$(PublishDir)$(ProjectDepsFileName)</IntermediateDepsFilePath>
<IntermediateDepsFilePath Condition=" '$(IntermediateDepsFilePath)' == ''">$(IntermediateOutputPath)$(ProjectDepsFileName)</IntermediateDepsFilePath >
<PublishDepsFilePath Condition=" '$(PublishDepsFilePath)' == '' And '$(PublishSingleFile)' != 'true'">$(IntermediateDepsFilePath)</PublishDepsFilePath>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the deps.json file is directly written to the publish directory, it should be removed from ResolvedFileToPublish here in the non-single-file case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, I'm not sure its a good idea to write to the publish directory -- before CopyFilesToPublishDirectory has run -- because something may be introduced into ResolvedFileToPublish that overwrites this file. Isn't it?

CC: @dsplaisted

</PropertyGroup>
<ItemGroup>
<ResolvedCompileFileDefinitions Remove="@(_PublishConflictPackageFiles)" Condition="'%(_PublishConflictPackageFiles.ConflictItemType)' == 'Reference'" />
Expand Down Expand Up @@ -1030,7 +1031,7 @@ Copyright (c) .NET Foundation. All rights reserved.
IncludeRuntimeFileVersions="$(IncludeFileVersionsInDependencyFile)"
RuntimeGraphPath="$(BundledRuntimeIdentifierGraphFile)"/>

<ItemGroup>
<ItemGroup Condition=" '$(IntermediateDepsFilePath)' != '$(PublishDepsFilePath)' ">
<ResolvedFileToPublish Include="$(IntermediateDepsFilePath)">
<RelativePath>$(ProjectDepsFileName)</RelativePath>
</ResolvedFileToPublish>
Expand Down