解决方案中的Visual Studio虚拟文件夹

时间:2014-01-31 13:46:31

标签: visual-studio-2012 virtual solution subdirectory

是否可以(本机或通过扩展名)对虚拟子文件夹中的解决方案文件夹中的元素进行分组? e.g:

ArticleGalleryItemPhone.axml
ChangePasswordPhone.axml
ChangePasswordTablet.axml
DeviceBigListItemPhone.axml
DeviceBigListItemTablet.axml
FirstLaunchGalleryItemPhone.axml
FirstLaunchGalleryItemTablet.axml
FirstLaunchPhone.axml
FirstLaunchTablet.axml
ForgotPasswordPhone.axml
ForgotPasswordTablet.axml
HeaderPhone.axml
HeaderTablet.axml
HomePhone.axml
LoginPhone.axml
LoginTablet.axml
OutOfCoffee.axml

应显示过滤器*平板电脑和*手机,如:

Phone
    ArticleGalleryItemPhone.axml
    ChangePasswordPhone.axml
    DeviceBigListItemPhone.axml    
    FirstLaunchGalleryItemPhone.axml    
    FirstLaunchPhone.axml    
    ForgotPasswordPhone.axml    
    HeaderPhone.axml    
    HomePhone.axml
    LoginPhone.axml

Tablet  
    ChangePasswordTablet.axml
    DeviceBigListItemTablet.axml
    FirstLaunchGalleryItemTablet.axml
    FirstLaunchTablet.axml
    ForgotPasswordTablet.axml
    HeaderTablet.axml
    LoginTablet.axml
OutOfCoffee.axml

问题是:Xamarin.Android需要这个扁平的文件夹结构:( Prebuildsteps,扁平化文件夹有点太hacky。

1 个答案:

答案 0 :(得分:0)

我们现在的解决方案:

我们使用Visual Studio的嵌套功能。有一些扩展允许为自定义文件类型定义嵌套:

<强>结果:

File nesting in Visual Studio