diff --git a/Make.config b/Make.config
index db42a91c69..d42bffccab 100644
--- a/Make.config
+++ b/Make.config
@@ -522,6 +522,7 @@ endif
endif
ifdef INCLUDE_MACCATALYST
+DOTNET_PLATFORMS+=MacCatalyst
DOTNET_MACCATALYST_RUNTIME_IDENTIFIERS=maccatalyst-x64
endif
diff --git a/dotnet/Makefile b/dotnet/Makefile
index aad4174cb2..0701b8de1d 100644
--- a/dotnet/Makefile
+++ b/dotnet/Makefile
@@ -7,6 +7,8 @@ DOTNET_MANIFESTS_PATH=$(DOTNET6_DIR)/sdk-manifests/$(DOTNET6_VERSION_BAND)
DOTNET_PACKS_PATH=$(DOTNET6_DIR)/packs
TMP_PKG_DIR=_pkg
+DOTNET_PLATFORMS_UPPERCASE:=$(shell echo $(DOTNET_PLATFORMS) | tr a-z A-Z)
+
# Create variables prefixed with the correctly cased platform name from the upper-cased platform name. This makes some of the next sections somewhat simpler.
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(platform)_NUGET_VERSION_NO_METADATA:=$($(shell echo $(platform) | tr a-z A-Z)_NUGET_VERSION_NO_METADATA)))
diff --git a/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/AutoImport.props b/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/AutoImport.props
new file mode 100644
index 0000000000..bec641d41a
--- /dev/null
+++ b/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/AutoImport.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/Sdk.props b/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/Sdk.props
new file mode 100644
index 0000000000..00494744a8
--- /dev/null
+++ b/dotnet/Microsoft.MacCatalyst.Sdk/Sdk/Sdk.props
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.props b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.props
new file mode 100644
index 0000000000..22928bb3e1
--- /dev/null
+++ b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.props
@@ -0,0 +1,8 @@
+
+
+
+ <_PlatformName>MacCatalyst
+
+
+
+
diff --git a/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets
new file mode 100644
index 0000000000..b4fe76fb6a
--- /dev/null
+++ b/dotnet/Microsoft.MacCatalyst.Sdk/targets/Microsoft.MacCatalyst.Sdk.targets
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/dotnet/Microsoft.NET.Workload.MacCatalyst/WorkloadManifest.targets b/dotnet/Microsoft.NET.Workload.MacCatalyst/WorkloadManifest.targets
new file mode 100644
index 0000000000..57c494584e
--- /dev/null
+++ b/dotnet/Microsoft.NET.Workload.MacCatalyst/WorkloadManifest.targets
@@ -0,0 +1,3 @@
+
+
+
diff --git a/dotnet/package/Microsoft.MacCatalyst.Ref/package.csproj b/dotnet/package/Microsoft.MacCatalyst.Ref/package.csproj
new file mode 100644
index 0000000000..ee642cbf8b
--- /dev/null
+++ b/dotnet/package/Microsoft.MacCatalyst.Ref/package.csproj
@@ -0,0 +1,8 @@
+
+
+
+ <_PlatformName>MacCatalyst
+
+
+
+
diff --git a/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-arm64/package.csproj b/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-arm64/package.csproj
new file mode 100644
index 0000000000..394c0be4f8
--- /dev/null
+++ b/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-arm64/package.csproj
@@ -0,0 +1,9 @@
+
+
+
+ <_PlatformName>MacCatalyst
+ <_RuntimeIdentifier>maccatalyst-arm64
+
+
+
+
diff --git a/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-x64/package.csproj b/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-x64/package.csproj
new file mode 100644
index 0000000000..e9bc9ce073
--- /dev/null
+++ b/dotnet/package/Microsoft.MacCatalyst.Runtime.maccatalyst-x64/package.csproj
@@ -0,0 +1,9 @@
+
+
+
+ <_PlatformName>MacCatalyst
+ <_RuntimeIdentifier>maccatalyst-x64
+
+
+
+
diff --git a/dotnet/package/Microsoft.MacCatalyst.Sdk/package.csproj b/dotnet/package/Microsoft.MacCatalyst.Sdk/package.csproj
new file mode 100644
index 0000000000..080ff5c163
--- /dev/null
+++ b/dotnet/package/Microsoft.MacCatalyst.Sdk/package.csproj
@@ -0,0 +1,8 @@
+
+
+
+ <_PlatformName>MacCatalyst
+
+
+
+
diff --git a/dotnet/package/common.csproj b/dotnet/package/common.csproj
index 0ab5646294..5de6a5c215 100644
--- a/dotnet/package/common.csproj
+++ b/dotnet/package/common.csproj
@@ -23,6 +23,7 @@
<_AssemblyInfix Condition="'$(_PlatformName)' == 'tvOS'">TVOS
<_AssemblyInfix Condition="'$(_PlatformName)' == 'watchOS'">WatchOS
<_AssemblyInfix Condition="'$(_PlatformName)' == 'macOS'">Mac
+ <_AssemblyInfix Condition="'$(_PlatformName)' == 'MacCatalyst'">MacCatalyst
diff --git a/dotnet/targets/Xamarin.Shared.Sdk.targets b/dotnet/targets/Xamarin.Shared.Sdk.targets
index 589934ae83..5750125ca9 100644
--- a/dotnet/targets/Xamarin.Shared.Sdk.targets
+++ b/dotnet/targets/Xamarin.Shared.Sdk.targets
@@ -101,6 +101,7 @@
<_PlatformAssemblyName Condition=" '$(_PlatformName)' == 'tvOS' ">Xamarin.TVOS
<_PlatformAssemblyName Condition=" '$(_PlatformName)' == 'watchOS' ">Xamarin.WatchOS
<_PlatformAssemblyName Condition=" '$(_PlatformName)' == 'macOS' ">Xamarin.Mac
+ <_PlatformAssemblyName Condition=" '$(_PlatformName)' == 'MacCatalyst' ">Xamarin.MacCatalyst
diff --git a/runtime/Makefile b/runtime/Makefile
index 1706646f71..f65e3ab625 100644
--- a/runtime/Makefile
+++ b/runtime/Makefile
@@ -216,6 +216,8 @@ ifdef INCLUDE_DEVICE
$(eval $(call PlatformTemplate,iphoneos,IPHONEOS,armv7 armv7s arm64))
endif
$(eval $(call PlatformTemplate,iphonesimulator,IOSSIMULATOR,x86 x86_64))
+endif
+ifdef INCLUDE_MACCATALYST
$(eval $(call PlatformTemplate,maccatalyst,MACCATALYST,x86_64))
endif
@@ -616,6 +618,9 @@ $(eval $(call DotNetLipoLibTemplate,watchOS,watchos-arm,watchos,armv7k arm64_32)
endif
endif
$(eval $(call DotNetCopyLibTemplate,macOS,osx-x64,mac,x86_64))
+ifdef INCLUDE_MACCATALYST
+$(eval $(call DotNetCopyLibTemplate,MacCatalyst,maccatalyst-x64,maccatalyst,x86_64))
+endif
define DotNetFrameworkTemplate
DOTNET_TARGETS += \
@@ -648,7 +653,7 @@ $(DOTNET_DESTDIR)/Microsoft.$(1).Runtime.$(2)/runtimes/$(2)/native/Frameworks/%:
endef
# macOS does not have the Xamarin[-debug].framework frameworks
-$(foreach platform,$(filter-out macOS,$(DOTNET_PLATFORMS)),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call DotNetFrameworkTemplate,$(platform),$(rid)))))
+$(foreach platform,$(filter-out macOS MacCatalyst,$(DOTNET_PLATFORMS)),$(foreach rid,$(DOTNET_$(platform)_RUNTIME_IDENTIFIERS),$(eval $(call DotNetFrameworkTemplate,$(platform),$(rid)))))
# If the RID represents fewer architectures than the library in .libs, then use the LipoTemplate, otherwise the CopyTemplate
ifdef INCLUDE_IOS