How to get list of possible strings when parameter is a string

前端 未结 1 1391
南笙
南笙 2021-01-24 05:23

In order to programmatically include a file to a project I use the method provided in this answer https://stackoverflow.com/a/23537007/1317323

Now I need to go further

相关标签:
1条回答
  • 2021-01-24 05:34

    I was able to do it using another namespace from Microsoft.

    The solution is based on this one

    Instead of manipulating my solution with

     Microsoft.Build.Evaluation.Project
    

    I use

    Microsoft.VisualStudio.Shell.Interop
    

    Now I manipulate

    EnvDTE.Project
    

    And I can use

    _currentProject.ProjectItems.AddFromFile(path);
    

    If I do it twice with a xaml and a xaml.cs file with the same name, there are automatically nested.

    0 讨论(0)
提交回复
热议问题