Mam projekt app C# konsoli, który zależy od NHibernate 3.3.2 i ShapArch.NHibernate 2.0.4.628, który został skompilowany z NHibernate 3.3.1 (o ile mi wiadomo - może się mylę, ale kiedy stworzyłem projekt SharpArch 2.0.4, pobrałem NH 3.3.1 przez Nuget).wersje dll wyświetlane w visual studio .Net nie odzwierciedla pliku odniesienia dll/wersji produktu
Dlaczego program Visual Studio wyświetla NHibernate jako wersję 3.3.1.4000, gdy odniesiona biblioteka dll to 3.3.2.4000? Właściwość Specific Version ma wartość false dla wszystkich odniesień. Wersja dla SharpArch pojawia się w wersji 2.0.0.0 zamiast 2.0.4, która jest wersją pliku/produktu.
w App config mam:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="NHibernate" publicKeyToken="aa95f207798dfdb4" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.3.1.4000" newVersion="3.3.2.4000" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Aplikacja nie można załadować z:
System.IO.FileLoadException was unhandled
Message=Could not load file or assembly 'NHibernate, Version=3.3.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source=MyApp.ResourcesGenerator
FileName=NHibernate, Version=3.3.2.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
FusionLog=""
StackTrace:
at MyApp.ResourcesGenerator.Program.InitializeNHibernateSession()
at SharpArch.NHibernate.NHibernateInitializer.InitializeNHibernateOnce(Action initMethod) in d:\Builds\SharpArch2\Solutions\SharpArch.NHibernate\NHibernateInitializer.cs:line 54
at MyApp.ResourcesGenerator.Program.Initialize() in C:\projects\tc\Trunk\Source_LibsUpgrade\Applications\PerformanceManagement\MyApp.ResourcesGenerator\Program.cs:line 149
at MyApp.ResourcesGenerator.Program.Main(String[] args) in C:\projects\tc\Trunk\Source_LibsUpgrade\Applications\PerformanceManagement\MyApp.ResourcesGenerator\Program.cs:line 31
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.IO.FileLoadException
Message=Could not load file or assembly 'NHibernate, Version=3.3.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
FileName=NHibernate, Version=3.3.0.4000, Culture=neutral, PublicKeyToken=aa95f207798dfdb4
Nie jestem nawet pewien, dlaczego próbuje załadować 3.3.0.4000 gdy ostry architektura została skompilowany z 3.3.1.
Życzenie, aby ktoś utworzył rozszerzenie VS, aby pokazać wersję pliku na liście właściwości. –
Na razie zawsze będę używał reflektora .net, który zawsze pokazuje mi wersję, a także wersje bibliotek dll, których dll zależy od – costa