-
Couldn't load subscription status.
- Fork 247
Fix: Exception for Blazor WebAssembly using FileVersionInfo #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Correct fallback solution when 'FileVersionInfo.GetVersionInfo' is not available on a specific platform. Synchronize versions.
Correct fallback solution when 'FileVersionInfo.GetVersionInfo' is not available on a specific platform. Synchronize versions.
Ical.Net/Constants.cs
Outdated
| return fileVersionInfo.FileVersion | ||
| ?? assembly.GetName().Version?.ToString() // will only change for major versions | ||
| ?? "1.0.0.0"; | ||
| try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code introduced in this GitHub comment doesn't work for WebAssembly? The advantage was that we wouldn't need the try/catch. In both cases, caching the value would be advantageous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, was too fast with my fix. Working indeed, so you can throw away the pull request and replace with the suggested code.
Ical.Net/Ical.Net.csproj
Outdated
| <AssemblyOriginatorKeyFile>..\IcalNetStrongnameKey.snk</AssemblyOriginatorKeyFile> | ||
| <nullable>enable</nullable> | ||
| <LangVersion>latest</LangVersion> | ||
| <AssemblyVersion>2.0</AssemblyVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All version attributes get set during publishing with the CI workflow.
Mixing up 2.0 with the iCalendar version defined in RFC 5545 Section 3.7.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood. Anyway obsolete see comment above.
Ical.Net/Constants.cs
Outdated
| } | ||
|
|
||
| return version ?? "1.0.0.0"; | ||
| return version ?? "2.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see below regarding "2.0"
|
Appreciate your feedback and PR. Why not update and we're done? |
Remove not needed change
Done! I have a heavy solution to check. Will report when I find something else. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tnx



Correct fallback solution when 'FileVersionInfo.GetVersionInfo' is not available on a specific platform.
Synchronize versions.
Resolves #819