diff --git a/dotnet/Makefile b/dotnet/Makefile index 9875de128e00..619c257a8a4e 100644 --- a/dotnet/Makefile +++ b/dotnet/Makefile @@ -304,7 +304,7 @@ TARGETS += $(RUNTIME_PACKS) $(REF_PACKS) $(SDK_PACKS) $(TEMPLATE_PACKS) $(WORKLO define InstallWorkload # .NET comes with a workload for us, but we don't want that, we want our own. So delete the workload that comes with .NET. -.stamp-workload-replace-$1-$(DOTNET_VERSION): +.stamp-workload-replace-$1-$(DOTNET_VERSION): $$(ALL_SCRIPTS) $(Q) echo "Removing existing workload shipped with .NET $(DOTNET_VERSION): $(shell echo $(DOTNET_SDK_MANIFESTS_PATH)/*/microsoft.net.sdk.$3)" $(Q) rm -Rf $(DOTNET_SDK_MANIFESTS_PATH)/*/microsoft.net.sdk.$3 $(Q) rm -Rf $(DOTNET_SDK_MANIFESTS_PATH)/*/workloadsets diff --git a/scripts/template.mk b/scripts/template.mk index 3b7dc96f7398..4efd75ebb987 100644 --- a/scripts/template.mk +++ b/scripts/template.mk @@ -1,6 +1,7 @@ define TemplateScript $(1)=$(TOP)/scripts/$(2)/bin/Debug/$(2).dll $(1)_EXEC=$(DOTNET) exec $$($(1)) +ALL_SCRIPTS+=$(TOP)/scripts/$(2)/bin/Debug/$(2).dll $$($(1)): $$(wildcard $$(TOP)/scripts/$(2)/*.cs) $$(wildcard $$(TOP)/scripts/$(2)/*.csproj) $$(Q) $$(DOTNET) build $(TOP)/scripts/$(2)/*.csproj /bl:$$(TOP)/scripts/$(2)/msbuild.binlog $$(DOTNET_BUILD_VERBOSITY)