Log4net не найдена проблема в .NET Framework 4.8C#

Место общения программистов C#
Ответить
Anonymous
 Log4net не найдена проблема в .NET Framework 4.8

Сообщение Anonymous »

Я работаю над проектом .NET Framework 4.8. Ранее он был разработан для .NET Framework 3 и Visual Studio 2008. Во время этого обновления я установил последнюю версию Crystal Reports и Visual Studio, потому что он выступал на старой версии Crystal Reports в Visual Studio 2022. Теперь она показывает новую ошибку, что log4net не загружается, но я проверил, что я вижу, что файл.Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Source Error:

Line 13:
Line 14:
Line 15:
Line 17:

Source File: d:\xxxx\xxxx\Reports\ShowReport.aspx Line: 15

Assembly Load Trace: The following information can be helpful to determine why the assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' could not be loaded.

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\IIS Express\iisexpress.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
(Fully-specified)
LOG: Appbase = file:///D:/xxxxx/xxxx/
LOG: Initial PrivatePath = D:\xxxx\xxxxxx\bin
Calling assembly : CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\xxxx\xxxx\web.config
LOG: Using host configuration file: C:\Users\xxxx\Documents\IISExpress\config\aspnet.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Post-policy reference: log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304
LOG: Attempting download of new URL file:///C:/Users/xxxxx/AppData/Local/Temp/Temporary ASP.NET Files/vs/96a8c422/6d872058/log4net.DLL.
LOG: Attempting download of new URL file:///C:/Users/xxxxx/AppData/Local/Temp/Temporary ASP.NET Files/vs/96a8c422/6d872058/log4net/log4net.DLL.
LOG: Attempting download of new URL file:///D:/xxxxx/xxxx/bin/log4net.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Major Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

Stack Trace:

[FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
CrystalDecisions.Web.CrystalReportViewer..cctor() +0

[TypeInitializationException: The type initializer for 'CrystalDecisions.Web.CrystalReportViewer' threw an exception.]
CrystalDecisions.Web.CrystalReportViewer..ctor() +0
ASP.reports_showreport_aspx.__BuildControlCrystalReportViewer1() in d:\xxxx\xxxxxx\Reports\ShowReport.aspx:15
ASP.reports_showreport_aspx.__BuildControlform1() in d:\xxx\xxxxx\Reports\ShowReport.aspx:12
ASP.reports_showreport_aspx.__BuildControlTree(reports_showreport_aspx __ctrl) in d:\Ascent-SCM\SMART.Website\Reports\ShowReport.aspx:1
ASP.reports_showreport_aspx.FrameworkInitialize() in c:\Users\xxx\AppData\Local\Temp\Temporary ASP.NET Files\vs\96a8c422\6d872058\App_Web_ieb0u1kl.1.cs:0
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +52
System.Web.UI.Page.ProcessRequest() +79
System.Web.UI.Page.ProcessRequest(HttpContext context) +74
ASP.reports_showreport_aspx.ProcessRequest(HttpContext context) in c:\Users\xxxx\AppData\Local\Temp\Temporary ASP.NET Files\vs\96a8c422\6d872058\App_Web_ieb0u1kl.1.cs:0
System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, VirtualPath path, VirtualPath filePath, String physPath, Exception error, String queryStringOverride) +2153

[HttpException (0x80004005): Error executing child request for /Reports/ShowReport.aspx.]
System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler handler, TextWriter writer, Boolean preserveForm, Boolean setPreviousPage, yStringOveVirtualPath path, VirtualPath filePath, String physPath, Exception error, String querrride) +2414
System.Web.HttpServerUtility.Execute(String path, TextWriter writer, Boolean preserveForm) +848
System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm) +74
SMART.Website.Reports.Search.RequirementSearch.ShowDetailsOfPO() in D:\xxx\xxxx\Reports\Search\RequirementSearch.aspx.cs:297
SMART.Website.Reports.Search.RequirementSearch.po_content_Click(Object sender, CommandEventArgs e) in D:\xxx\xxx\Reports\Search\RequirementSearch.aspx.cs:283
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +139
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1959
< /code>
Я пытался преодолеть эту ошибку почти во всех аспектах. Я видел решение на этой платформе и попробовал, но не получил никакого успеха. Я обновил log4net на 2.0.17.0 < /p>
Следующее решение, которое я пробовал до сих пор. < /P>

Обновление log4net, а затем чистое решение и восстановление, но та же ошибка. < /P>
< /li>
set ubling in veb.confconf in veb.conf anc.con4ne. 2.0.17.0. По -прежнему такая же проблема.



< /code>
Но та же ошибка происходит, ничего не изменилось. В обоих случаях также произошла та же ошибка. < /P>
< /li>
< /ol>
Я не уверен, что еще мне нужно сделать, чтобы разрешить эту ошибку. Похоже, я должен сделать это снова с нуля.
Любая помощь будет оценена для решения этой проблемы.>

Подробнее здесь: https://stackoverflow.com/questions/788 ... mework-4-8
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»