Visual Studio for Mac:无法添加Web引用

时间:2018-05-11 18:02:06

标签: visual-studio wcf wsdl .net-core visual-studio-mac

我想按照以下步骤添加Web服务引用:

  1. 右键单击项目
  2. 添加网络参考
  3. 粘贴WSDL端点
  4. 但是当我点击“确定”按钮

      

    无法添加网络参考:   必须在前台线程上调用“DotNetProject_Modified”。

    我有以下配置:

    Visual Studio for Mac:

    版本: 7.5(建立1254)

    的NuGet   版本: 4.3.1.4445

    .NET Core

    运行时版本:     2.0.5     2.0.0

    完整的错误日志:

        ERROR [2018-05-12 14:00:46Z]: The web reference could not be added
    System.InvalidOperationException: 'DotNetProject_Modified' must be called on the foreground thread.
      at Microsoft.CodeAnalysis.Razor.ForegroundDispatcher.AssertForegroundThread (System.String caller) [0x0001f] in C:\BuildAgent\work\9f4c49cb464f2a60\src\Microsoft.CodeAnalysis.Razor.Workspaces\ForegroundDispatcher.cs:24 
      at Microsoft.VisualStudio.Mac.LanguageServices.Razor.ProjectSystem.RazorProjectHostBase.DotNetProject_Modified (System.Object sender, MonoDevelop.Projects.SolutionItemModifiedEventArgs args) [0x0000e] in C:\BuildAgent\work\9f4c49cb464f2a60\src\Microsoft.VisualStudio.Mac.LanguageServices.Razor\ProjectSystem\RazorProjectHostBase.cs:124 
      at (wrapper delegate-invoke) <Module>.invoke_void_object_SolutionItemModifiedEventArgs(object,MonoDevelop.Projects.SolutionItemModifiedEventArgs)
      at MonoDevelop.Projects.SolutionFolderItem.OnModified (MonoDevelop.Projects.SolutionItemModifiedEventArgs args) [0x00016] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolderItem.cs:452 
      at MonoDevelop.Projects.Project.OnModified (MonoDevelop.Projects.SolutionItemModifiedEventArgs args) [0x0001a] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:408 
      at MonoDevelop.Projects.SolutionFolderItem.NotifyModified (System.String hint) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/SolutionFolderItem.cs:439 
      at MonoDevelop.Projects.Project.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00075] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:2337 
      at MonoDevelop.Projects.DotNetProject.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00030] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/DotNetProject.cs:1767 
      at MonoDevelop.Projects.Project+DefaultMSBuildProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:4636 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.DotNetCore.DotNetCoreProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00019] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/addins/MonoDevelop.DotNetCore/MonoDevelop.DotNetCore/DotNetCoreProjectExtension.cs:616 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.ProjectExtension.OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectExtension.cs:266 
      at MonoDevelop.Projects.Project.NotifyItemsAdded (System.Collections.Generic.IEnumerable`1[T] objs) [0x00000] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/Project.cs:2315 
      at MonoDevelop.Projects.ProjectItemCollection`1[T].NotifyAdded (System.Collections.Generic.IEnumerable`1[T] items, System.Boolean comesFromParent) [0x00071] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs:150 
      at MonoDevelop.Projects.ProjectItemCollection`1[T].OnItemsAdded (System.Collections.Generic.IEnumerable`1[T] items) [0x00010] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ProjectItemCollection.cs:98 
      at MonoDevelop.Projects.ItemCollection`1[T].Add (T item) [0x00018] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Projects/ItemCollection.cs:66 
      at MonoDevelop.WebReferences.WS.WebServiceDiscoveryResultWS+<>c__DisplayClass8_0.<GenerateDescriptionFiles>b__0 () [0x0005a] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs:94 
      at System.Threading.Tasks.Task`1[TResult].InnerInvoke () [0x0000f] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Future.cs:680 
      at System.Threading.Tasks.Task.Execute () [0x00010] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2509 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
      at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
      at MonoDevelop.WebReferences.WS.WebServiceDiscoveryResultWS+<GenerateDescriptionFiles>d__8.MoveNext () [0x000b0] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WS/WebServiceDiscoveryResultWS.cs:89 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
      at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357 
      at MonoDevelop.WebReferences.WebServiceDiscoveryResult+<GenerateFiles>d__13.MoveNext () [0x000f7] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences/WebServiceDiscoveryResult.cs:94 
    --- End of stack trace from previous location where exception was thrown ---
      at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152 
      at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00037] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187 
      at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156 
      at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128 
      at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113 
      at MonoDevelop.WebReferences.Commands.WebReferenceCommandHandler+<NewWebReference>d__1.MoveNext () [0x00158] in /Users/builder/data/lanes/5965/498923ea/source/monodevelop/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Commands/WebReferenceCommandHandler.cs:49 
    2018-05-12 14:02:39.693 VisualStudio[456:3934] customMenuItemViewMouseMoved: GetEventParameter(kEventParamWindowRef) failed: -9870
    

0 个答案:

没有答案