Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug with dotnet publish -p:Foo #30265

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Cli/Microsoft.DotNet.Cli.Utils/MSBuildPropertyParser.cs
Expand Up @@ -10,6 +10,10 @@

namespace Microsoft.DotNet.Cli.Utils;

/// <summary>
/// Parses property key value pairs that have already been forwarded through the PropertiesOption class.
/// Does not parse -p and etc. formats, (this is done by PropertiesOption) but does parse property values separated by =, ;, and using quotes.
/// </summary>
public static class MSBuildPropertyParser {
public static IEnumerable<(string key, string value)> ParseProperties(string input) {
var currentPos = 0;
Expand Down
9 changes: 6 additions & 3 deletions src/Cli/dotnet/ReleasePropertyProjectLocator.cs
Expand Up @@ -280,10 +280,13 @@ private bool IsValidSlnFilePath(string path)

string[] globalPropEnumerable = _parseResult.GetValue(CommonOptions.PropertiesOption);

foreach (var keyEqVal in globalPropEnumerable)
foreach (var keyEqValString in globalPropEnumerable)
{
string[] keyValuePair = keyEqVal.Split("=", 2);
globalProperties[keyValuePair[0]] = keyValuePair[1];
var propertyPairs = MSBuildPropertyParser.ParseProperties(keyEqValString);
foreach (var propertyKeyValue in propertyPairs)
{
globalProperties[propertyKeyValue.key] = propertyKeyValue.value;
}
}
return globalProperties;
}
Expand Down
Expand Up @@ -148,7 +148,7 @@
<value>The project to pack, defaults to the project file in the current directory. Can be a path to any project file</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</value>
<value>The configuration to use for building the package. The default is 'Release'.</value>
</data>
<data name="CmdNoLogo" xml:space="preserve">
<value>Do not display the startup banner or the copyright message.</value>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Konfigurace, která se má použít k sestavení balíčku. Výchozí hodnota je Debug. Pomocí vlastnosti PackRelease nastavte release jako výchozí pro tento příkaz.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Konfigurace, která se má použít k sestavení balíčku. Výchozí hodnota je Debug. Pomocí vlastnosti PackRelease nastavte release jako výchozí pro tento příkaz.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Die Konfiguration, die zum Erstellen des Pakets verwendet werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PackRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Die Konfiguration, die zum Erstellen des Pakets verwendet werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PackRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Configuración que se va a usar para compilar el paquete. El valor predeterminado es "Debug". Use la propiedad "PackRelease" para que "Release" sea el valor predeterminado para este comando.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Configuración que se va a usar para compilar el paquete. El valor predeterminado es "Debug". Use la propiedad "PackRelease" para que "Release" sea el valor predeterminado para este comando.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">La configuration à utiliser pour construire le package. La valeur par défaut est 'Débogage'. Utilisez la propriété `PackRelease` pour faire de 'Release' la valeur par défaut pour cette commande.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">La configuration à utiliser pour construire le package. La valeur par défaut est 'Débogage'. Utilisez la propriété `PackRelease` pour faire de 'Release' la valeur par défaut pour cette commande.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Configurazione da usare per compilare il pacchetto. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PackRelease' per rendere 'Release' il valore predefinito per questo comando.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Configurazione da usare per compilare il pacchetto. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PackRelease' per rendere 'Release' il valore predefinito per questo comando.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">パッケージのビルドに使用する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PackRelease' プロパティを使用します。</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">パッケージのビルドに使用する構成。既定値は 'Debug' です。'Release' をこのコマンドの既定値にするには、'PackRelease' プロパティを使用します。</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">패키지를 빌드하는 데 사용할 구성입니다. 기본값은 '디버그'입니다. `PackRelease` 속성을 사용하여 'Release'를 이 명령의 기본값으로 설정합니다.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">패키지를 빌드하는 데 사용할 구성입니다. 기본값은 '디버그'입니다. `PackRelease` 속성을 사용하여 'Release'를 이 명령의 기본값으로 설정합니다.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Konfiguracja używana do kompilowania pakietu. Wartość domyślna to „Debug”. Użyj właściwości „PackRelease”, aby ustawienie „Release” było domyślne dla tego polecenia.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Konfiguracja używana do kompilowania pakietu. Wartość domyślna to „Debug”. Użyj właściwości „PackRelease”, aby ustawienie „Release” było domyślne dla tego polecenia.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">A configuração a ser usada para compilar o pacote. O padrão é 'Depurar'. Use a propriedade `PackRelease` para tornar 'Release' o padrão para este comando.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">A configuração a ser usada para compilar o pacote. O padrão é 'Depurar'. Use a propriedade `PackRelease` para tornar 'Release' o padrão para este comando.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Конфигурация для сборки пакета. По умолчанию используется Debug. Используйте свойство PackRelease, чтобы сделать Release стандартом для этой команды.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Конфигурация для сборки пакета. По умолчанию используется Debug. Используйте свойство PackRelease, чтобы сделать Release стандартом для этой команды.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Paket derlemede kullanmak için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PackRelease' özelliğini kullanın.</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">Paket derlemede kullanmak için yapılandırma. Varsayılan değer: 'Debug'. Bu komutta, 'Release' komutunu varsayılan yapmak için 'PackRelease' özelliğini kullanın.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">用于生成包的配置。默认值为 “Debug”。使用 `PackRelease` 属性将 “Release” 作为此命令的默认值。</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">用于生成包的配置。默认值为 “Debug”。使用 `PackRelease` 属性将 “Release” 作为此命令的默认值。</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -58,8 +58,8 @@
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to use for building the package. The default is 'Debug'. Use the `PackRelease` property to make 'Release' the default for this command.</source>
<target state="translated">將用以組建套件的設定。預設值為 'Debug'。使用 'PackRelease' 屬性將 'Release' 設定為此命令的預設值。</target>
<source>The configuration to use for building the package. The default is 'Release'.</source>
<target state="needs-review-translation">將用以組建套件的設定。預設值為 'Debug'。使用 'PackRelease' 屬性將 'Release' 設定為此命令的預設值。</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -146,9 +146,9 @@
The default is to publish a framework-dependent application.</value>
</data>
<data name="ConfigurationOptionDescription" xml:space="preserve">
<value>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</value>
<value>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</value>
</data>
<data name="CmdNoLogo" xml:space="preserve">
<value>Do not display the startup banner or the copyright message.</value>
</data>
</root>
</root>
Expand Up @@ -55,8 +55,8 @@ Ve výchozím nastavení je publikována aplikace závislá na architektuře.</t
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Konfigurace, pro kterou se má publikovat. Výchozí hodnota je Debug. Pomocí vlastnosti PublishRelease nastavte release jako výchozí pro tento příkaz.</target>
<source>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</source>
<target state="needs-review-translation">Konfigurace, pro kterou se má publikovat. Výchozí hodnota je Debug. Pomocí vlastnosti PublishRelease nastavte release jako výchozí pro tento příkaz.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -55,8 +55,8 @@ Standardmäßig wird eine Framework-abhängige Anwendung veröffentlicht.</targe
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Die Konfiguration, für die veröffentlicht werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PublishRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden.</target>
<source>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</source>
<target state="needs-review-translation">Die Konfiguration, für die veröffentlicht werden soll. Der Standardwert ist „Debuggen“. Verwenden Sie die „PublishRelease“-Eigenschaft, um „Release“ als Standard für diesen Befehl zu verwenden.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -55,8 +55,8 @@ El valor predeterminado es publicar una aplicación dependiente del marco.</targ
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Configuración para la que se va a publicar. El valor predeterminado es "Debug". Use la propiedad "PublishRelease" para que "Release" sea el valor predeterminado para este comando.</target>
<source>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</source>
<target state="needs-review-translation">Configuración para la que se va a publicar. El valor predeterminado es "Debug". Use la propiedad "PublishRelease" para que "Release" sea el valor predeterminado para este comando.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -55,8 +55,8 @@ La valeur par défaut est de publier une application dépendante du framework.</
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="translated">La configuration pour laquelle publier. La valeur par défaut est 'Débogage'. Utilisez la propriété `PublishRelease` pour faire de 'Release' la valeur par défaut pour cette commande.</target>
<source>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</source>
<target state="needs-review-translation">La configuration pour laquelle publier. La valeur par défaut est 'Débogage'. Utilisez la propriété `PublishRelease` pour faire de 'Release' la valeur par défaut pour cette commande.</target>
<note />
</trans-unit>
</body>
Expand Down
Expand Up @@ -55,8 +55,8 @@ Per impostazione predefinita, viene generato un pacchetto dipendente dal framewo
<note />
</trans-unit>
<trans-unit id="ConfigurationOptionDescription">
<source>The configuration to publish for. The default is 'Debug'. Use the `PublishRelease` property to make 'Release' the default for this command.</source>
<target state="translated">Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PublishRelease' per rendere 'Release' il valore predefinito per questo comando.</target>
<source>The configuration to publish for. The default is 'Release' for NET 8.0 projects and above, but 'Debug' for older projects.</source>
<target state="needs-review-translation">Configurazione per cui eseguire la pubblicazione. L'impostazione predefinita è 'Debug'. Usare la proprietà 'PublishRelease' per rendere 'Release' il valore predefinito per questo comando.</target>
<note />
</trans-unit>
</body>
Expand Down