Đọc this post ở đây trên stackoverflow muốn tải một css khác khi biên dịch cho chế độ phát hành.Biên dịch có điều kiện không hoạt động
Code:
@{ #if (Debug)
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
#else
<link href="@Url.Content("~/Content/Site-min.css")" rel="stylesheet" type="text/css" />
#endif
}
Cố gắng 2
@{ #if (Debug) }
<link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" />
@{ #else }
<link href="@Url.Content("~/Content/Site-min.css")" rel="stylesheet" type="text/css" />
@{ #endif }
tôi đã cố gắng để gỡ lỗi viết hoa Nhưng không có sự thay đổi không có tác dụng khi biên dịch Debug để Thả
http://stackoverflow.com/questions/4696175/razor-view-engine-how-to-enter-preprocessorif-debug/4697570#4697570 Làm thế nào về điều này? – takepara