diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvedFile.cs b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvedFile.cs index f0a227e2e940..e4a3031836c8 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/ResolvedFile.cs +++ b/src/Tasks/Microsoft.NET.Build.Tasks/ResolvedFile.cs @@ -70,6 +70,11 @@ public ResolvedFile(ITaskItem item, bool isRuntimeTarget) { Asset = AssetType.Resources; } + // Workaround for issue 40015: nuget restore uses 'resource' instead of 'resources' + else if (assetType.Equals("resource", StringComparison.OrdinalIgnoreCase)) + { + Asset = AssetType.Resources; + } else { throw new InvalidOperationException($"Unrecognized AssetType '{assetType}' for {SourcePath}");