AssemblyVersionCompatibility 列舉

定義

定義不同型別的組件版本相容性。

C#
public enum AssemblyVersionCompatibility
C#
[System.Serializable]
public enum AssemblyVersionCompatibility
C#
[System.Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public enum AssemblyVersionCompatibility
繼承
AssemblyVersionCompatibility
屬性

欄位

名稱 Description
SameDomain 3

如果組件在相同的應用程式定義域中執行時,就無法與其他版本一起執行。

SameMachine 1

如果組件在相同的電腦上執行,就無法與其他版本一起執行。

SameProcess 2

如果組件在相同的處理序中執行,就無法與其他版本一起執行。

備註

AssemblyVersionCompatibility 會定義元件與其他相同元件的版本相容性,指出它是否無法與其他 (版本並行執行,例如,因為設備驅動器) 發生衝突。

如果未指定任何相容性,元件在所有範圍中會並存相容。

元件無法更具體地說明它與哪個舊版並存相容。 因此,如果 AssemblyVersionCompatibility 已指定 ,表示元件與所有已知版本不並存。 如果未指定,表示它與所有已知版本並存。

適用於

產品 版本
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1