C#编译器在没有错误消息的情况下崩溃

C#编译器在没有错误消息的情况下崩溃,c#,.net,C#,.net,上面的代码会使编译器在构建时崩溃。 我希望编译器停止时会显示一条有意义的错误消息,而不是试图编译代码。 这可能是编译器中的错误吗?如果没有,如何解决此错误?这不是编译器中的错误;编译器会给出正确的错误消息。 相反,这是VisualStudio编辑器语言服务中的一个bug,它导致VisualStudio崩溃 但是,您的代码无论如何都是非法的\uuuu arglist(…)表达式只能用于调用采用\uuuu arglist的函数。Visual Studio中出现的问题与编译器无关: VS2010 Sy

上面的代码会使编译器在构建时崩溃。 我希望编译器停止时会显示一条有意义的错误消息,而不是试图编译代码。
这可能是编译器中的错误吗?如果没有,如何解决此错误?

这不是编译器中的错误;编译器会给出正确的错误消息。
相反,这是VisualStudio编辑器语言服务中的一个bug,它导致VisualStudio崩溃


但是,您的代码无论如何都是非法的<代码>\uuuu arglist(…)表达式只能用于调用采用
\uuuu arglist

的函数。Visual Studio中出现的问题与编译器无关:

VS2010

System.AccessViolationException

试图读取或写入受保护的内存。这通常表示其他内存已损坏

来源

var xrr = __arglist(Convert.ToUInt32(1), 
                    Convert.ToUInt32(2), 
                    Convert.ToUInt32(3));
Microsoft.VisualStudio.CSharp.Services.Language

堆栈跟踪

var xrr = __arglist(Convert.ToUInt32(1), 
                    Convert.ToUInt32(2), 
                    Convert.ToUInt32(3));
位于Microsoft.RestrictedUsage.CSharp.Compiler.IDE.CompilerIDEInterop.Compile\u CompileMethod(句柄句柄、句柄baseNodeOwner、IntPtr BaseNodeOpter、句柄和树句柄)
在Microsoft.RestrictedUsage.CSharp.Compiler.IDE.IDECompilation.CompileMethod(ParseTreeNode节点)
位于Microsoft.RestrictedUsage.CSharp.Compiler.IDE.idecompileMethod(MethodBaseNode方法)
在Microsoft.RestrictedUsage.CSharp.semanticParsereTreevisitor.c_udisplayClassC.b_ua()上
在Microsoft.RestrictedUsage.CSharp.Extensions.ExpressionTreeFinder.get_ExpressionTree()上
在Microsoft.RestrictedUsage.CSharp.Extensions.CompilationExtensions.FindExpressionTree(编译编译、源文件源文件、ParseTreeNode leafNode)
位于Microsoft.VisualStudio.Labs.MemberContainsProvider.MemberContainsSiteMsource.GetUniqueLocals(CSharpMemberReference成员、ParsetRenode节点、SourceLocation loc、Dictionary`2 Dictionary)
在Microsoft.VisualStudio.Labs.MemberContainsProvider.MemberContainsSiteMsource.GetUniqueLocals(字典'2 locals')上
在Microsoft.VisualStudio.Labs.MemberContainsProvider.MemberContainsSiteMsource.GetMemberChildren()上
在Microsoft.VisualStudio.Labs.MemberContainsProvider.MemberContainsSiteMsource.InitializeItemCollection()上
在Microsoft.VisualStudio.Labs.ItemsSource`2.InitializeItems()上
在Microsoft.VisualStudio.Labs.ItemsSource`2.get_Items()上
在Microsoft.VisualStudio.Labs.AggregateItemsSource.InitializeItemCollection()上
在Microsoft.VisualStudio.Labs.ItemsSource`2.InitializeItems()上
在Microsoft.VisualStudio.Labs.ItemsSource`2.get_Items()上
在Microsoft.VisualStudio.Labs.BrowserNavigationEntry.GetTree(字符串关系,Func`2 treeActivator)
在Microsoft.VisualStudio.Labs.Browser.OnSelectedRelationshipChanged(DependencyObject对象,DependencyPropertyChangedEventArgs)
位于System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)
在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex EntryIndex,DependencyProperty dp,PropertyMetadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔强制WithDeferredReference,布尔强制WithCurrentValue,OperationType OperationType)
位于System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp、对象值、PropertyMetadata元数据、布尔强制WithDeferredReference、布尔强制WithCurrentValue、OperationType OperationType、布尔isInternal)
位于System.Windows.DependencyObject.SetValue(DependencyProperty dp,对象值)
在Microsoft.VisualStudio.Labs.Browser.OnCurrentNavigationEntryChanged(DependencyObject对象,DependencyPropertyChangedEventArgs参数)中
位于System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
位于System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs参数)
在System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex EntryIndex,DependencyProperty dp,PropertyMetadata,EffectiveValueEntry oldEntry,EffectiveValueEntry&newEntry,布尔强制WithDeferredReference,布尔强制WithCurrentValue,OperationType OperationType)
位于System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp、对象值、PropertyMetadata元数据、布尔强制WithDeferredReference、布尔强制WithCurrentValue、OperationType OperationType、布尔isInternal)
位于System.Windows.DependencyObject.SetValue(DependencyPropertyKey,对象值)
在Microsoft.VisualStudio.Labs.Browser.NavigateTo(对象根目录、IRelationship关系)
位于Microsoft.VisualStudio.Labs.Browser.NavigateTo(对象根目录)
在Microsoft.VisualStudio.Labs.TextViewCreationListener.TextViewSinkManager.TextViewSink.RenderSelectionPopup(对象项,PopupType PopupType)
在Microsoft.VisualStudio.Labs.TextViewCreationListener.TextViewSinkManager.TextViewSink.PotentiallyShowCSharpPopup(CSharpTextSelection活动选择,PopupType PopupType)
在Microsoft.VisualStudio.Labs.TextViewCreationListener.TextViewSinkManager.TextViewSink.textView\u鼠标上方(对象发送方,鼠标上方目标)
在Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.RaiseHoverEvents()上
位于Microsoft.VisualStudio.Text.Editor.Implementation.WpfTextView.OnHoverTimer(对象发送方,事件参数e)
位于System.Windows.Threading.Dispatchermer.FireTick(未使用的对象)
位于System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调、对象参数、Int32 numArgs)
位于MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(对象源、委托方法、对象参数、Int32 numArgs、委托catchHandler)
位于System.Windows.Threading.DispatcherOper