0

我下载了必要的 c# 库并尝试进行基本连接,但它似乎无法识别 C# 库,并且尝试访问没有可用源消息的文件失败。

Locating source for 'C:\build\mongo-csharp-driver\Driver
\Core\MongoClient.cs'. Checksum: MD5 {7f d4 a9 70 6d 1 24 e 31 bb 0 2e 91 6 8c 9e}
The file 'C:\build\mongo-csharp-driver\Driver\Core\MongoClient.cs' 
does not exist.

我使用 Nuget 包进行安装,它似乎正在寻找不正确的源文件夹。这是我的代码虽然......

    Dim connectionString As String = "mongodb://127.0.0.1"
    Dim client = New MongoClient(connectionString)
    Dim server As MongoServer
    Dim db As MongoDatabase
    Dim siteCollection As MongoCollection

    server = client.GetServer()

    db = server.GetDatabase("test")
    siteCollection = db("test")
4

0 回答 0