Unmangle the names of async and iterator methods in exception stack traces using @benaadams's Demystifier via custom LogManager which wraps your ILog.
Install from nuget:
Install-Package Log4Net.Demystifier
Configure via your favourite DI container. For example in StructureMap:
For<ILog>().Use(DemystifiedLogManager.GetLogger("AppLogger"));
Demystify log manager would wrap your logger via demystified logger.
If you encounter problem in old csproj based project(s), because of referencing .net standard library to a .net framework based project. You have to:
- add
RestoreProjectStyle
element to csproj
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>
-
Delete packages.config from your project and uninstall all packages
-
Install all packages one more time
Here is a short snippet how to translate packages.config to single line
Install-Packages
command -
If you encounter such error:
error : The project.json is referencing the project 'YourProject.csproj', but an output path was not specified on an item in the ProjectReferencesCreatingPackages property.
you have to update Visual Studio to > 15.2 -
If you project linking a file from packages folder like this:
<Content Include="..\packages\package.1.0.0.1\some.file">
<Link>some.file</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
It should be replaced to something like this:
<Content Include="$(NuGetPackageFolders)\package\1.0.0.1\some.file">
<Link>some.file</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>