LinqPad cannot load my new driver -- it's appending a 65535 version suffix
I'm testing a new LinqPad driver I created and published to nuget.org. The package is named Metalama.LinqPad. It allows to open Visual Studio projects and solutions in LinqPad, browse the code model, diagnostics, and so on.
The package works with a local build and a full version number, however, in our public build, as published on nuget.org, it does not work.
It says: FileNotFoundException. Cannot load Metalama.LinqPad version 0.5.0.65535. But the version 65535 is not mine, it has been added by LinqPad. The assembly name is Metalama.LinqPad, Version=0.5.0.0, Culture=neutral, PublicKeyToken=772fca7b1db8db06 and the assembly file version is 0.5.0, i.e. the fourth component is not specified, which I guess is represented as -1 == 65535. LinqPad should probably not add the version component when it is not specified.
This error is being generated by WPF. Go to your dialog and click on the InitializeComponent method to go to its auto-generated definition. It should contain something like this:
Uri resourceLocater = new Uri("/Test.LINQPadDriver;component/connectiondialog.xaml", UriKind.Relative);
What does it say in your case? Does it include a version?
It had this:
Anyway. I worked around the issue by generating an assembly version that has a trailing zero. I did not see the issue in development builds because we set the 4 version components in development builds, but not in public builds.
I will release the updated package in a couple of days.