2016-07-14 72 views
6

我已經在VS2015社區中製作的項目上應用了Gulp。但是,當我使用任務運行資源管理器時,出現一個對話框,指出「異常已被調用的目標拋出。」我嘗試在「配置外部Web工具」中執行(PATH)的事情,但它沒有幫助。任務運行資源管理器不工作

NPM安裝正在運行,Gulp正在正確執行。

我使用以下版本

  • 的.NET Framework 4.6.1
  • 咕嘟咕嘟v1.3.15
  • NPM v1.3.15
  • 節點V5.3.0

此外,當我運行該項目並打開Task Runner Explorer時,我有以下例外情況:

An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\marvin\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml". 
Exception details: 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object. 
    at Microsoft.VisualStudio.TaskRunnerExplorer.TaskRunnerUserControl.InitializeControl(Object sender, EventArgs e) 
    at System.Windows.FrameworkElement.RaiseInitialized(EventPrivateKey key, EventArgs e) 
    at System.Windows.FrameworkElement.OnInitialized(EventArgs e) 
    at System.Windows.FrameworkElement.TryFireInitialized() 
    at System.Windows.FrameworkElement.EndInit() 
    at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin) 
    at MS.Internal.Xaml.Runtime.PartialTrustTolerantRuntime.InitializationGuard(XamlType xamlType, Object obj, Boolean begin) 
    at System.Xaml.XamlObjectWriter.Logic_EndInit(ObjectWriterContext ctx) 
    at System.Xaml.XamlObjectWriter.WriteEndObject() 
    at System.Xaml.XamlWriter.WriteNode(XamlReader reader) 
    at System.Windows.Markup.WpfXamlLoader.TransformNodes(XamlReader xamlReader, XamlObjectWriter xamlWriter, Boolean onlyLoadOneNode, Boolean skipJournaledProperties, Boolean shouldPassLineNumberInfo, IXamlLineInfo xamlLineInfo, IXamlLineInfoConsumer xamlLineInfoConsumer, XamlContextStack`1 stack, IStyleConnector styleConnector) 
    at System.Windows.Markup.WpfXamlLoader.Load(XamlReader xamlReader, IXamlObjectWriterFactory writerFactory, Boolean skipJournaledProperties, Object rootObject, XamlObjectWriterSettings settings, Uri baseUri) 
    at System.Windows.Markup.WpfXamlLoader.LoadBaml(XamlReader xamlReader, Boolean skipJournaledProperties, Object rootObject, XamlAccessLevel accessLevel, Uri baseUri) 
    at System.Windows.Markup.XamlReader.LoadBaml(Stream stream, ParserContext parserContext, Object parent, Boolean closeStream) 
    at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) 
    at Microsoft.VisualStudio.TaskRunnerExplorer.TaskRunnerUserControl.InitializeComponent() 
    at Microsoft.VisualStudio.TaskRunnerExplorer.TaskRunnerToolWindow..ctor() 
    --- End of inner exception stack trace --- 
    at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) 
    at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) 
    at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) 
    at System.Activator.CreateInstance(Type type, Boolean nonPublic) 
    at System.Activator.CreateInstance(Type type) 
    at Microsoft.VisualStudio.Shell.Package.InstantiateToolWindow(Type toolWindowType) 
    at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, UInt32 flags) 
    at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool) 
    at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool) 
    at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Guid& toolWindowType, Int32 id) 
    at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id) 
    at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent() 

回答

7

我有同樣的錯誤,並注意到我的C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools目錄是空的。

通過重新安裝Microsoft ASP.NET and Web Tools擴展來修復它。

+0

它也解決了我的問題!,tnx。 只是一件事:嘗試以這種方式從cmd運行此Web工具擴展: 「DotNetCore.1.0.0-VS2015Tools.Preview2.exe SKIP_VSU_CHECK = 1」。 (這會在安裝前跳過對當前版本號的任何檢查)。 – Dudi

+0

如果可以幫助其他人,則無法從VS Extensions和Updates中卸載並重新安裝。您需要下載擴展名exe並卸載並安裝,或使用修復選項。 – gitsitgo

相關問題