Update The Visual Studio Extension targeting .Net 4.8, and Fluxor supports that framework.
I have a Visual Studio Extension project (.net 4.8). I've added a NuGet package reference to Fluxor, but as soon as I reference any type within that class library I get the following exception
System.IO.FileNotFoundException: 'Could not load file or assembly 'Fluxor, Version=5.9.1.0, Culture=neutral, PublicKeyToken=6e6412da1d5ce8eb' or one of its dependencies. The system cannot find the file specified.'
public sealed class FeatureExplorerPackage : AsyncPackage
{
protected override async Task InitializeAsync(
CancellationToken cancellationToken,
IProgress<ServiceProgressData> progress)
{
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
InitializeState();
}
// Exception is thrown when trying to step into this method
private void InitializeState()
{
IStore store = null!;
}
Can anyone tell me how to fix this?
I thought this was really silly - but the only way I could get it to work:
You cannot refer to NuGets your templates are going to use - you need to include them in the VSIX.
I am not sure that this is the culprit in your case - but try and include the whole nupkg as content and mark "Include in VSIX" like the image shows: