2
Я получаю исключение TypeInitializationException с использованием NodaTime, но только в Release и только на устройствах.NodaTime TypeInitializationException Только устройство, только освобождение
Вот трассировки стека:
System.TypeInitializationException: The type initializer for 'Patterns' threw an exception. ---> System.TypeInitializationException: The type initializer for 'NodaTime.Text.ZonedDateTimePattern' threw an exception. ---> System.TypeInitializationException: The type initializer for 'NodaTime.DateTimeZone' threw an exception. ---> System.TypeInitializationException: The type initializer for 'NodaTime.Text.OffsetPattern' threw an exception. ---> System.Resources.MissingManifestResourceException: Exception of type 'System.Resources.MissingManifestResourceException' was thrown.
at System.Resources.ResourceManager.GetString(String name, CultureInfo culture)
at NodaTime.Globalization.NodaFormatInfo.get_OffsetPatternLong()
at NodaTime.Text.OffsetPatternParser.ParsePartialPattern(String patternText, NodaFormatInfo formatInfo)
at NodaTime.Text.OffsetPatternParser.CreateGeneralPattern(NodaFormatInfo formatInfo)
at NodaTime.Text.OffsetPatternParser.ParsePartialPattern(String patternText, NodaFormatInfo formatInfo)
at NodaTime.Text.OffsetPatternParser.ParsePattern(String patternText, NodaFormatInfo formatInfo)
at NodaTime.Text.FixedFormatInfoPatternParser`1.<>c__DisplayClass0.<.ctor>b__2(String patternText)
at NodaTime.Utility.Cache`2.GetOrAdd(TKey key)
at NodaTime.Text.OffsetPattern.Create(String patternText, NodaFormatInfo formatInfo)
at NodaTime.Text.OffsetPattern..cctor()
--- End of inner exception stack trace ---
at NodaTime.TimeZones.FixedDateTimeZone.MakeId(Offset offset)
at NodaTime.DateTimeZone.BuildFixedZoneCache()
at NodaTime.DateTimeZone..cctor()
--- End of inner exception stack trace ---
at NodaTime.LocalDateTime.InUtc()
at NodaTime.Text.ZonedDateTimePattern..cctor()
--- End of inner exception stack trace ---
at NodaTime.Text.ZonedDateTimePattern.CreateWithInvariantCulture(String patternText, IDateTimeZoneProvider zoneProvider)
at NodaTime.Text.ZonedDateTimePattern.Patterns..cctor()
--- End of inner exception stack trace ---
at NodaTime.ZonedDateTime.ToString(String patternText, IFormatProvider formatProvider)
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.Text.StringBuilder.AppendFormat(String format, Object[] args)
at Models.EventSummary.get_DisplayDate()
Хм. Интересно. Какова ваша культура? Я ожидаю, что он просто вернется к той культуре, которую я определил, как к сборке ... Не похоже, что с этим ресурсом есть другие культуры. Хм. –
Когда вы говорите, что это «только в выпуске» - возможно, вы используете одну и ту же сборку Noda Time в обоих случаях, установленную bu NuGet? –
Да, все настроено через NuGet. – Jeff