简体   繁体   English

使用Visual Studio IDE在SharePoint中进行JavaScript开发-文件自动重命名为MyFile.js〜RFxxxxx.TMP

[英]Using Visual Studio IDE for JavaScript development in SharePoint - files renaming automatically to MyFile.js~RFxxxxx.TMP

I am trying to use Microsoft Visual Studio 2013 for developing JavaScript files in SharePoint (both on-premise & 365). 我正在尝试使用Microsoft Visual Studio 2013在SharePoint(内部部署和365)中开发JavaScript文件。 Visual Studio seems to change the file name during the save process a couple of time, and this causes some problems: Visual Studio似乎在保存过程中几次更改了文件名,这会导致一些问题:

Ex: Suppose I have an html file with a reference to Myfile.Js as following: 例如:假设我有一个引用Myfile.Js的html文件,如下所示:

<script src="/sites/MyTestSite/TheLibrary/MyFile.js">

When I open & save MyFile.Js in VS, VS first renames it to MyFile.js~RF79854ax46.TMP. 当我在VS中打开并保存MyFile.Js时,VS首先将其重命名为MyFile.js〜RF79854ax46.TMP。 Then SharePoint automatically updates the reference in html file to the following: 然后,SharePoint自动将html文件中的引用更新为以下内容:

<script src="/sites/MyTestSite/TheLibrary/MyFile.js~RF79854ax46.TMP">

I was wondering how can I either disable this feature of Visual Studio or SharePoint! 我想知道如何禁用Visual Studio或SharePoint的此功能! Never had such problem with NotePad++, which is very simple & nice editor. NotePad ++从来没有这样的问题,它是非常简单且不错的编辑器。

Any help would be appreciated! 任何帮助,将不胜感激!

PS Disabling autorecover options didn't work. PS禁用自动恢复选项不起作用。 I have tested with Adobe DreamWeaver as well, the same problem. 我也用Adobe DreamWeaver进行了测试,同样的问题。 It seems this issue had existed in earlier versions of SharePoint as well,( link to MS support ) , but no results for SharePoint online. 似乎早期版本的SharePoint中也存在此问题( 链接到MS支持 ),但SharePoint Online没有结果。

Visual Studio 2013 renaming files to .TMP has nothing to do with SharePoint. Visual Studio 2013将文件重命名为.TMP与SharePoint无关。 It is a Visual Studio issue. 这是Visual Studio问题。 Normally Visual Studio creates .TMP files so it can recover files after an unexpected crash. 通常,Visual Studio创建.TMP文件,以便在意外崩溃后可以恢复文件。 Make sure you have installed the latest update to Visual Studio 2013. You kan also try install VS 2015 and the latest update. 确保已安装Visual Studio 2013的最新更新。您还可以尝试安装VS 2015和最新更新。

To turn off the autorecover feature in VS 2013 or VS 2015 go to Tools > Options > Environment > AutoRecover and uncheck 'Save AutoRecovery information every:'. 要关闭VS 2013或VS 2015中的自动恢复功能,请转到“工具”>“选项”>“环境”>“自动恢复”,然后取消选中“每隔一次保存自动恢复信息:”。

The issue can also be caused by virus protecting tools like F-Secure, Microsoft Security Essentials, etc. Go thrugh the tool settings and add Visual Studio Project folder to exclusion list and/or set *.vb and *.cs extensions to exlusion list. 该问题也可能是由病毒防护工具(例如F-Secure,Microsoft Security Essentials等)引起的。通过工具设置并将Visual Studio Project文件夹添加到排除列表和/或将* .vb和* .cs扩展名设置到排除列表。

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

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