Skip to content

Modifying Specific Projects Example... #38

Closed

Description

@DynConcepts

#3

Shows how to modify a Solution, I am looking for how to modify a Project... e.g. Change the $OutDir property and update the (.vcxproj in this case) file...

Activity

  1. 3F commented on Dec 30, 2020

    @3F
    Owner

    IXProject in 2.x wraps an msbuild, so you can simply use it separately or such as

    IXProject xp = ...
    xp.SetProperty("OutDir", "new-value");
    xp.Save();

    /// Sets or adds a property with the given name and unevaluated value to the project.
    /// </summary>
    /// <param name="name">The name of the property.</param>
    /// <param name="unevaluated">The new unevaluated value of the property.</param>
    /// <returns></returns>
    PropertyItem SetProperty(string name, string unevaluated);

    easy to group like

    xp.SetProperties(new Dictionary<string, string>()
    { 
        { "name1", "value1" },
        { "name2", "value2" },
        { "name3", "value3" }
    });
      <PropertyGroup>
        <name1>value1</name1>
        <name2>value2</name2>
        <name3>value3</name3>
      </PropertyGroup>

    etc.

  2. DynConcepts commented on Jan 2, 2021

    @DynConcepts
    Author

    Close but a related problem has come up... This is covered in Issue #39...

  3. 3F commented on Jan 2, 2021

    @3F
    Owner

    I think it's time to play with new Discussions for the similar general questions like this.

    @DynConcepts Please use Discussions for cases like this instead of opening new Issues. We'll test it together. Thanks.

  4. Repository owner locked and limited conversation to collaborators on Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions