Skip to content

Commit c662743

Browse files
authored
Fix sdk publish --no-build (#3068)
* Fix sdk publish --no-build * Update release notes
1 parent 91cda31 commit c662743

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

sdk/Sdk/Targets/Microsoft.Azure.Functions.Worker.Sdk.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
141141
<!-- For publish we have very little targets. Either:
142142
1) It is a publish with build, in which case _FunctionsInnerBuild will already be ran.
143143
2) It is publish no-build, in which case we assume everything is as expected in the output directory already. -->
144-
<Target Name="_FunctionsInnerPublish" BeforeTargets="GetCopyToPublishDirectoryItems" DependsOnTargets="_FunctionsExtensionAssignTargetPaths" />
144+
<Target Name="_FunctionsInnerPublish" BeforeTargets="GetCopyToPublishDirectoryItems" DependsOnTargets="_FunctionsPreBuild;_WorkerExtensionsBuild;_FunctionsExtensionAssignTargetPaths" />
145145

146146
<!-- Invoke restore on WorkerExtension.csproj.
147147
We depend on _GetRestoreSettings, which is a task from nuget targets that will resolve various nuget restore settings.
@@ -154,6 +154,7 @@ WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and
154154
<Target Name="_WorkerExtensionsBuild">
155155
<PropertyGroup>
156156
<_WorkerExtensionTarget>Build</_WorkerExtensionTarget>
157+
<_WorkerExtensionTarget Condition="'$(NoBuild)' == 'true'">GetTargetPath</_WorkerExtensionTarget>
157158
<_WorkerExtensionProperties>Configuration=Release;$(_FunctionsExtensionCommonProps)</_WorkerExtensionProperties>
158159
</PropertyGroup>
159160

sdk/release_notes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
- My change description (#PR/#issue)
55
-->
66

7-
### Microsoft.Azure.Functions.Worker.Sdk <version>
7+
### Microsoft.Azure.Functions.Worker.Sdk 2.0.4
88

9-
- <entry>
9+
- Address issue with `dotnet publish --no-build` producing an error. (#3068)
1010

1111
### Microsoft.Azure.Functions.Worker.Sdk.Generators <version>
1212

0 commit comments

Comments
 (0)