所以这里是环境,VS 2013,WebEssesntials,HTML Javascript项目没什么特别的,只是纯粹的html项目出了一个目录。 我对CSS的使用较少,而且我使用的引导程序也较少。 问题是所有字体都不会被加载,因为它们指向错误的目录。
而不是路径/content/fonts/glyphicons-halflings-regular.eot
,他们最终/obj/Release/Package/PackageTmp/content/fonts/glyphicons-halflings-regular.eot
在less file variable.less(由bootstrap提供)中,我们有:
//** Load fonts from this directory.
@icon-font-path: "../fonts/";
所以它是一个相对路径,但它一直在解析那个不存在的目录,我不知道如何最好地解决这个问题,我想知道是否有人也有这个问题以及他们是如何解决它的。
编辑:
WebEssentials配置文件:
{
"BrowserLink": {
"CssIgnorePatterns": "bootstrap*; reset.css; normalize.css; jquery*; toastr*; foundation*; animate*; inuit*; elements*; ratchet*; hint*; flat-ui*; 960*; skeleton*",
"EnableMenu": true,
"EnablePixelPushing": true,
"ShowMenu": false
},
"CodeGen": {
"AddTypeScriptReferencePath": true,
"CamelCaseEnumerationValues": false,
"CamelCasePropertyNames": true,
"CamelCaseTypeNames": false
},
"CoffeeScript": {
"CompileOnBuild": false,
"CompileOnSave": true,
"GenerateSourceMaps": true,
"LintOnBuild": false,
"LintOnSave": true,
"LintResultLocation": "Message",
"MinifyInPlace": false,
"OutputDirectory": null,
"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true,
"WrapClosure": true
},
"Css": {
"AdjustRelativePaths": true,
"AutoMinify": true,
"Autoprefix": false,
"AutoprefixerBrowsers": null,
"GenerateRtlSourceMaps": true,
"GzipMinifiedFiles": false,
"MakeMinified": true,
"OutputDirectory": "/content/",
"RtlCss": false,
"RunOnBuild": true,
"ShowBrowserTooltip": true,
"ShowInitialInherit": false,
"ShowUnsupported": true,
"SyncBase64ImageValues": true,
"SyncVendorValues": true,
"ValidateEmbedImages": true,
"ValidateStarSelector": true,
"ValidateVendorSpecifics": true,
"ValidateZeroUnit": true,
"ValidationLocation": "Messages"
},
"General": {
"AllMessagesToOutputWindow": false,
"KeepImportantComments": true,
"ShowWEIgnoreLogs": true,
"SvgPreviewPane": true
},
"Handlebars": {
"CompileOnBuild": false,
"CompileOnSave": true,
"MinifyInPlace": false,
"OutputDirectory": null
},
"Html": {
"AttributeQuotesRemovalMode": "KeepQuotes",
"AutoMinify": false,
"CustomAngularDirectiveList": null,
"EnableAngularValidation": true,
"EnableBootstrapValidation": true,
"EnableEnterFormat": true,
"EnableFoundationValidation": true,
"GzipMinifiedFiles": false,
"ImageDropFormats": [
{
"HtmlFormat": "<img src=\"{0}\" alt=\"\" />",
"Name": "Simple Image Tag"
},
{
"HtmlFormat": "<div><img src=\"{0}\" alt=\"\" /></div>",
"Name": "Enclosed in Div"
},
{
"HtmlFormat": "<li id=\"item_{1}\"><img src=\"{0}\" alt=\"\" /></li>",
"Name": "Enclosed as List Item"
},
{
"HtmlFormat": "<div style=\"background-image=url('{0}')\"></div>",
"Name": "Inline CSS"
}
],
"MakeMinified": true,
"MinifyAngularBindingExpressions": false,
"MinifyKnockoutBindingExpressions": false,
"OutputDirectory": null,
"ProcessableScriptTypeList": null,
"RunOnBuild": false
},
"JavaScript": {
"AutoMinify": true,
"BlockCommentCompletion": true,
"EvalTreatment": "MakeImmediateSafe",
"GenerateSourceMaps": true,
"GzipMinifiedFiles": false,
"LintOnBuild": false,
"LintOnSave": true,
"LintResultLocation": "Message",
"MakeMinified": true,
"OutputDirectory": null,
"RootDirectory": "/scripts/",
"RunOnBuild": false,
"TermSemicolons": true
},
"Less": {
"CompileOnBuild": true,
"CompileOnSave": true,
"EnableChainCompilation": true,
"GenerateSourceMaps": true,
"MinifyInPlace": false,
"OutputDirectory": "/content/",
"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true,
"StrictMath": false
},
"LiveScript": {
"CompileOnBuild": false,
"CompileOnSave": true,
"GenerateSourceMaps": true,
"MinifyInPlace": false,
"OutputDirectory": null,
"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true,
"WrapClosure": true
},
"Markdown": {
"AutoHyperlink": false,
"AutoNewLines": false,
"CompileOnBuild": false,
"CompileOnSave": true,
"EncodeProblemUrlCharacters": false,
"GenerateXHTML": true,
"LinkEmails": false,
"MinifyInPlace": false,
"OutputDirectory": null,
"ShowPreviewPane": true,
"StrictBoldItalic": false
},
"Scss": {
"CompileOnBuild": false,
"CompileOnSave": true,
"EnableChainCompilation": true,
"GenerateSourceMaps": true,
"MinifyInPlace": false,
"NumberPrecision": 5,
"OutputDirectory": null,
"OutputStyle": "Expanded",
"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true,
"UseRubyRuntime": false
},
"Sprite": {
"CssOutputDirectory": null,
"IsVertical": true,
"LessOutputDirectory": null,
"Margin": 1,
"Optimize": true,
"OutputDirectory": null,
"RunOnBuild": false,
"ScssOutputDirectory": null,
"UseAbsoluteUrl": false,
"UseFullPathForIdentifierName": true
},
"SweetJs": {
"CompileOnBuild": false,
"CompileOnSave": true,
"GenerateSourceMaps": true,
"MinifyInPlace": false,
"OutputDirectory": null,
"ProcessSourceMapsForEditorEnhancements": true,
"ShowPreviewPane": true
},
"TypeScript": {
"LintOnBuild": false,
"LintOnSave": true,
"LintResultLocation": "Message",
"ShowPreviewPane": true
}
}