2
在Visual Studio 2012中,我試圖在我的剃鬚刀(.cshtml)文件中設置斷點,但每次嘗試時都會說斷點不能爲ser,否則我收到以下錯誤消息:在Visual Studio 2012中設置Razor文件中的斷點
無法設置以下斷點: ... 公共語言運行時無法設置斷點。
在Visual Studio 2012中,我試圖在我的剃鬚刀(.cshtml)文件中設置斷點,但每次嘗試時都會說斷點不能爲ser,否則我收到以下錯誤消息:在Visual Studio 2012中設置Razor文件中的斷點
無法設置以下斷點: ... 公共語言運行時無法設置斷點。
我發現,在我的web.config,我有以下行:
<compilation
debug="true" targetFramework="4.0"
assemblyPostProcessorType="Microsoft.VisualStudio.Enterprise.Common.AspPerformanceInstrumenter, Microsoft.VisualStudio.Enterprise.AspNetHelper, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
的assemblyPostProcessorType屬性是造成問題。我假設它對動態生成的剃鬚刀組件進行了一些處理,以打破調試。
所以我只是刪除了屬性得到:
<compilation debug="true" targetFramework="4.0" />