[dotnet] use copyOnly for .png files in templates (#12016)
Context: https://github.com/dotnet/templating/issues/3325 Context: https://github.com/dotnet/templating/wiki/Reference-for-template.json#content-manipulation In current .NET 6 Preview 6 builds, there is an issue if a template includes a binary file larger than ~8kb, it seems to get truncated when `dotnet new` extracts the template. A workaround is to use the `copyOnly` feature for binary files. Really, we should be doing this anyway, because otherwise the templating system considers replacing *text* in these binary files. It improves performance to do this and would hopefully prevent a future bug of random bytes getting replaced.
This commit is contained in:
Родитель
4914136930
Коммит
69698bea36
|
@ -11,6 +11,13 @@
|
||||||
"type": "project"
|
"type": "project"
|
||||||
},
|
},
|
||||||
"sourceName": "MacCatalystApp1",
|
"sourceName": "MacCatalystApp1",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"source": "./",
|
||||||
|
"target": "./",
|
||||||
|
"copyOnly": "**/*.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{ "path": "MacCatalystApp1.csproj" }
|
{ "path": "MacCatalystApp1.csproj" }
|
||||||
|
|
|
@ -11,6 +11,13 @@
|
||||||
"type": "project"
|
"type": "project"
|
||||||
},
|
},
|
||||||
"sourceName": "iOSApp1",
|
"sourceName": "iOSApp1",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"source": "./",
|
||||||
|
"target": "./",
|
||||||
|
"copyOnly": "**/*.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{ "path": "iOSApp1.csproj" }
|
{ "path": "iOSApp1.csproj" }
|
||||||
|
|
|
@ -11,6 +11,13 @@
|
||||||
"type": "project"
|
"type": "project"
|
||||||
},
|
},
|
||||||
"sourceName": "macOSApp1",
|
"sourceName": "macOSApp1",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"source": "./",
|
||||||
|
"target": "./",
|
||||||
|
"copyOnly": "**/*.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{ "path": "macOSApp1.csproj" }
|
{ "path": "macOSApp1.csproj" }
|
||||||
|
|
|
@ -11,6 +11,13 @@
|
||||||
"type": "project"
|
"type": "project"
|
||||||
},
|
},
|
||||||
"sourceName": "tvOSApp1",
|
"sourceName": "tvOSApp1",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"source": "./",
|
||||||
|
"target": "./",
|
||||||
|
"copyOnly": "**/*.png"
|
||||||
|
}
|
||||||
|
],
|
||||||
"preferNameDirectory": true,
|
"preferNameDirectory": true,
|
||||||
"primaryOutputs": [
|
"primaryOutputs": [
|
||||||
{ "path": "tvOSApp1.csproj" }
|
{ "path": "tvOSApp1.csproj" }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче