Skip to content

Commit 6ea5fa5

Browse files
authored
Fix error message for invalid assembly name (#67882)
The error message is always used for invalid assembly name. Delete mention of codebase to avoid confusion.
1 parent 02fae07 commit 6ea5fa5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/coreclr/dlls/mscorrc/mscorrc.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ BEGIN
120120
FUSION_E_SIGNATURE_CHECK_FAILED "Strong name signature verification failed for assembly '%1'. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key."
121121
COR_E_MODULE_HASH_CHECK_FAILED "The check of the module's hash failed for file '%1'."
122122
FUSION_E_PRIVATE_ASM_DISALLOWED "Assembly '%1' is required to be strongly named."
123-
FUSION_E_INVALID_NAME "The given assembly name or codebase, '%1', was invalid."
123+
FUSION_E_INVALID_NAME "The given assembly name, '%1', was invalid."
124124
FUSION_E_ASM_MODULE_MISSING "A module specified in the manifest of assembly '%1' could not be found."
125125
FUSION_E_CODE_DOWNLOAD_DISABLED "HTTP download of assemblies has been disabled for this appdomain."
126126
FUSION_E_HOST_GAC_ASM_MISMATCH "The assembly returned from the host store has a different strong name signature than the corresponding one in GAC. Assembly: '%1'"

src/coreclr/inc/corerror.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@
246246

247247
<HRESULT NumericValue="0x80131047">
248248
<SymbolicName>FUSION_E_INVALID_NAME</SymbolicName>
249-
<Message>"The given assembly name or codebase was invalid."</Message>
250-
<Comment> The given assembly name or codebase was invalid. </Comment>
249+
<Message>"The given assembly name was invalid."</Message>
250+
<Comment> The given assembly name was invalid. </Comment>
251251
</HRESULT>
252252

253253
<HRESULT NumericValue="0x80131048">

src/coreclr/pal/prebuilt/corerror/mscorurt.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ BEGIN
2626
MSG_FOR_URT_HR(FUSION_E_ASM_MODULE_MISSING) "A module specified in the manifest was not found."
2727
MSG_FOR_URT_HR(FUSION_E_PRIVATE_ASM_DISALLOWED) "A strongly-named assembly is required."
2828
MSG_FOR_URT_HR(FUSION_E_SIGNATURE_CHECK_FAILED) "Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key."
29-
MSG_FOR_URT_HR(FUSION_E_INVALID_NAME) "The given assembly name or codebase was invalid."
29+
MSG_FOR_URT_HR(FUSION_E_INVALID_NAME) "The given assembly name was invalid."
3030
MSG_FOR_URT_HR(FUSION_E_CODE_DOWNLOAD_DISABLED) "HTTP download of assemblies has been disabled for this appdomain."
3131
MSG_FOR_URT_HR(FUSION_E_HOST_GAC_ASM_MISMATCH) "Assembly in host store has a different signature than assembly in GAC."
3232
MSG_FOR_URT_HR(FUSION_E_LOADFROM_BLOCKED) "LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host."

src/installer/tests/HostActivation.Tests/StartupHooks.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ public void Muxer_activation_of_StartupHook_With_Invalid_Simple_Name_Fails()
341341
.Execute(fExpectedToFail: true)
342342
.Should().Fail()
343343
.And.HaveStdErrContaining(string.Format(expectedError, startupHookVar))
344-
.And.HaveStdErrContaining("---> System.IO.FileLoadException: The given assembly name or codebase was invalid.");
344+
.And.HaveStdErrContaining("---> System.IO.FileLoadException: The given assembly name was invalid.");
345345

346346
// Relative path error is caught before any hooks run
347347
startupHookVar = startupHookDll + Path.PathSeparator + relativeAssemblyPath;

src/libraries/System.Private.CoreLib/src/Resources/Strings.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@
11021102
<value>Target array type is not compatible with the type of items in the collection.</value>
11031103
</data>
11041104
<data name="InvalidAssemblyName" xml:space="preserve">
1105-
<value>The given assembly name or codebase was invalid.</value>
1105+
<value>The given assembly name was invalid.</value>
11061106
</data>
11071107
<data name="Argument_InvalidCalendar" xml:space="preserve">
11081108
<value>Not a valid calendar for the given culture.</value>

0 commit comments

Comments
 (0)