尝试在我的 mac 机器上构建 Puppeteer Sharp project 并以某种奇怪的方式失败。 克隆存储库后,创建 test server certificate 并安装 .Net Core SDK 2.2.207。 我试图在 lib 文件夹中构建解决方案:
dotnet build PuppeteerSharp.sln
构建开始并失败,AFAIK 正确方式
Restore completed in 115.15 ms for *****/workspace/puppeteer-sharp/lib/PuppeteerSharp.Tests.DumpIO/PuppeteerSharp.Tests.DumpIO.csproj.
Restore completed in 117.49 ms for *****/workspace/puppeteer-sharp/lib/PuppeteerSharp.DevicesFetcher/PuppeteerSharp.DevicesFetcher.csproj.
Restore completed in 160.85 ms for *****/workspace/puppeteer-sharp/lib/PuppeteerSharp.Tests/PuppeteerSharp.Tests.csproj.
Restore completed in 4.54 ms for *****/workspace/puppeteer-sharp/lib/PuppeteerSharp/PuppeteerSharp.csproj.
PuppeteerSharp.TestServer -> *****/workspace/puppeteer-sharp/lib/PuppeteerSharp.TestServer/bin/Debug/netcoreapp2.2/PuppeteerSharp.TestServer.dll
FrameManager.cs(102,50): error CS0121:
The call is ambiguous between the following methods or properties:
'System.Collections.Generic.CollectionExtensions.GetValueOrDefault<TKey, TValue>(System.Collections.Generic.IReadOnlyDictionary<TKey, TValue>, TKey)' and
'PuppeteerSharp.Helpers.DictionaryExtensions.GetValueOrDefault<TKey, TValue>(System.Collections.Generic.IDictionary<TKey, TValue>, TKey)'
[*****/workspace/puppeteer-sharp/lib/PuppeteerSharp/PuppeteerSharp.csproj]
...
由于类似原因,还有其他几个错误。
我的问题是我可以做什么来构建项目? 模棱两可的引用是有效的,.Net package 确实实现了与 puppeteer-sharp helper class 相同的扩展方法,并且两者都在 FrameManager.cs class
中被引用THX Murx