Skip to content

Commit 9235514

Browse files
committed
Adding error on runtime identifier specified at solution level
1 parent fd1759c commit 9235514

File tree

16 files changed

+156
-0
lines changed

16 files changed

+156
-0
lines changed

src/Tasks/Common/Resources/Strings.resx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,4 +637,8 @@ The following are names of parameters or literal values and should not be transl
637637
{1}</value>
638638
<comment>{StrBegin="NETSDK1133: "}</comment>
639639
</data>
640+
<data name="CannotHaveSolutionLevelRuntimeIdentifier" xml:space="preserve">
641+
<value>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</value>
642+
<comment>{StrBegin="NETSDK1134: "}</comment>
643+
</data>
640644
</root>

src/Tasks/Common/Resources/xlf/Strings.cs.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: Publikování do jednoho souboru je podporované jen u spustitelných aplikací.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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ě.</target>

src/Tasks/Common/Resources/xlf/Strings.de.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: Die Veröffentlichung in einer einzelnen Datei wird nur für ausführbare Anwendungen unterstützt.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.es.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: La publicación en un archivo único solo se admite con aplicaciones ejecutables.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.fr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: La publication dans un fichier unique n'est prise en charge que pour les applications exécutables.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.it.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: la pubblicazione in un singolo file è supportata solo per le applicazioni eseguibili.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.ja.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: 単一ファイルへの公開は実行可能アプリケーションに対してのみサポートされています。</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">NETSDK1013: TargetFramework 値 '{0}' が認識されませんでした。つづりが間違っている可能性があります。間違っていない場合は、TargetFrameworkIdentifier または TargetFrameworkVersion プロパティ (あるいはその両方) を明示的に指定する必要があります。</target>

src/Tasks/Common/Resources/xlf/Strings.ko.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: 실행 가능한 애플리케이션의 경우에만 단일 파일에 게시할 수 있습니다.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">NETSDK1013: TargetFramework 값 '{0}'을(를) 인식하지 못했습니다. 철자가 틀렸을 수 있습니다. 그렇지 않은 경우 TargetFrameworkIdentifier 및/또는 TargetFrameworkVersion 속성을 명시적으로 지정해야 합니다.</target>

src/Tasks/Common/Resources/xlf/Strings.pl.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: Publikowanie w pojedynczym pliku jest obsługiwane tylko dla aplikacji wykonywalnych.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: só há suporte para a publicação em um arquivo único em aplicativos executáveis.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.ru.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: публикация в одном файле поддерживается только для исполняемых приложений.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">NETSDK1013: значение "{0}" в TargetFramework не распознано. Возможно, оно содержит опечатку. Если это не так, задайте свойства TargetFrameworkIdentifier и (или) TargetFrameworkVersion явным образом.</target>

src/Tasks/Common/Resources/xlf/Strings.tr.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: Tek dosyaya yayımlama, yalnızca yürütülebilir uygulamalar için desteklenir.</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">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.</target>

src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: 发布到单一文件仅适用于可执行应用程序。</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">NETSDK1013: 未识别 TargetFramework 值“{0}”。可能是因为拼写错误。如果拼写正确,必须显式指定 TargetFrameworkIdentifier 和/或 TargetFrameworkVersion 属性。</target>

src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
<target state="translated">NETSDK1099: 只有可執行應用程式支援發佈到單一檔案。</target>
133133
<note>{StrBegin="NETSDK1099: "}</note>
134134
</trans-unit>
135+
<trans-unit id="CannotHaveSolutionLevelRuntimeIdentifier">
136+
<source>NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</source>
137+
<target state="new">NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead.</target>
138+
<note>{StrBegin="NETSDK1134: "}</note>
139+
</trans-unit>
135140
<trans-unit id="CannotInferTargetFrameworkIdentifierAndVersion">
136141
<source>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.</source>
137142
<target state="translated">NETSDK1013: 無法辨識 TargetFramework 值 '{0}'。拼字可能有誤。若非此情況,即必須明確指定 TargetFrameworkIdentifier 及 (或) TargetFrameworkVersion 屬性。</target>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!--
2+
***********************************************************************************************
3+
Microsoft.NET.Sdk.Solution.targets
4+
5+
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
6+
created a backup copy. Incorrect changes to this file will make it
7+
impossible to load or build your projects from the command-line or the IDE.
8+
9+
Copyright (c) .NET Foundation. All rights reserved.
10+
***********************************************************************************************
11+
-->
12+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
13+
14+
<Import Project="$(MSBuildSDKsPath)\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.Common.targets" />
15+
16+
<!--
17+
============================================================
18+
_CheckForSolutionLevelRuntimeIdentifier
19+
20+
Ensure that a runtime identifier is not specified at the solution level
21+
============================================================
22+
-->
23+
<Target Name="_CheckForSolutionLevelRuntimeIdentifier"
24+
BeforeTargets="Build"
25+
Condition="'$(RuntimeIdentifier)' != ''">
26+
27+
<NETSdkError ResourceName="CannotHaveSolutionLevelRuntimeIdentifier" />
28+
29+
</Target>
30+
31+
</Project>

0 commit comments

Comments
 (0)