diff --git a/eng/Versions.props b/eng/Versions.props index 8564178d7e54..9bf9ce613699 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -15,6 +15,7 @@ 15.4.8 15.4.8 2.1.0-preview2-26306-03 + 3.0.0-preview5-27615-04 2.0.1-servicing-26011-01 9.0.1 5.0.0-rtm.5821 diff --git a/src/Assets/TestProjects/HelloWorldWithSubDirs/HelloWorldWithSubDirs.csproj b/src/Assets/TestProjects/HelloWorldWithSubDirs/HelloWorldWithSubDirs.csproj new file mode 100644 index 000000000000..c24b9a827154 --- /dev/null +++ b/src/Assets/TestProjects/HelloWorldWithSubDirs/HelloWorldWithSubDirs.csproj @@ -0,0 +1,18 @@ + + + + Exe + netcoreapp3.0 + + + + + PreserveNewest + + + PreserveNewest + $(ExcludeContent) + + + + diff --git a/src/Assets/TestProjects/HelloWorldWithSubDirs/Program.cs b/src/Assets/TestProjects/HelloWorldWithSubDirs/Program.cs new file mode 100644 index 000000000000..27469c19e660 --- /dev/null +++ b/src/Assets/TestProjects/HelloWorldWithSubDirs/Program.cs @@ -0,0 +1,17 @@ +using System; +using System.IO; +using System.Reflection; + +namespace HelloWorldWithSubDirs +{ + class Program + { + static void Main(string[] args) + { + string baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + string hello = File.ReadAllText(Path.Combine(baseDir, "SmallNameDir", "word")); + string world = File.ReadAllText(Path.Combine(baseDir, "SmallNameDir", "This is a directory with a really long name for one that only contains a small file", ".word")); + Console.WriteLine($"{hello} {world}"); + } + } +} diff --git a/src/Assets/TestProjects/HelloWorldWithSubDirs/Signature.stamp b/src/Assets/TestProjects/HelloWorldWithSubDirs/Signature.stamp new file mode 100644 index 000000000000..11cfda16d9b2 --- /dev/null +++ b/src/Assets/TestProjects/HelloWorldWithSubDirs/Signature.stamp @@ -0,0 +1 @@ +Signed by .Net Core SDK devs. \ No newline at end of file diff --git a/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/This is a directory with a really long name for one that only contains a small file/.word b/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/This is a directory with a really long name for one that only contains a small file/.word new file mode 100644 index 000000000000..e5b8f9cece33 --- /dev/null +++ b/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/This is a directory with a really long name for one that only contains a small file/.word @@ -0,0 +1 @@ +World! \ No newline at end of file diff --git a/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/word b/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/word new file mode 100644 index 000000000000..5ab2f8a4323a --- /dev/null +++ b/src/Assets/TestProjects/HelloWorldWithSubDirs/SmallNameDir/word @@ -0,0 +1 @@ +Hello \ No newline at end of file diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 46a7002eebdf..6b3b2cfbd2df 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -505,4 +505,16 @@ The following are names of parameters or literal values and should not be transl NETSDK1096: Optimizing assemblies for performance failed. You can either exclude the failing assemblies from being optimized, or set the ReadyToRun property to false. {StrBegin="NETSDK1096: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index ed5960f162e5..b6c8a7a2975f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -107,6 +107,21 @@ NETSDK1031: Sestavení nebo publikování nezávislé aplikace bez zadání parametru RuntimeIdentifier není podporované. Zadejte prosím buď parametr RuntimeIdentifier, nebo nastavte parametr SelfContained na hodnotu False. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: Hodnota TargetFramework {0} nebyla rozpoznána. Je možné, že obsahuje překlepy. Pokud tomu tak není, musíte vlastnosti TargetFrameworkIdentifier a TargetFrameworkVersion zadat explicitně. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index f8327e381027..a16414661a2b 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -107,6 +107,21 @@ NETSDK1031: Das Erstellen oder Veröffentlichen einer eigenständigen Anwendung ohne die Angabe eines RuntimeIdentifier wird nicht unterstützt. Geben Sie entweder einen RuntimeIdentifier an, oder legen Sie für SelfContained "False" fest. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: Der TargetFramework-Wert "{0}" wurde nicht erkannt. Unter Umständen ist die Schreibweise nicht korrekt. Andernfalls müssen die Eigenschaften TargetFrameworkIdentifier und/oder TargetFrameworkVersion explizit angegeben werden. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 5fdafc4b124a..167f0a7d6472 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -107,6 +107,21 @@ NETSDK1031: No se admite compilar o publicar una aplicación autocontenida sin especificar un valor para RuntimeIdentifier. Especifique un valor para RuntimeIdentifier o establezca SelfContained en false. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: El valor de TargetFramework "{0}" no se reconoció. Puede que esté mal escrito. Si este no es el caso, las propiedades TargetFrameworkIdentifier o TargetFrameworkVersion se deben especificar explícitamente. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index e1280b69fa23..ed5cf37a14a6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -107,6 +107,21 @@ NETSDK1031: La génération ou la publication d'une application autonome sans spécification de RuntimeIdentifier n'est pas prise en charge. Spécifiez RuntimeIdentifier ou affectez la valeur false à SelfContained. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: La valeur TargetFramework '{0}' n'a pas été reconnue. Elle est peut-être mal orthographiée. Sinon, vous devez spécifier explicitement les propriétés TargetFrameworkIdentifier et/ou TargetFrameworkVersion. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 2377fbbd797f..1b06248c68a7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -107,6 +107,21 @@ NETSDK1031: non è possibile compilare o pubblicare un'applicazione indipendente senza specificare un elemento RuntimeIdentifier. Specificare un elemento RuntimeIdentifier o impostare SelfContained su false. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: il valore {0}' di TargetFramework non è stato riconosciuto. È possibile che sia stato digitato in modo errato. In caso contrario, le proprietà TargetFrameworkIdentifier e/o TargetFrameworkVersion devono essere specificate in modo esplicito. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index c73e0027ba35..1c4005ddd1e4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -107,6 +107,21 @@ NETSDK1031: RuntimeIdentifier を指定せずに自己完結型アプリケーションをビルドおよび発行することはサポートされていません。RuntimeIdentifier を指定するか SelfContained を false に設定してください。 {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: TargetFramework 値 '{0}' が認識されませんでした。つづりが間違っている可能性があります。間違っていない場合は、TargetFrameworkIdentifier または TargetFrameworkVersion プロパティ (あるいはその両方) を明示的に指定する必要があります。 @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 3bec18472b0c..6d1c9851a2a5 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -107,6 +107,21 @@ NETSDK1031: RuntimeIdentifier를 지정하지 않으면 자체 포함 애플리케이션의 빌드 또는 게시가 지원되지 않습니다. RuntimeIdentifier를 지정하거나 SelfContained를 false로 설정하세요. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: TargetFramework 값 '{0}'을(를) 인식하지 못했습니다. 철자가 틀렸을 수 있습니다. 그렇지 않은 경우 TargetFrameworkIdentifier 및/또는 TargetFrameworkVersion 속성을 명시적으로 지정해야 합니다. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index bb871f4e4b4f..0dea4520ce11 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -107,6 +107,21 @@ NETSDK1031: Kompilowanie i publikowanie aplikacji autonomicznej bez określania elementu RuntimeIdentifier nie jest obsługiwane. Określ element RuntimeIdentifier lub ustaw wartość false dla elementu SelfContained. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: Nie rozpoznano wartości „{0}” elementu TargetFramework. Być może wpisano ją niepoprawnie. Jeśli nie, należy jawnie określić właściwości TargetFrameworkIdentifier i/lub TargetFrameworkVersion. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 7979dc3c4502..a148c162a105 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -107,6 +107,21 @@ NETSDK1031: Não há suporte para criar ou publicar um aplicativo autossuficiente sem especificar um RuntimeIdentifier. Especifique um RuntimeIdentifier ou defina SelfContained como falso. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: O valor '{0}' do TargetFramework não foi reconhecido. Ele pode ter sido escrito com ortografia incorreta. Caso contrário, as propriedades TargetFrameworkIdentifier e/ou TargetFrameworkVersion precisarão ser especificadas explicitamente. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index b963a4992dc4..5e003c82258d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -107,6 +107,21 @@ NETSDK1031: сборка или публикация автономного приложения без указания RuntimeIdentifier не поддерживается. Укажите RuntimeIdentifier или присвойте свойству SelfContained значение "false". {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: значение "{0}" в TargetFramework не распознано. Возможно, оно содержит опечатку. Если это не так, задайте свойства TargetFrameworkIdentifier и (или) TargetFrameworkVersion явным образом. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 1f0b0fd5182e..fb437b941a59 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -107,6 +107,21 @@ NETSDK1031: Bir RuntimeIdentifier belirtilmeden, bağımsız çalışan uygulamanın derlenmesi veya yayımlanması desteklenmez. Lütfen bir RuntimeIdentifier belirtin veya SelfContained değerini false olarak ayarlayın. {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: '{0}' TargetFramework değeri tanınmadı. Yanlış yazılmış olabilir. Sorun bundan kaynaklanmıyorsa, TargetFrameworkIdentifier ve/veya TargetFrameworkVersion özelliklerinin açık bir şekilde belirtilmesi gerekir. @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 3e2e7258eb26..6d0870609ede 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -107,6 +107,21 @@ NETSDK1031: 不可在未指定 RuntimeIdentifier 的情况下生成或发布自包含应用程序。请指定 RuntimeIdentifier 或将 SelfContained 设置为 false。 {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: 未识别 TargetFramework 值“{0}”。可能是因为拼写错误。如果拼写正确,必须显式指定 TargetFrameworkIdentifier 和/或 TargetFrameworkVersion 属性。 @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 4c5a116dfa1d..ac139148d1f3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -107,6 +107,21 @@ NETSDK1031: 不支援在未指定 RuntimeIdentifier 的情況下,建置或發行獨立的應用程式。請指定 RuntimeIdentifier,或將 SelfContained 設為 False。 {StrBegin="NETSDK1031: "} + + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + NETSDK1097: It is not supported to publish an application to a single-file without specifying a RuntimeIdentifier. Please either specify a RuntimeIdentifier or set PublishSingleFile to false. + {StrBegin="NETSDK1097: "} + + + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + NETSDK1098: Applications published to a single-file are required to use the application host. Please either set PublishSingleFile to false or set UseAppHost to true. + {StrBegin="NETSDK1098: "} + + + NETSDK1099: Publishing to a single-file is only supported for executable applications. + NETSDK1099: Publishing to a single-file is only supported for executable applications. + {StrBegin="NETSDK1099: "} + NETSDK1013: The TargetFramework value '{0}' was not recognized. It may be misspelled. If not, then the TargetFrameworkIdentifier and/or TargetFrameworkVersion properties must be specified explicitly. NETSDK1013: 無法辨識 TargetFramework 值 '{0}'。拼字可能有誤。若非此情況,即必須明確指定 TargetFrameworkIdentifier 及 (或) TargetFrameworkVersion 屬性。 @@ -488,4 +503,4 @@ The following are names of parameters or literal values and should not be transl - \ No newline at end of file + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs new file mode 100644 index 000000000000..2a1cd546e953 --- /dev/null +++ b/src/Tasks/Microsoft.NET.Build.Tasks/GenerateBundle.cs @@ -0,0 +1,38 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +using Microsoft.Build.Framework; +using Microsoft.NET.HostModel.Bundle; +using System; +using System.Collections.Generic; + +namespace Microsoft.NET.Build.Tasks +{ + public class GenerateBundle : TaskBase + { + [Required] + public ITaskItem[] FilesToBundle { get; set; } + [Required] + public string AppHostName { get; set; } + [Required] + public bool IncludeSymbols { get; set; } + [Required] + public string OutputDir { get; set; } + [Required] + public bool ShowDiagnosticOutput { get; set; } + + protected override void ExecuteCore() + { + var bundler = new Bundler(AppHostName, OutputDir, IncludeSymbols, ShowDiagnosticOutput); + var fileSpec = new List(FilesToBundle.Length); + + foreach (var item in FilesToBundle) + { + fileSpec.Add(new FileSpec(sourcePath: item.ItemSpec, + bundleRelativePath:item.GetMetadata(MetadataKeys.RelativePath))); + } + + bundler.GenerateBundle(fileSpec); + } + } +} diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj index d302f06b7f34..9410041e9314 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj +++ b/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj @@ -45,6 +45,7 @@ + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets index a131a747d738..51cf7dfb4d07 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets @@ -48,6 +48,7 @@ Copyright (c) .NET Foundation. All rights reserved. PrepareForPublish; ComputeAndCopyFilesToPublishDirectory; GeneratePublishDependencyFile; + BundlePublishDirectory; @@ -85,6 +86,9 @@ Copyright (c) .NET Foundation. All rights reserved. --> + + $(PublishDir)\ @@ -111,6 +115,8 @@ Copyright (c) .NET Foundation. All rights reserved. CopyFilesToPublishDirectory Copy all build outputs, satellites and other necessary files to the publish directory. + When publishing to a single file, only those files that are not bundled are copied. + The remaining files are directly written to the bundle file. ============================================================ --> + + <_ResolvedUnbundledFileToPublishPreserveNewest + Include="@(_ResolvedFileToPublishPreserveNewest)" + Condition="'$(PublishSingleFile)' != 'true' or + '%(_ResolvedFileToPublishPreserveNewest.ExcludeFromSingleFile)'=='true'" /> + + - + + <_ResolvedUnbundledFileToPublishAlways + Include="@(_ResolvedFileToPublishAlways)" + Condition="'$(PublishSingleFile)' != 'true' or + '%(_ResolvedFileToPublishAlways.ExcludeFromSingleFile)'=='true'" /> + + - - + <_ResolvedFileToPublishPreserveNewest Include="@(ResolvedFileToPublish)" - Condition="'%(ResolvedFileToPublish.CopyToPublishDirectory)'=='PreserveNewest'" /> + Condition="'%(ResolvedFileToPublish.CopyToPublishDirectory)'=='PreserveNewest'" /> <_ResolvedFileToPublishAlways Include="@(ResolvedFileToPublish)" - Condition="'%(ResolvedFileToPublish.CopyToPublishDirectory)'=='Always'" /> + Condition="'%(ResolvedFileToPublish.CopyToPublishDirectory)'=='Always'" /> - @@ -574,7 +596,7 @@ Copyright (c) .NET Foundation. All rights reserved. a non-empty value and the original behavior will be restored. --> <_GCTPDIKeepDuplicates>false - <_GCTPDIKeepMetadata>CopyToPublishDirectory;TargetPath + <_GCTPDIKeepMetadata>CopyToPublishDirectory;ExcludeFromSingleFile;TargetPath @@ -719,6 +741,45 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + + <_FilesToBundle Include="@(_ResolvedFileToPublishPreserveNewest)" + Condition="'%(_ResolvedFileToPublishPreserveNewest.ExcludeFromSingleFile)' != 'true'"/> + <_FilesToBundle Include="@(_ResolvedFileToPublishAlways)" + Condition="'%(_ResolvedFileToPublishPreserveNewest.ExcludeFromSingleFile)' != 'true'"/> + + + + + + + + + false + + + + + +