locked
Excluding Files From Different Configuration Settings RRS feed

  • Question

  • User1447371928 posted

    Hey dudes,

    Does anyone know how I can exclude certain folders and files from certain builds? Essentially I've got test code that needs to be deployed to the testing server - but obviously not the real server. This is in both files and folders.

    Using the configuration manager profiles, I would like to create a profile for each scenario, and tell it what files it does not need.

    Cheers

    Thursday, October 7, 2010 5:43 AM

Answers

  • User470413944 posted

    Hi,

    You can try ItemGroup in your csproj/vbproj:

    <ItemGroup>
            <Res Include = "Strings.fr.resources" >
                <Culture>fr</Culture>
            </Res>
            <Res Include = "Dialogs.fr.resources" >
                <Culture>fr</Culture>
            </Res>
    
            <CodeFiles Include="**\*.cs" Exclude="**\generated\*.cs" />
            <CodeFiles Include="..\..\Resources\Constants.cs" />
        </ItemGroup>
    

    Be careful, wrong settings in project will cause it unable to be loaded.

    For more details:

     http://msdn.microsoft.com/en-us/library/646dk05y.aspx

    I hope this can be helpful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 12, 2010 9:10 PM

All replies

  • User470413944 posted

    Hi,

    You can try ItemGroup in your csproj/vbproj:

    <ItemGroup>
            <Res Include = "Strings.fr.resources" >
                <Culture>fr</Culture>
            </Res>
            <Res Include = "Dialogs.fr.resources" >
                <Culture>fr</Culture>
            </Res>
    
            <CodeFiles Include="**\*.cs" Exclude="**\generated\*.cs" />
            <CodeFiles Include="..\..\Resources\Constants.cs" />
        </ItemGroup>
    

    Be careful, wrong settings in project will cause it unable to be loaded.

    For more details:

     http://msdn.microsoft.com/en-us/library/646dk05y.aspx

    I hope this can be helpful for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, October 12, 2010 9:10 PM
  • User1447371928 posted

    Thanks mate.

    Friday, October 15, 2010 6:25 AM