简体   繁体   English

Visual Studio 2013 CSS / JS远程发布问题

[英]Visual Studio 2013 CSS/JS Remote Publish Issue

Is there any reason why a Visual Studio 2013 Project which is error free and works perfectly locally would not render some CSS and JS files remotely? 是否有任何原因导致无错误且在本地完美运行的Visual Studio 2013项目无法远程呈现某些CSS和JS文件?

I have checked the remote host and all files/folders have copied successfully and the pages work but the Site.css does not appear to be rendering correctly. 我已经检查了远程主机,并且所有文件/文件夹都已成功复制,并且页面正常运行,但是Site.css似乎无法正确呈现。

Any help would be much appreciated :-) 任何帮助将非常感激 :-)

I think I've found a solution to my problem, I ensured Release was select in Solution Configurations then removed all files from Content and Scripts folders. 我认为我已经找到了解决问题的方法,我确保在“解决方案配置”中选择了“发行版”,然后从“内容”和“脚本”文件夹中删除了所有文件。 Then for each of the Content and Scripts folders I added back the existing items. 然后,对于每个Content和Script文件夹,我重新添加现有项。

I then clicked Clean WebApplication1 followed by Build WebApplications1, ran the project through Internet Explorer and Firefox just to make sure everything was still functioning and displaying normally locally, which it was so then clicked Publish WebApplication1 and under Settings I selected Release and ticked Delete all existing files prior to publish. 然后,我单击“清理WebApplication1”,然后单击“构建WebApplications1”,通过Internet Explorer和Firefox运行该项目,以确保一切仍能正常运行并在本地正常显示,然后单击“发布WebApplication1”,并在“设置”下单击“我选择释放”并勾选“删除所有现有的”文件在发布之前。

All CSS and JS render perfectly both locally and remotely now. 现在,所有CSS和JS都可以在本地和远程完美呈现。

I hope this solution proves useful to others :-) 我希望这个解决方案对其他人证明有用:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM