diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.AbstractBuildEventHelper.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.AbstractBuildEventHelper.cs index 05090ebf32f..faa5d1f989c 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.AbstractBuildEventHelper.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.AbstractBuildEventHelper.cs @@ -31,7 +31,7 @@ protected AbstractBuildEventHelper(string buildEvent, private string BuildEvent { get; } private string TargetName { get; } - public async Task<(bool success, string? property)> TryGetPropertyAsync(IProjectProperties defaultProperties) + public async Task<(bool success, string? value)> TryGetUnevaluatedPropertyValueAsync(IProjectProperties defaultProperties) { // check if value already exists string? unevaluatedPropertyValue = await defaultProperties.GetUnevaluatedPropertyValueAsync(BuildEvent); @@ -43,9 +43,34 @@ protected AbstractBuildEventHelper(string buildEvent, return (false, null); } - public string? GetProperty(ProjectRootElement projectXml) + public async Task<(bool success, string value)> TryGetEvaluatedPropertyValueAsync(IProjectProperties defaultProperties) { - return GetFromTargets(projectXml); + string? unevaluatedPropertyValue = await defaultProperties.GetUnevaluatedPropertyValueAsync(BuildEvent); + + if (unevaluatedPropertyValue is null) + { + return (false, ""); + } + + string evaluatedPropertyValue = await defaultProperties.GetEvaluatedPropertyValueAsync(BuildEvent); + return (true, evaluatedPropertyValue); + } + + public string? TryGetValueFromTarget(ProjectRootElement projectXml) + { + ProjectTaskElement? execTask = FindExecTaskInTargets(projectXml); + + if (execTask == null) + { + return null; + } + + if (execTask.Parameters.TryGetValue(Command, out string commandText)) + { + return commandText.Replace("%25", "%"); + } + + return null; // exec task as written in the project file is invalid, we should be resilient to this case. } public async Task TrySetPropertyAsync(string unevaluatedPropertyValue, IProjectProperties defaultProperties) @@ -82,23 +107,6 @@ public void SetProperty(string unevaluatedPropertyValue, ProjectRootElement proj SetParameter(projectXml, unevaluatedPropertyValue); } - private string? GetFromTargets(ProjectRootElement projectXml) - { - ProjectTaskElement? execTask = FindExecTaskInTargets(projectXml); - - if (execTask == null) - { - return null; - } - - if (execTask.Parameters.TryGetValue(Command, out string commandText)) - { - return commandText.Replace("%25", "%"); - } - - return null; // exec task as written in the project file is invalid, we should be resilient to this case. - } - private static bool OnlyWhitespaceCharacters(string unevaluatedPropertyValue) => string.IsNullOrWhiteSpace(unevaluatedPropertyValue) && !unevaluatedPropertyValue.Contains("\n"); diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.cs b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.cs index 0735345d855..1afdd43e34a 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.cs +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/Properties/InterceptedProjectProperties/AbstractBuildEventValueProvider.cs @@ -22,19 +22,68 @@ protected AbstractBuildEventValueProvider( _helper = helper; } + // There are two ways of storing pre/post build events in the project. + // + // 1. As MSBuild properties (PreBuildEvent / PostBuildEvent) + // 2. As MSBuild tasks (PreBuild / PostBuild) + // + // Properties were used in legacy projects. + // + // For SDK style projects, we should use tasks. + // + // In legacy projects, the properties were defined _after_ the import of common targets, + // meaning that the properties had access to a full range of property values for use in their + // bodies. + // + // In SDK projects, it's not possible to define a property in the project after the common + // targets, so an MSBuild task is used instead. + // + // Some projects still define these events using properties, and the below code will work + // with such properties when they exist. However if these properties are absent, then + // tasks are used instead. + // + // Examples of MSBuild properties that are not available to PreBuildEvent/PostBuildEvent + // properties (but which are available to PreBuild/PostBuild targets) are ProjectExt, + // PlatformName, ProjectDir, TargetDir, TargetFileName, TargetExt, ProjectFileName, + // ProjectPath, TargetPath, TargetName, ProjectName, ConfigurationName, and OutDir. + // + // Tasks are defined as: + // + // + // + // + // + // + // + + public override async Task OnGetUnevaluatedPropertyValueAsync( + string propertyName, + string unevaluatedPropertyValue, + IProjectProperties defaultProperties) + { + (bool success, string? property) = await _helper.TryGetUnevaluatedPropertyValueAsync(defaultProperties); + + if (success) + { + return property ?? string.Empty; + } + + return await _projectAccessor.OpenProjectXmlForReadAsync(_unconfiguredProject, projectXml => _helper.TryGetValueFromTarget(projectXml)) ?? string.Empty; + } + public override async Task OnGetEvaluatedPropertyValueAsync( string propertyName, string evaluatedPropertyValue, IProjectProperties defaultProperties) { - (bool success, string? property) = await _helper.TryGetPropertyAsync(defaultProperties); + (bool success, string property) = await _helper.TryGetEvaluatedPropertyValueAsync(defaultProperties); if (success) { - return property ?? string.Empty; + return property; } - return await _projectAccessor.OpenProjectXmlForReadAsync(_unconfiguredProject, projectXml => _helper.GetProperty(projectXml)) ?? string.Empty; + return await _projectAccessor.OpenProjectXmlForReadAsync(_unconfiguredProject, projectXml => _helper.TryGetValueFromTarget(projectXml)) ?? string.Empty; } public override async Task OnSetPropertyValueAsync( diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/BuildPropertyPage.xaml b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/BuildPropertyPage.xaml index 90d109f439e..3eca35a5ed8 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/BuildPropertyPage.xaml +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/BuildPropertyPage.xaml @@ -19,6 +19,10 @@ Description="Configures the output options for the build process." DisplayName="Output" /> + + @@ -275,6 +279,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Chyby a upozornění + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Obecné @@ -162,6 +172,16 @@ Cílová platforma + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Slouží k určení, která upozornění se zpracovávají jako chyby. @@ -377,6 +397,26 @@ Potlačit upozornění + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Zpracovává určená upozornění jako chyby. Více čísel upozornění oddělte čárkou (,) nebo středníkem (;). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.de.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.de.xlf index 2124437f275..ec2fd4852e2 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.de.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.de.xlf @@ -97,6 +97,16 @@ Fehler und Warnungen + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Allgemein @@ -162,6 +172,16 @@ Zielplattform + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Hiermit wird angegeben, welche Warnungen als Fehler behandelt werden. @@ -377,6 +397,26 @@ Warnungen unterdrücken + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Hiermit werden die angegebenen Warnungen als Fehler behandelt. Trennen Sie mehrere Warnungsnummern durch ein Komma (",") oder ein Semikolon (";"). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.es.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.es.xlf index ef68f321735..8d135f7f631 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.es.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.es.xlf @@ -97,6 +97,16 @@ Errores y advertencias + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General General @@ -162,6 +172,16 @@ Destino de la plataforma + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Se usa para especificar las advertencias que se tratan como errores. @@ -377,6 +397,26 @@ Suprimir las advertencias + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Trata las advertencias especificadas como errores. Separe varios números de advertencia con una coma (",") o punto y coma (";"). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.fr.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.fr.xlf index 6e09f90e91d..ad54310f8c4 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.fr.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.fr.xlf @@ -97,6 +97,16 @@ Erreurs et avertissements + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Général @@ -162,6 +172,16 @@ Plateforme cible + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Permet de spécifier les avertissements qui doivent être traités en tant qu'erreurs. @@ -377,6 +397,26 @@ Supprimer les avertissements + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Traite les avertissements spécifiés en tant qu'erreurs. Séparez plusieurs numéros d'avertissement par une virgule (',') ou un point-virgule (';'). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.it.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.it.xlf index 373a3143127..11340b24dfa 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.it.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.it.xlf @@ -97,6 +97,16 @@ Errori e avvisi + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Generale @@ -162,6 +172,16 @@ Destinazione piattaforma + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Viene usato per specificare quali avvertenze vengono considerate come errori. @@ -377,6 +397,26 @@ Non visualizzare avvisi + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Considera gli avvisi specificati come errori. Separare più numeri di avviso con una virgola (',') o un punto e virgola (';'). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ja.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ja.xlf index 5606186da22..9b0d14336d2 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ja.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ja.xlf @@ -97,6 +97,16 @@ エラーおよび警告 + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General 全般 @@ -162,6 +172,16 @@ プラットフォーム ターゲット + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. どの警告をエラーとして扱うかを指定するために使用します。 @@ -377,6 +397,26 @@ 警告の抑制 + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). 指定された警告をエラーとして扱います。複数の警告番号はコンマ (',') またはセミコロン (';') を使用して区切ります。 diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ko.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ko.xlf index ade94b585e7..e5101fb2e9a 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ko.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ko.xlf @@ -97,6 +97,16 @@ 오류 및 경고 + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General 일반 @@ -162,6 +172,16 @@ 플랫폼 대상 + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. 어느 경고를 오류로 처리할지 지정하는 데 사용됩니다. @@ -377,6 +397,26 @@ 경고 표시 안 함 + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). 지정된 경고를 오류로 처리합니다. 여러 개의 경고 번호는 쉼표(',') 또는 세미콜론(';')으로 구분합니다. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pl.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pl.xlf index 77b79992dc0..7eadec82e95 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pl.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pl.xlf @@ -97,6 +97,16 @@ Błędy i ostrzeżenia + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Ogólne @@ -162,6 +172,16 @@ Platforma docelowa + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Służy do określania, które ostrzeżenia są traktowane jak błędy. @@ -377,6 +397,26 @@ Pomiń ostrzeżenia + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Traktuje określone ostrzeżenia jak błędy. Rozdziel wiele numerów ostrzeżeń przecinkami („,”) lub średnikami („;”). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pt-BR.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pt-BR.xlf index 35089652b8d..b64361f0017 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pt-BR.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.pt-BR.xlf @@ -97,6 +97,16 @@ Erros e avisos + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Geral @@ -162,6 +172,16 @@ Destino de plataforma + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Usado para especificar quais avisos são tratados como erros. @@ -377,6 +397,26 @@ Suprimir avisos + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Trata os avisos especificados como erros. Separe vários números de aviso com uma vírgula (',') ou um ponto e vírgula (';'). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ru.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ru.xlf index 655abd908ec..e926f4c0a30 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ru.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.ru.xlf @@ -97,6 +97,16 @@ Ошибки и предупреждения + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Общие @@ -162,6 +172,16 @@ Целевая платформа + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Используется для указания предупреждений, которые считаются ошибками. @@ -377,6 +397,26 @@ Отключить предупреждения + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Обрабатывает указанные предупреждения как ошибки. При указании нескольких номеров предупреждений их следует разделить запятыми (",") или точками с запятой (";"). diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.tr.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.tr.xlf index 6ea1a014e3f..94b42cb73c6 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.tr.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.tr.xlf @@ -97,6 +97,16 @@ Hatalar ve uyarılar + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General Genel @@ -162,6 +172,16 @@ Platform hedefi + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. Hangi uyarıların hata olarak değerlendirileceğini belirtmek için kullanılır. @@ -377,6 +397,26 @@ Uyarıları Gizle + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). Belirtilen uyarıları hata olarak değerlendirir. Birden çok uyarı numarasını virgül (',') veya noktalı virgül (';') ile ayırın. diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hans.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hans.xlf index f723929dd56..d9e43658dba 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hans.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hans.xlf @@ -97,6 +97,16 @@ 错误和警告 + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General 常规 @@ -162,6 +172,16 @@ 平台目标 + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. 用于指定将哪些警告视为错误。 @@ -377,6 +397,26 @@ 取消显示警告 + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). 将指定的警告视为错误。使用逗号(",")或分号(";")来分隔多个警告编号。 diff --git a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hant.xlf b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hant.xlf index 3645837e855..ca2edd61b74 100644 --- a/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hant.xlf +++ b/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Rules/PropertyPages/xlf/BuildPropertyPage.xaml.zh-Hant.xlf @@ -97,6 +97,16 @@ 錯誤與警告 + + Configures custom events that run before and after build. + Configures custom events that run before and after build. + + + + Events + Events + + General 一般 @@ -162,6 +172,16 @@ 平台目標 + + Specifies under which condition the post-build event will be executed. + Specifies under which condition the post-build event will be executed. + + + + When to run the post-build event + When to run the post-build event + + Used to specify which warnings are treated as errors. 用以指定哪些警告會視為錯誤。 @@ -377,6 +397,26 @@ 隱藏警告 + + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + Specifies commands that run after the build completes. Does not run if the build failed. Use 'call' to invoke .bat files. A non-zero exit code will fail the build. + + + + Post-build event + Post-build event + + + + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + Specifies commands that run before the build starts. Does not run if the project is up-to-date. A non-zero exit code will fail the build before it runs. + + + + Pre-build event + Pre-build event + + Treats the specified warnings as errors. Separate multiple warning numbers with a comma (',') or semicolon (';'). 將指定的警告視為錯誤。請以逗號 (',') 或分號 (';') 分隔多個警告編號。 diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PostBuildEventValueProviderTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PostBuildEventValueProviderTests.cs index 43d0dff4857..0903026b02b 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PostBuildEventValueProviderTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PostBuildEventValueProviderTests.cs @@ -33,7 +33,7 @@ public static void GetPropertyAsync_AllTargetsPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""post build output""", actual); } @@ -54,7 +54,7 @@ public static void GetPropertyAsync_PostBuildTargetPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""post build output""", actual); } @@ -75,7 +75,7 @@ public static void GetPropertyAsync_PostBuildTargetPresent_LowerCase() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""post build output""", actual); } @@ -92,7 +92,7 @@ public static void GetPropertyAsync_NoTargetsPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(actual); } @@ -101,7 +101,7 @@ public static async Task GetPropertyAsync_ExistingProperties() { var expected = "echo $(ProjectDir)"; var projectProperties = IProjectPropertiesFactory.CreateWithPropertyAndValue("PostBuildEvent", expected); - var (success, actual) = await systemUnderTest.TryGetPropertyAsync(projectProperties); + var (success, actual) = await systemUnderTest.TryGetUnevaluatedPropertyValueAsync(projectProperties); Assert.True(success); Assert.Equal(expected, actual); } @@ -121,7 +121,7 @@ public static void GetPropertyAsync_WrongTargetName() ".AsProjectRootElement(); - var result = systemUnderTest.GetProperty(root); + var result = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(result); } @@ -140,7 +140,7 @@ public static void GetPropertyAsync_WrongExec() ".AsProjectRootElement(); - var result = systemUnderTest.GetProperty(root); + var result = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(result); } @@ -620,7 +620,7 @@ public static void EscapeValue_Read_CheckEscaped() ".AsProjectRootElement(); const string expected = "echo %DATE%"; - string? actual = systemUnderTest.GetProperty(root); + string? actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(expected, actual); } @@ -639,7 +639,7 @@ public static void EscapeValue_Read_CheckNotDoubleEscaped() ".AsProjectRootElement(); const string expected = "echo %25DATE%"; - string? actual = systemUnderTest.GetProperty(root); + string? actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(expected, actual); } diff --git a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PreBuildEventValueProviderTests.cs b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PreBuildEventValueProviderTests.cs index aa2082aeee4..132da03efd1 100644 --- a/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PreBuildEventValueProviderTests.cs +++ b/tests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests/ProjectSystem/VS/Properties/PreBuildEventValueProviderTests.cs @@ -33,7 +33,7 @@ public static void GetPropertyAsync_AllTargetsPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""prebuild output""", actual); } @@ -54,7 +54,7 @@ public static void GetPropertyAsync_PreBuildTargetPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""prebuild output""", actual); } @@ -75,7 +75,7 @@ public static void GetPropertyAsync_PreBuildTargetPresent_LowerCase() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(@"echo ""prebuild output""", actual); } @@ -92,7 +92,7 @@ public static void GetPropertyAsync_NoTargetsPresent() ".AsProjectRootElement(); - var actual = systemUnderTest.GetProperty(root); + var actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(actual); } @@ -101,7 +101,7 @@ public static async Task GetPropertyAsync_ExistingPropertiesAsync() { var expected = "echo $(ProjectDir)"; var projectProperties = IProjectPropertiesFactory.CreateWithPropertyAndValue("PreBuildEvent", expected); - var (success, actual) = await systemUnderTest.TryGetPropertyAsync(projectProperties); + var (success, actual) = await systemUnderTest.TryGetUnevaluatedPropertyValueAsync(projectProperties); Assert.True(success); Assert.Equal(expected, actual); } @@ -123,7 +123,7 @@ public static void GetPropertyAsync_WrongTargetName() ".AsProjectRootElement(); - var result = systemUnderTest.GetProperty(root); + var result = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(result); } @@ -143,7 +143,7 @@ public static void GetPropertyAsync_WrongExec() ".AsProjectRootElement(); - var result = systemUnderTest.GetProperty(root); + var result = systemUnderTest.TryGetValueFromTarget(root); Assert.Null(result); } @@ -627,7 +627,7 @@ public static void EscapeValue_Read_CheckEscaped() ".AsProjectRootElement(); const string expected = "echo %DATE%"; - string? actual = systemUnderTest.GetProperty(root); + string? actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(expected, actual); } @@ -646,7 +646,7 @@ public static void EscapeValue_Read_CheckNotDoubleEscaped() ".AsProjectRootElement(); const string expected = "echo %25DATE%"; - string? actual = systemUnderTest.GetProperty(root); + string? actual = systemUnderTest.TryGetValueFromTarget(root); Assert.Equal(expected, actual); }