我已经读过,如果一个项目被分成多个 DLL,版本控制可能会成为一个问题。我试图引入一个版本控制问题来理解它的含义。我有两个简单的项目,即一个 Windows 窗体应用程序和一个类库。这是表格:
Imports ClassLibrary1
Public Class Form1
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Dim c1 As Class1 = New class1
c1.TEST()
End Sub
End Class
这是类库:
Public Class Class1
Public Sub TEST()
MsgBox("TEST1")
End Sub
End Class
请参阅下面的 windows 窗体应用程序的版本号:
请参阅下面的类库版本:
当我构建项目时,我得到了预期的可执行文件和 DLL。我已按照以下步骤尝试引入版本控制问题:
1) Build the project
2) Go to the bin folder and create a copy of debug/WindowsApplication1.exe
3) Go into the DLL properties and change the DLL version in Visual Studio
4) Rebuild the project
5) Overwrite the .EXE in the BIN folder (debug/WindowsApplication1.exe) with the .EXE copied in step 2
6) Launch the .EXE in the bin folder
我想我会在第五步看到一个错误,因为旧版本的 .exe 正在使用新的 DLL。但是,程序按预期运行。我错过了什么?我意识到这是一个基本问题。我今天下午用谷歌搜索了它。