Update nuget packages and fix code analysis warngings.