-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP.NET / NLog.Extended / Upgrade Issues #741
Comments
Do you have a full error with stack trace? Please try full clean and rebuild. We are aware that the were some. similar Net cache problems with previous releases (when upgrading) |
The layout renderer have been moved to the NLog.Web library. This library has not yet been updated to NLog 4.0, but will be tomorrow, where it also will be released on nuget. |
Yes I did do a full clean rebuild but it made no difference. I found NLog.Web too and I tried it but it still failed. I could see that it was still the old version and only supported .NET 3.5.1 in the nuget packages directory. I'll try again tomorrow when it's updated. Will I need both NLog.Extended and NLog.Web packages in order to support ASP.NET? On Wed, Jun 10, 2015 at 10:36 PM, Kim Christensen
|
Sorry for the inconvenience. |
No problems. Happy to help. I can't try the update until later but can you confirm that I will need NLog.dll, NLog.Extended.dll and NLog.Web.dll now to support the aspnet variables? |
You don't need NLog.extended solely for NLog.web. |
The nuget packages had been updated (version 2.0 for the use with NLog 4.0). So this has been resolved. If you have any problems, feel free to-open this issue, or create a new one. |
I still get this error after updating to NLog 4.0 and Web 2.0 My layout is pretty simple:
Already tested if I remove the ${aspnet-user-identity} it works. My packages.config file: package id="NLog" version="4.0.0" targetFramework="net451" /> ... |
moved to NLog/NLog.Web#4 |
After updating from NLog + NLog.Extended 3.1 to NLog + NLog.Web 4.0 I had to add <!--needs before targets-->
<extensions>
<add assembly="NLog.Web"/>
</extensions> before my targets section. Can it be fixed so we don't need it in the future? It was able to use .Extended assembly without this trick before. |
What are the new versions of each component? Because this is all fixed a long time ago. |
I recommend to upgrade NLog to the latest version. (4.2.0). Thinks are fixed in 4.0.1 but also 4.1. NLog.web is compatible with all version of NLog 4.0+ All other NLog extensions should be 4.0+ The |
That's correct. There is not special build for NLog.Web for .Net 4 (not needed, no benefit). It's .Net3.5+ (which is runtime 2.0) |
I see, it makes sense now but it's confusing. Shouldn't just the NLog.Web nuget be updated then? To require 4.0.1+ NLog as dependency? Or else it will keep resurfacing |
The best thing about NLog is how simple to use it is, but I have recently had hard time spreading it among colleagues, with the breaking changes in 4.0 (move from .Extended to .Web) and this bugged autoload version being installed by default on new boxes. In any case thanks for maintaining this great tool! |
Well, NLog 4.0 works well with NLog.Web 4.0, but it's not optimal. When upgrading, it's good practice to upgrade all components to have the optimal experience. With the command line it's really easy:
Blame Nuget for the annoying dependency resolution, which is really bad. (it takes always the lowest version) We can upgrade NLog.Web to 4.2.0, but no code is changed in that component, so we think it's bad practice. |
Yes I agree it should not be required and that the blame is on nuget's side (albeit they must have their reasons and they bring more good than harm anyway ;-) ) but the simplest pragmatic solution would be to either update the NLog.Web package (not sure if you can update package definition without changing its version) or to recompile it with new version and create new package to match. |
@Ekus went everything fine with upgrading? |
Oh, yes, once I installed the newest NLog first, instead of relying on NLog.Web adding NLog 4.0 as a dependency. Thank you. |
I've just upgraded from 3.2.1 to 4.0.0 on my ASP.NET WebForms project.
I am using NLog and NLog.Extended.dll. Both files have been upgraded to 4.0.0.
When I attempt to execute the website I get the following error:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: An error occurred creating the configuration section handler for nlog: Error when setting property 'Layout' on File Target[log]
Source Error:
Line 21:
This is caused by the ${aspnet-....} entries in the following line:
If I remove all of the ${aspnet-....} entries from this line the website works as before.
Prior to the upgrade everything was working fine.
If I revert back to 3.2.1 everything works again.
The text was updated successfully, but these errors were encountered: