문제

Everyone says thou shalt never add *.csproj.user to TFS for version control. Fine, but what if I want to specify default command line arguments (which get saved in the file mentioned above)?

I poked around the the .csproj file, and the XML looks very similar. So that got me thinking... Can you cut and paste the following XML from the csproj.user file to the end of the csproj file (just above the </Project> tag?

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
  <StartArguments>..\..\DEALS001.ini</StartArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
  <StartArguments>..\..\DEALS001.ini</StartArguments>
</PropertyGroup>
도움이 되었습니까?

해결책

Absolutely! This works like a charm.

Do note that subsequent changes to the command line argument from the Visual Studio Project Properties window will create a new csproj.user file that would override (but not remove) the XML you copied to the csproj file.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top