ical-org / ical.net

ical.NET - an open source iCal library for .NET
MIT License
784 stars 231 forks source link

Could not load file or assembly 'NodaTime' #596

Closed tossnet closed 1 day ago

tossnet commented 2 days ago

Hi! I've just updated from version 4.2.0 to 4.3.0 and I get this error:

Error: System.IO.FileNotFoundException: Could not load file or assembly 'NodaTime, Version=3.1.12.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1'. The specified file cannot be found.. File name: 'NodaTime, Version=3.1.12.0, Culture=neutral, PublicKeyToken=4226afe0d9b296d1' at Ical.Net.DataTypes.CalDateTime.get_AsUtc() at Ical.Net.DataTypes.CalDateTime.op_Subtraction(CalDateTime left, IDateTime right) at Ical.Net.DataTypes.CalDateTime.Subtract(IDateTime dt) at Ical.Net.CalendarComponents.CalendarEvent.ExtrapolateTimes(Int32 source) at Ical.Net.CalendarComponents.CalendarEvent.set_DtEnd(IDateTime value) at Ical.Net.CalendarComponents.CalendarEvent.set_End(IDateTime value)

an idea?

aguyfromdenmark commented 2 days ago

Not sure if there is a bad configuration about the package version, or maybe something else was dependent on version 3.1.12 og NodaTime. But I got the same error. I just installed version 3.1.12 of NodaTime to the project and the error went away.

tossnet commented 2 days ago

ah yes, apparently the problem is that the reference is free for the build number. That's not a very good thing to do. It causes problems. Here's an extract from .CSPROJ : <PackageReference Include="NodaTime" Version="3.1.*" />

axunonb commented 1 day ago

Thanks for the hint. Yes, package references were only included in the Ical.Net.nuspec. Thus they are not not managed by Visual Studio package manager. As there is a new minor version of NodaTime (v3.2.0) which will be referenced now. New patch version will be published shortly.