It was suggested to me to ask this here,在刚刚创建的项目文件夹上运行dotnet restore
和dotnet run
时没有问题,但是VSCode Q#扩展名无法像这样工作,而且效果不佳指针出了什么问题。
[Error - 10:35:54 PM] MSBuild error in /opt/dotnet/sdk/2.2.100/NuGet.targets(123,7): The "RestoreForceEvaluate" parameter is not supported by the "RestoreTask" task. Verify the parameter exists on the task, and it is a settable public instance property.
[Error - 10:35:54 PM] MSBuild error in /opt/dotnet/sdk/2.2.100/NuGet.targets(114,5): The "RestoreTask" task could not be initialized with its input parameters.
[Error - 10:35:54 PM] Failed to restore project '.../Bell/Bell.csproj'.
[Error - 10:35:54 PM] MSBuild error in /opt/dotnet/sdk/2.2.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(208,5): The "ResolvePackageAssets" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'NuGet.Frameworks, Version=4.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Could not find or load a specific file. (Exception from HRESULT: 0x80131621)
File name: 'NuGet.Frameworks, Version=4.9.0.6, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheWriter..ctor(ResolvePackageAssets task, Stream stream)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader.CreateReaderFromMemory(ResolvePackageAssets task, Byte[] settingsHash)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.CacheReader..ctor(ResolvePackageAssets task)
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ReadItemGroups()
at Microsoft.NET.Build.Tasks.ResolvePackageAssets.ExecuteCore()
at Microsoft.NET.Build.Tasks.TaskBase.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
[Error - 10:35:54 PM] Failed to resolve assembly references for project
我相信我应该在VSCode Q#扩展Bug跟踪程序上提出此问题,但是我找不到该跟踪程序,因此如最初提到的那样,建议在这里提出。谢谢!
答案 0 :(得分:1)
这可能是this question的另一种表现-Q#IntelliSense对2.1.402以上的.NET Core版本不满意,看起来您的.NET Core版本为2.2.100。我们正在努力解决;同时,降级到早期版本应该会有所帮助。
更新:QDK版本0.4中应该已解决此问题。