我从以前的开发者那里继承了一个项目。在我的VS副本中打开并重建它之后,下面的一些行以某种方式交换位置,这在发布版本中造成了重大问题。
当我追溯原因时,我注意到原始开发者试图通过添加注释行来强制这些行保持固定顺序(见下文)。
有没有更好的方法来确保这些线始终按此顺序排列?
[assembly: System.Web.UI.WebResource("BS.Web.Controls.AjaxFileUpload.XMLHttpExecutor.js", "application/x-javascript")]
[assembly: System.Web.UI.WebResource("BS.Web.Controls.AjaxFileUpload.XMLHttpExecutor.debug.js", "application/x-javascript")]
[assembly: System.Web.UI.WebResource("BS.Web.Controls.AjaxFileUpload.AjaxFileUpload.debug.js", "application/x-javascript")]
[assembly: System.Web.UI.WebResource("BS.Web.Controls.AjaxFileUpload.AjaxFileUpload.js", "application/x-javascript")]
[assembly: WebResource("BS.Web.Controls.AjaxFileUpload.AjaxFileUpload.css", "text/css", PerformSubstitution = true)]
namespace BS.Web.Controls
{
public delegate void EventAjaxFileUploadOnComplete(object sender, HttpPostedFile file);
public delegate void EventAjaxFileUploadOnAllComplete(object sender);
[RequiredScript(typeof(CommonToolkitScripts))]
[Designer("BS.Web.Controls.AjaxFileUploadDesigner, BS.Web.Controls")]
[ClientCssResource("BS.Web.Controls.AjaxFileUpload.AjaxFileUpload.css")]
[ClientScriptResource("AjaxControlToolkit.AjaxFileUpload", "BS.Web.Controls.AjaxFileUpload.AjaxFileUpload.js")]
// Just a throwaway comment to try and prevent the following reference being swapped with the preceding
[ClientScriptResource("Sys.Net.XMLHttpExecutor", "BS.Web.Controls.AjaxFileUpload.XMLHttpExecutor.js")]
public class AjaxFileUpload : ScriptControlBase
{