aaronpowell / FSharp.CosmosDb

An F# wrapper around Cosmos DB's .NET SDK to make it more friendly for F# developers
MIT License
79 stars 12 forks source link

Analyzer not loading #35

Closed random82 closed 3 years ago

random82 commented 4 years ago

I'm trying to use the CosmosDB analyzer but it doesn't load one of the dependencies

[19:04:39.861 ERR] [Analyzers] Analyzer Analyzer errored while processing api\src\FooHandler.fs: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Azure.Cosmos, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified. ---> System.IO.FileNotFoundException: Could not load the specified file.
   at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingEvent(AssemblyName assemblyName)
[....]
   at FSharp.Analyzers.SDK.Client.getAnalyzerFromMemberInfo@39-1.Invoke(Context ctx)
   at FSharp.Analyzers.SDK.Client.runAnalyzersSafely@117.Invoke(Tuple`2 tupledArg)

.vscode\settings.json

{
    "FSharp.enableAnalyzers": true,
    "FSharp.analyzersPath": [
        "packages/Analyzers",
        "analyzers",
        "./analyzers"
    ]
}

Folder structure:

api
├───.ionide
├───.vscode
│        └───settings.json
├───analyzers
│   ├───azure.core
│   │   └───1.0.0
│   ├───azure.cosmos
│   │   └───4.0.0-preview3
│   ├───fsharp.analyzers.sdk
│   │   └───0.4.1
│   ├───fsharp.compiler.service
│   │   └───35.0.0
│   ├───fsharp.control.asyncseq
│   │   └───2.0.23
│   ├───fsharp.core
│   │   ├───4.7.0
│   │   └───4.7.1
│   ├───fsharp.cosmosdb
│   │   └───0.2.0
│   ├───fsharp.cosmosdb.analyzer
│   │   └───0.2.0

[...]

├───src [*.fsproject]
│   └───applicationSettings.Development.json
├───tests
└───applicationSettings.Development.json
aaronpowell commented 4 years ago

Have you got a repo that i can see it broken in?