Setting the debugging option of an external external program for the class library executable in the visual studio

I have a project that creates a new solution with one class library project. I want Debugging to Start the external class library program option of this solution in order to get the installation with the External executable application (and not manually, must be filled at the time of creating the solution).

I do not know about libraries that perform this task.

+4
source share
1 answer

Create a file .csproj.userfor the generated project. This is an XML format. You can read and create XML using the XmlDocument class .

Install <StartAction>in Programand install <StartProgram>in the executable file of your choice.

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
    <StartAction>Program</StartAction>
    <StartProgram>myexecutable.exe</StartProgram>
  </PropertyGroup>
</Project>
+5
source

Source: https://habr.com/ru/post/1533710/


All Articles