spares.u4global.com would like to store information (cookies) on your computer. By continuing to use this site, you consent to this.

Razor Compilation Error

Razor Compilation Error

We tried, we really did, but we just can't compile your view.

We're sorry :-(

Graphics courtesy of the awesome Matthew Inman

Error Details

Error compiling template: Views/ViewSiteFolder.cshtml

Errors:
[CS0016] Line: 0 Column: 0 - Could not write to output file 'c:\Windows\Temp\Temp_55b6b3d08cdc40ed93710b9ff8044719.dll' -- 'The requested operation could not be completed due to a file system limitation ' (show)

Details:
@using System.Globalization
@using System.Linq
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Overseer.Website.ViewModels.ViewSiteFolder>
<div class="container">

<h1 class="mb-3">@Model.Heading</h1>

@if (!string.IsNullOrWhiteSpace(Model.Content))
{
@Html.Raw(Model.Content)
}

@if (Model.Children.Count > 0)
{
<div class="row align-items-stretch" id="products-container" style="opacity:0">
@foreach (var child in Model.Children)
{
<div class="col-6 col-md-4 col-lg-3 col-xl-2 mb-3">
<a href="/@child.TrailReference" class="card btn btn-outline-primary p-0 h-100">
<div class="card-img-top d-flex flex-column justify-content-center align-items-center bg-white overflow-hidden">
@if (child.ViewSiteImages.Count > 0)
{
<img class="img-fluid" alt="" src="/Content/images/thumbnail/250/250/@child.FirstViewSiteImage.Path" />
}
else
{
<img class="img-fluid p-2" alt="" src="/Content/images/thumbnail/250/250/default.jpg" />
}
</div>
<div class="card-body">
@child.Heading
</div>
</a>
</div>
}
</div>
}
</div>

@section Scripts
{
<script>
$(function () {
var $window = $(window)
var $productsContainer = $('#products-container')
var $cardImageContainers = $('.card-img-top')
$window.on('resize', onWindowResize)
function onWindowResize(e) {
var width = $cardImageContainers.innerWidth()
$cardImageContainers.height(width)
}
onWindowResize()
$productsContainer.fadeTo(500, 1)
})
</script>
}

Compilation Source:
//------------------------------------------------------------------------------
Line 1: // <auto-generated>
Line 2: // This code was generated by a tool.
Line 3: // Runtime Version:4.0.30319.42000
Line 4: //
Line 5: // Changes to this file may cause incorrect behavior and will be lost if
Line 6: // the code is regenerated.
Line 7: // </auto-generated>
Line 8: //------------------------------------------------------------------------------
Line 9:
Line 10: namespace RazorOutput {
Line 11: using Microsoft.CSharp.RuntimeBinder;
Line 12: using System;
Line 13: using System.IO;
Line 14: using Newtonsoft.Json;
Line 15: using Overseer.Website;
Line 16: using Overseer.Website.Library;
Line 17: using Overseer.Library;
Line 18: using System.Collections.Generic;
Line 19:
Line 20: #line 1 "roo"
Line 21: using System.Globalization;
Line 22:
Line 23: #line default
Line 24: #line hidden
Line 25:
Line 26: #line 2 "roo"
Line 27: using System.Linq;
Line 28:
Line 29: #line default
Line 30: #line hidden
Line 31:
Line 32:
Line 33: public class RazorView : Nancy.ViewEngines.Razor.NancyRazorViewBase<Overseer.Website.ViewModels.ViewSiteFolder> {
Line 34:
Line 35: #line hidden
Line 36:
Line 37: public RazorView() {
Line 38: }
Line 39:
Line 40: public override void Execute() {
Line 41: WriteLiteral("<div");
Line 42:
Line 43: WriteLiteral(" class=\"container\"");
Line 44:
Line 45: WriteLiteral(">\r\n\r\n\t<h1");
Line 46:
Line 47: WriteLiteral(" class=\"mb-3\"");
Line 48:
Line 49: WriteLiteral(">");
Line 50:
Line 51:
Line 52: #line 6 "roo"
Line 53: Write(Model.Heading);
Line 54:
Line 55:
Line 56: #line default
Line 57: #line hidden
Line 58: WriteLiteral("</h1>\r\n\r\n");
Line 59:
Line 60:
Line 61: #line 8 "roo"
Line 62:
Line 63:
Line 64: #line default
Line 65: #line hidden
Line 66:
Line 67: #line 8 "roo"
Line 68: if (!string.IsNullOrWhiteSpace(Model.Content))
Line 69: {
Line 70:
Line 71:
Line 72: #line default
Line 73: #line hidden
Line 74:
Line 75: #line 10 "roo"
Line 76: Write(Html.Raw(Model.Content));
Line 77:
Line 78:
Line 79: #line default
Line 80: #line hidden
Line 81:
Line 82: #line 10 "roo"
Line 83:
Line 84: }
Line 85:
Line 86:
Line 87: #line default
Line 88: #line hidden
Line 89: WriteLiteral("\r\n");
Line 90:
Line 91:
Line 92: #line 13 "roo"
Line 93:
Line 94:
Line 95: #line default
Line 96: #line hidden
Line 97:
Line 98: #line 13 "roo"
Line 99: if (Model.Children.Count > 0)
Line 100: {
Line 101:
Line 102:
Line 103: #line default
Line 104: #line hidden
Line 105: WriteLiteral("\t\t<div");
Line 106:
Line 107: WriteLiteral(" class=\"row align-items-stretch\"");
Line 108:
Line 109: WriteLiteral(" id=\"products-container\"");
Line 110:
Line 111: WriteLiteral(" style=\"opacity:0\"");
Line 112:
Line 113: WriteLiteral(">\r\n");
Line 114:
Line 115:
Line 116: #line 16 "roo"
Line 117:
Line 118:
Line 119: #line default
Line 120: #line hidden
Line 121:
Line 122: #line 16 "roo"
Line 123: foreach (var child in Model.Children)
Line 124: {
Line 125:
Line 126:
Line 127: #line default
Line 128: #line hidden
Line 129: WriteLiteral("\t\t\t\t<div");
Line 130:
Line 131: WriteLiteral(" class=\"col-6 col-md-4 col-lg-3 col-xl-2 mb-3\"");
Line 132:
Line 133: WriteLiteral(">\r\n\t\t\t\t\t<a");
Line 134:
Line 135: WriteAttribute("href", Tuple.Create(" href=\"", 536), Tuple.Create("\"", 565)
Line 136: , Tuple.Create(Tuple.Create("", 543), Tuple.Create("/", 543), true)
Line 137:
Line 138: #line 19 "roo"
Line 139: , Tuple.Create(Tuple.Create("", 544), Tuple.Create<System.Object, System.Int32>(child.TrailReference
Line 140:
Line 141: #line default
Line 142: #line hidden
Line 143: , 544), false)
Line 144: );
Line 145:
Line 146: WriteLiteral(" class=\"card btn btn-outline-primary p-0 h-100\"");
Line 147:
Line 148: WriteLiteral(">\r\n\t\t\t\t\t\t<div");
Line 149:
Line 150: WriteLiteral(" class=\"card-img-top d-flex flex-column justify-content-center align-items-center" +
Line 151: " bg-white overflow-hidden\"");
Line 152:
Line 153: WriteLiteral(">\r\n");
Line 154:
Line 155:
Line 156: #line 21 "roo"
Line 157:
Line 158:
Line 159: #line default
Line 160: #line hidden
Line 161:
Line 162: #line 21 "roo"
Line 163: if (child.ViewSiteImages.Count > 0)
Line 164: {
Line 165:
Line 166:
Line 167: #line default
Line 168: #line hidden
Line 169: WriteLiteral("\t\t\t\t\t\t\t\t<img");
Line 170:
Line 171: WriteLiteral(" class=\"img-fluid\"");
Line 172:
Line 173: WriteLiteral(" alt=\"\"");
Line 174:
Line 175: WriteAttribute("src", Tuple.Create(" src=\"", 828), Tuple.Create("\"", 898)
Line 176: , Tuple.Create(Tuple.Create("", 834), Tuple.Create("/Content/images/thumbnail/250/250/", 834), true)
Line 177:
Line 178: #line 23 "roo"
Line 179: , Tuple.Create(Tuple.Create("", 868), Tuple.Create<System.Object, System.Int32>(child.FirstViewSiteImage.Path
Line 180:
Line 181: #line default
Line 182: #line hidden
Line 183: , 868), false)
Line 184: );
Line 185:
Line 186: WriteLiteral(" />\r\n");
Line 187:
Line 188:
Line 189: #line 24 "roo"
Line 190: }
Line 191: else
Line 192: {
Line 193:
Line 194:
Line 195: #line default
Line 196: #line hidden
Line 197: WriteLiteral("\t\t\t\t\t\t\t\t<img");
Line 198:
Line 199: WriteLiteral(" class=\"img-fluid p-2\"");
Line 200:
Line 201: WriteLiteral(" alt=\"\"");
Line 202:
Line 203: WriteLiteral(" src=\"/Content/images/thumbnail/250/250/default.jpg\"");
Line 204:
Line 205: WriteLiteral(" />\r\n");
Line 206:
Line 207:
Line 208: #line 28 "roo"
Line 209: }
Line 210:
Line 211:
Line 212: #line default
Line 213: #line hidden
Line 214: WriteLiteral("\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t<div");
Line 215:
Line 216: WriteLiteral(" class=\"card-body\"");
Line 217:
Line 218: WriteLiteral(">\r\n");
Line 219:
Line 220: WriteLiteral("\t\t\t\t\t\t\t");
Line 221:
Line 222:
Line 223: #line 31 "roo"
Line 224: Write(child.Heading);
Line 225:
Line 226:
Line 227: #line default
Line 228: #line hidden
Line 229: WriteLiteral("\r\n\t\t\t\t\t\t</div>\r\n\t\t\t\t\t</a>\r\n\t\t\t\t</div>\r\n");
Line 230:
Line 231:
Line 232: #line 35 "roo"
Line 233: }
Line 234:
Line 235:
Line 236: #line default
Line 237: #line hidden
Line 238: WriteLiteral("\t\t</div>\r\n");
Line 239:
Line 240:
Line 241: #line 37 "roo"
Line 242: }
Line 243:
Line 244:
Line 245: #line default
Line 246: #line hidden
Line 247: WriteLiteral("</div>\r\n\r\n");
Line 248:
Line 249: DefineSection("Scripts", () => {
Line 250:
Line 251: WriteLiteral(@"
Line 252: <script>
Line 253: $(function () {
Line 254: var $window = $(window)
Line 255: var $productsContainer = $('#products-container')
Line 256: var $cardImageContainers = $('.card-img-top')
Line 257: $window.on('resize', onWindowResize)
Line 258: function onWindowResize(e) {
Line 259: var width = $cardImageContainers.innerWidth()
Line 260: $cardImageContainers.height(width)
Line 261: }
Line 262: onWindowResize()
Line 263: $productsContainer.fadeTo(500, 1)
Line 264: })
Line 265: </script>
Line 266: ");
Line 267:
Line 268: });
Line 269:
Line 270: }
Line 271: }
Line 272: }
Line 273: