Kacper Górski
Kacper Górski

Reputation: 53

System.TimeZoneNotFoundException in release compilation for UWP App

While trying to compile my UWP App in Release Mode I get the following error ILT0025: Inconsistent type forwarders were found for type 'System.TimeZoneNotFoundException'. The App runs successfully in Debug Mode without any errors.

Problem started when I upgraded my App's minimal and target Windows version to 16299 from 15063. Downgrade is not possible as some part of my app relies on 16299 controls.

I tried adding a reference to Microsoft.IdentityModel.Clients.ActiveDirectory v2.22.302111727 as it says in this thread https://github.com/dotnet/corert/issues/4768 and even checked the newest version of that package but it hasn't changed anything.

I have following packages in my App:

<PackageReference Include="Microsoft.AspNet.WebApi.Client">
  <Version>5.2.3</Version>
</PackageReference>
<PackageReference Include="Microsoft.IdentityModel.Clients.ActiveDirectory">
  <Version>3.17.1</Version>
</PackageReference>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
  <Version>6.0.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json">
  <Version>10.0.3</Version>
</PackageReference>
<PackageReference Include="System.ValueTuple">
  <Version>4.4.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms">
  <Version>2.4.0.38779</Version>
</PackageReference>

Has anyone else encountered this problem? How did you solve that?

Upvotes: 4

Views: 557

Answers (1)

Mihai Mihaila
Mihai Mihaila

Reputation: 106

Delete the following files from your project:

project.lock.json *.nuget.props *.nuget.targets

The question has been answered in this thread: https://github.com/dotnet/corert/issues/4768

Upvotes: 4

Related Questions