Visual Studio Ctrl K + D(代码格式)不起作用

tem*_*pid 20 code-formatting visual-studio-2010

Ctrl KDVisual Studio 2010 Sharepoint项目中的+ 在某些文件中不起作用,因为它们包含在运行时生成的某些资源(masterpageurl/images/js/css类名)的路径.

如何让VS"忽略"检查这些资源是否存在?

Pas*_*not 14

代码格式在多行数组中不起作用:

        int[] ok={ 1   ,   2, 3   };
        int[] ko={
                      1   ,
                         2,
                      3    
                 };
Run Code Online (Sandbox Code Playgroud)

使用Ctrl K + D.

        int[] ok = { 1, 2, 3 }; // nice formatting
        int[] ko ={
                      1   ,
                         2,
                      3    
                 }; // nothing changed :(
Run Code Online (Sandbox Code Playgroud)


Sco*_* M. 10

检查同一文件中的其他错误.如果存在错误,则在修复文档之前不会对其进行格式化.为了在设计时帮助您,您可以创建虚拟资源,指向这些资源,然后在运行时将引用更改为动态生成的内容.