在VS 2013中打开我的ASP.NET网页解决方案(我在WebMatrix中开始)时,我现在得到这个错误信息:
遇到异常。这可能是由扩展引起的。 您可以通过检查文件' ... \ AppData \ Roaming \ Microsoft \ VisualStudio \ 12.0 \ ActivityLog.xml'
来获取更多信息
我搜索了这个词"例外"并发现了这个:
<description>
System.ComponentModel.Composition.CompositionException: The composition produced a single
composition error. The root cause is provided below. Review the CompositionException.Errors property for more
detailed information.

1) No exports were found that match the constraint:

	ContractName	Microsoft.VisualStudio.JSLS.Extensibility.IJavaScriptServicesProvider�
A;	RequiredTypeIdentity	Microsoft.VisualStudio.JSLS.Extensibility.IJavaScriptServicesProvider


Resulting in: Cannot set import
'Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter._javaScriptServicesProvider
(ContractName="Microsoft.VisualStudio.JSLS.Extensibility.IJavaScriptServicesProvider")' on part
'Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter'.
Eleme
nt: Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter._javaScriptServicesProvider
(ContractName="Microsoft.VisualStudio.JSLS.Extensibility.IJavaScriptServicesProvider") -->
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter


at System.ComponentModel.Composition.CompositionResult.ThrowOnErrors(AtomicComposition
atomicComposition)
 at
System.ComponentModel.Composition.Hosting.ImportEngine.SatisfyImportsOnce(ComposablePart
part)
 at
System.ComponentModel.Composition.Hosting.CompositionContainer.SatisfyImportsOnce(ComposablePart
part)
 at System.ComponentModel.Composition.AttributedModelServices.SatisfyImportsOnce
(ICompositionService compositionService, Object attributedPart)
 at
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.CommandFilter..ctor(ITextView
textView)
 at
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.HookupCommandFilter
(IWpfTextView textView, IVsTextView textViewAdapter)
 at
Microsoft.VisualStudio.JavaScript.Web.Extensions.Commands.WpfTextViewConnectionListener.SubjectBuffersConnecte
d(IWpfTextView textView, ConnectionReason reason, Collection`1 subjectBuffers)
 at
Microsoft.VisualStudio.Text.Editor.Implementation.ConnectionManager.<>c__DisplayClass8.<.ctor>b__1
()
 at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object
errorSource, Action call)
</description>
......但它仍然没有告诉我太多,AFAICT。什么扩展导致问题,我该怎么办呢?
然后我搜索了&#34;扩展&#34;并找到了这些条目:
<entry>
<record>954</record>
<time>2015/03/26 15:39:58.007</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [MadsKristensen.Image_Optimizer_Extension.Image_Optimizer_ExtensionPackage,
Image Optimizer Extension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=16b83d3f826a86c5]</description>
<guid>{BF95754F-93D3-42FF-BFE3-E05D23188B08}</guid>
</entry>
<entry>
<record>955</record>
<time>2015/03/26 15:39:58.491</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [MadsKristensen.Image_Optimizer_Extension.Image_Optimizer_ExtensionPackage,
Image Optimizer Extension, Version=1.0.0.0, Culture=neutral, PublicKeyToken=16b83d3f826a86c5]</description>
<guid>{BF95754F-93D3-42FF-BFE3-E05D23188B08}</guid>
</entry>
...和
<entry>
<record>963</record>
<time>2015/03/26 15:40:13.623</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [JavaScriptWebExtensionsPackage]</description>
<guid>{30DB8F9B-EC9F-44D6-B377-83C7C27A1A8B}</guid>
</entry>
<entry>
<record>964</record>
<time>2015/03/26 15:40:13.717</time>
<type>Information</type>
<source>VisualStudio</source>
<description>End package load [JavaScriptWebExtensionsPackage]</description>
<guid>{30DB8F9B-EC9F-44D6-B377-83C7C27A1A8B}</guid>
</entry>
<entry>
......但似乎&#34;例外&#34;进入是关键。
我的猜测是,JavaScript扩展程序已经过时了,因为JavaScript不再着色 - 它只是白色的黑色:
但是,我不知道该怎么办。
注意:此项目在前几次确实打开,没有例外。它刚刚决定它昨晚没有延伸。改变了什么?
无论如何,可以从here
访问整个ActivityLog.xml我的jQuery已经恢复了颜色;也许它与更新几个软件包有关,这些软件包旁边是#34; Quick Launch&#34;在NE角落试图吸引我的注意力。这些是:
答案 0 :(得分:1)
发生这种情况时,请检查&#34;赛车旗帜&#34;在VS的NE角落,看看它是否告知你任何更新;如果是,请应用这些更新。这适用于我的情况。具体来说,我更新了:
......问题消失了。