This project in Vs2008, which targets .net 3.5, is used to compile views.
Vs2010 Targeting.net 4.0, the following view code is not perceived as an error, and I still could not listen to mvcBuildview trace / debug output:
<%{ %>
The declaration of completely unintended code is not matched, and there was no partial representation inheriting from the nonexistent namespace / class.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWithBuildViews|AnyCPU' "> <EnableUpdateable>false</EnableUpdateable> <MvcBuildViews>true</MvcBuildViews> <DebugSymbols>true</DebugSymbols> <OutputPath>bin</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>AnyCPU</PlatformTarget> <CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> <CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <RunCodeAnalysis>true</RunCodeAnalysis> </PropertyGroup>
My BeforeBuild:
<Target Name="BeforeBuild"> <WriteLinesToFile File="$(OutputPath)\env.config" Lines="$(Configuration)" Overwrite="true"> </WriteLinesToFile>
My AfterBuild:
<Target Name="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"> <Message Importance="high" Text="Precompiling views" />
I know that the MvcBuildViews property MvcBuildViews true because the message Precompiling views . Compilation is successful, but it does not catch view compilation errors.
I have Vs2010 ultimate, vs 2008 developer + database version on this machine.
Thus, either it compiles ignoring errors with some combinations of corrections that I tried, or errors using
Error 410 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. web.config 100
The marked sections are the things that I tried. Earlier I tried the corrections from these posts:
source share