Skip to content

Missing Path Parameter #204

Closed Answered by Foxtrek64
Foxtrek64 asked this question in Q&A
Discussion options

You must be logged in to vote

I was eventually able to find it. In my footer, I try to get the version version of my app using

Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);

The second line is what was throwing the error. So I changed the code to this and it worked:

Assembly? assembly = Assembly.GetAssembly(typeof(Program));

string appVersion = assembly?.GetName().Version?.ToString(3) ?? "1.0.0";

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Foxtrek64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant