settings file properites

essamce 621 Reputation points
2020-10-22T11:29:58.213+00:00

hi,
i'm using VS2019 C#, WPF .NETCore3.1 app,
first time to use setting files, (pic attached)

Q1: in file properties what should i select as Build Action and Copt To Output Directory,
Q2: can i do that in code without using Properties widow.

thanks in advance, any help will be appreciated.

34263-newitems.png

34352-properties.png

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,624 questions
{count} votes

Accepted answer
  1. DaisyTian-1203 11,611 Reputation points
    2020-10-23T05:43:14.977+00:00

    A1:The Build Action selections depends on your needs, you can refer to this table (Build action values) to see the usage of the items. The selections for Copt To Output Directory, when you choose Copy always means, the file will be copyed in bin/debug always when the project be built. For more details, you can see the options part in Visual Studio: Copying files to Debug or Release folder

    A2:You can set the above settings in the .csproj. eg: If you want to make Copy always for Copy To Output Directory in the .csproj as <CopyToOutputDirectory>Always</CopyToOutputDirectory>


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful