title: BC30203: Identifier expected VS2010 and 2012
body: <p>I'm getting an <code>BC30203: Identifier expected</code> error in my ASP.NET MVC 4 project. I have zero idea why this is happening and I'm getting extremely frustrated. I have no idea where the error is (besides the class). </p>
  
  <p>I hadn't even touched the page for days (last time it was working) and now I get the error. Clearing temp files, .NET Framework temp files don't help either, restarting, reinstalling VS. I even switched from 2010 to 2012RC with no luck. I'm at a complete loss.</p>
  
  <p>I've removed more and more code and it seems to happen whenever I declare a variable. It is not my models or anything else as they work 100%, just not in this one page.</p>
  
  <p>Here is the code from the partial view:</p>
  
  <pre><code>@ModelType Frontend.Models.Collection 
  
  @Code
      ViewData("Title") = "GetFilters"
  End Code
  
  @AddSeparator("Options")
  @Options
  
  @Helper Options()   
  
      Dim less As String=String.Empty
      @&lt;div class="ui-splitbutton filter"&gt;
          &lt;a class="@less" href="#" title="Show only basic filters" rel="nofollow"&gt;Show less&lt;/a&gt;
          &lt;a class="" href="#" title="Show all available filters" rel="nofollow"&gt;Show more&lt;/a&gt; 
      &lt;/div&gt;
  
      @&lt;div&gt;
          &lt;a class="button clear_filters filter" href="#" title="Remove all applied filters" rel="nofollow"&gt;Clear filters&lt;/a&gt;
       &lt;/div&gt;
  
  End Helper
  
  @Helper AddSeparator(text As String)                                               
      @&lt;div class="separator"&gt;
          &lt;span&gt;@text&lt;/span&gt;
      &lt;/div&gt;
  End Helper
  </code></pre>
  
  <p>Here is how I render the page:</p>
  
  <pre><code>@Code
      Html.RenderPartial("_PartialFilters", Model)
  End code
  </code></pre>
  
  <p>And here is the exception:</p>
  
  <pre><code>System.Web.HttpCompileException was unhandled by user code
    ErrorCode=-2147467259
    HResult=-2147467259
    Message=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\3a7646ef\5efed268\App_Web__partialfilters.vbhtml.34d3db15.w7n2unx9.0.vb(60): error BC30203: Identifier expected.
    Source=System.Web
    SourceCode=#ExternalChecksum("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml","{ff1816ec-aa5e-4d10-87f7-6f4963833460}","EE63B19A6BCF554D9625D51B8F673B27C85CCC09")
  '------------------------------------------------------------------------------
  ' &lt;auto-generated&gt;
  '     This code was generated by a tool.
  '     Runtime Version:4.0.30319.17626
  '
  '     Changes to this file may cause incorrect behavior and will be lost if
  '     the code is regenerated.
  ' &lt;/auto-generated&gt;
  '------------------------------------------------------------------------------
  
  Option Strict Off
  Option Explicit On
  
  Imports System
  Imports System.Collections.Generic
  Imports System.IO
  Imports System.Linq
  Imports System.Net
  Imports System.Web
  Imports System.Web.Helpers
  Imports System.Web.Mvc
  Imports System.Web.Mvc.Ajax
  Imports System.Web.Mvc.Html
  Imports System.Web.Routing
  Imports System.Web.Security
  Imports System.Web.UI
  Imports System.Web.WebPages
  
  Namespace ASP
  
      Public Class _Page_Views_Browse__PartialFilters_vbhtml
          Inherits System.Web.Mvc.WebViewPage(Of Frontend.Models.Collection)
  
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 10)
  Public Function Options() As System.Web.WebPages.HelperResult
  
  #End ExternalSource
  Return New System.Web.WebPages.HelperResult(Sub (__razor_helper_writer)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 10)
  
  
      Dim less As String=String.Empty
  
  #End ExternalSource
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 202, 4, true)
  WriteLiteralTo(__razor_helper_writer, "    ")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 202, 4, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 207, 4, true)
  WriteLiteralTo(__razor_helper_writer, "&lt;div")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 207, 4, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 211, 30, true)
  WriteLiteralTo(__razor_helper_writer, " class=""ui-splitbutton filter""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 211, 30, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 241, 13, true)
  WriteLiteralTo(__razor_helper_writer, "&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"        &lt;a")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 241, 13, true)
  WriteAttributeTo(__razor_helper_writer, "class", Tuple.Create(" class=""", 254), Tuple.Create("""", 267) _, Tuple.Create(Tuple.Create("", 262), Tuple.Create(Of System.Object, System.Int32)(less _, 262), False) _)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 268, 9, true)
  WriteLiteralTo(__razor_helper_writer, " href=""#""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 268, 9, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 277, 32, true)
  WriteLiteralTo(__razor_helper_writer, " title=""Show only basic filters""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 277, 32, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 309, 15, true)
  WriteLiteralTo(__razor_helper_writer, " rel=""nofollow""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 309, 15, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 324, 26, true)
  WriteLiteralTo(__razor_helper_writer, "&gt;Show less&lt;/a&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"        &lt;a")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 324, 26, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 350, 9, true)
  WriteLiteralTo(__razor_helper_writer, " class=""""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 350, 9, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 359, 9, true)
  WriteLiteralTo(__razor_helper_writer, " href=""#""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 359, 9, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 368, 35, true)
  WriteLiteralTo(__razor_helper_writer, " title=""Show all available filters""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 368, 35, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 403, 15, true)
  WriteLiteralTo(__razor_helper_writer, " rel=""nofollow""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 403, 15, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 418, 29, true)
  WriteLiteralTo(__razor_helper_writer, "&gt;Show more&lt;/a&gt; "&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"    &lt;/div&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 418, 29, true)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 17)
  
  
  #End ExternalSource
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 449, 4, true)
  WriteLiteralTo(__razor_helper_writer, "    ")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 449, 4, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 454, 17, true)
  WriteLiteralTo(__razor_helper_writer, "&lt;div&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"        &lt;a")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 454, 17, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 471, 36, true)
  WriteLiteralTo(__razor_helper_writer, " class=""button clear_filters filter""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 471, 36, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 507, 9, true)
  WriteLiteralTo(__razor_helper_writer, " href=""#""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 507, 9, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 516, 35, true)
  WriteLiteralTo(__razor_helper_writer, " title=""Remove all applied filters""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 516, 35, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 551, 15, true)
  WriteLiteralTo(__razor_helper_writer, " rel=""nofollow""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 551, 15, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 566, 33, true)
  WriteLiteralTo(__razor_helper_writer, "&gt;Clear filters&lt;/a&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"     &lt;/div&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 566, 33, true)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 21)
  
  
  #End ExternalSource
  End Sub)
  End Function
  
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 24)
  Public Function AddSeparator(text As String) As System.Web.WebPages.HelperResult
  
  #End ExternalSource
  Return New System.Web.WebPages.HelperResult(Sub (__razor_helper_writer)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 24)
  
  
  #End ExternalSource
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 727, 4, true)
  WriteLiteralTo(__razor_helper_writer, "    ")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 727, 4, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 732, 4, true)
  WriteLiteralTo(__razor_helper_writer, "&lt;div")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 732, 4, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 736, 18, true)
  WriteLiteralTo(__razor_helper_writer, " class=""separator""")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 736, 18, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 754, 17, true)
  WriteLiteralTo(__razor_helper_writer, "&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"        &lt;span&gt;")
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 754, 17, true)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 772, 4, false)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 26)
  WriteTo(__razor_helper_writer, text)
  
  #End ExternalSource
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 772, 4, false)
  BeginContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 776, 21, true)
  WriteLiteralTo(__razor_helper_writer, "&lt;/span&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;"    &lt;/div&gt;"&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  EndContext(__razor_helper_writer, "~/Views/Browse/_PartialFilters.vbhtml", 776, 21, true)
  
  #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml", 28)
  
  #End ExternalSource
  End Sub)
  End Function
  
  
          Public Sub New()
              MyBase.New
          End Sub
  
          Protected ReadOnly Property ApplicationInstance() As ASP.global_asax
              Get
                  Return CType(Context.ApplicationInstance,ASP.global_asax)
              End Get
          End Property
  
          Public Overrides Sub Execute()
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 40, 2, true)
  
  WriteLiteral(""&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 40, 2, true)
  
  
              #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml",3)
  
      ViewData("Title") = "GetFilters"
  
  
              #End ExternalSource
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 95, 4, true)
  
  WriteLiteral(""&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 95, 4, true)
  
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 100, 23, false)
  
  
              #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml",7)
  Write(AddSeparator("Options"))
  
  
              #End ExternalSource
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 100, 23, false)
  
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 123, 2, true)
  
  WriteLiteral(""&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 123, 2, true)
  
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 126, 7, false)
  
  
              #ExternalSource("C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\_PartialFilters.vbhtml",8)
  Write(Options)
  
  
              #End ExternalSource
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 126, 7, false)
  
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 133, 4, true)
  
  WriteLiteral(""&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 133, 4, true)
  
  BeginContext("~/Views/Browse/_PartialFilters.vbhtml", 638, 4, true)
  
  WriteLiteral(""&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10)&amp;Global.Microsoft.VisualBasic.ChrW(13)&amp;Global.Microsoft.VisualBasic.ChrW(10))
  
  EndContext("~/Views/Browse/_PartialFilters.vbhtml", 638, 4, true)
  
          End Sub
      End Class
  End Namespace
  
    WebEventCode=0
    StackTrace:
         at System.Web.Compilation.AssemblyBuilder.Compile()
         at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
         at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
         at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
         at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
         at System.Web.Compilation.BuildManager.GetObjectFactory(String virtualPath, Boolean throwIfNotFound)
         at System.Web.Mvc.BuildManagerWrapper.System.Web.Mvc.IBuildManager.FileExists(String virtualPath)
         at System.Web.Mvc.BuildManagerViewEngine.FileExists(ControllerContext controllerContext, String virtualPath)
         at System.Web.Mvc.VirtualPathProviderViewEngine.&lt;&gt;c__DisplayClass4.&lt;GetPathFromGeneralName&gt;b__0(String path)
         at System.Web.WebPages.DefaultDisplayMode.GetDisplayInfo(HttpContextBase httpContext, String virtualPath, Func`2 virtualPathExists)
         at System.Web.WebPages.DisplayModeProvider.&lt;&gt;c__DisplayClassb.&lt;GetDisplayInfoForVirtualPath&gt;b__8(IDisplayMode mode)
         at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
         at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
         at System.Web.WebPages.DisplayModeProvider.GetDisplayInfoForVirtualPath(String virtualPath, HttpContextBase httpContext, Func`2 virtualPathExists, IDisplayMode currentDisplayMode, Boolean requireConsistentDisplayMode)
         at System.Web.WebPages.DisplayModeProvider.GetDisplayInfoForVirtualPath(String virtualPath, HttpContextBase httpContext, Func`2 virtualPathExists, IDisplayMode currentDisplayMode)
         at System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromGeneralName(ControllerContext controllerContext, List`1 locations, String name, String controllerName, String areaName, String cacheKey, String[]&amp; searchedLocations)
         at System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String cacheKeyPrefix, Boolean useCache, String[]&amp; searchedLocations)
         at System.Web.Mvc.VirtualPathProviderViewEngine.FindPartialView(ControllerContext controllerContext, String partialViewName, Boolean useCache)
         at System.Web.Mvc.ViewEngineCollection.&lt;&gt;c__DisplayClass8.&lt;FindPartialView&gt;b__7(IViewEngine e)
         at System.Web.Mvc.ViewEngineCollection.Find(Func`2 lookup, Boolean trackSearchedPaths)
         at System.Web.Mvc.ViewEngineCollection.Find(Func`2 cacheLocator, Func`2 locator)
         at System.Web.Mvc.ViewEngineCollection.FindPartialView(ControllerContext controllerContext, String partialViewName)
         at System.Web.Mvc.HtmlHelper.FindPartialView(ViewContext viewContext, String partialViewName, ViewEngineCollection viewEngineCollection)
         at System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection)
         at System.Web.Mvc.Html.RenderPartialExtensions.RenderPartial(HtmlHelper htmlHelper, String partialViewName, Object model)
         at ASP._Page_Views_Browse_Index_vbhtml.Execute() in C:\Users\Amy Pond\Documents\ilovetv\Code\Store\Frontend\Views\Browse\Index.vbhtml:line 16
         at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
         at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
         at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
         at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
         at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
         at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
         at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
         at System.Web.Mvc.ControllerActionInvoker.&lt;&gt;c__DisplayClass1a.&lt;InvokeActionResultWithFilters&gt;b__17()
         at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
    InnerException: 
  </code></pre>