[英]How to read\write settings from a Visual Studio Project file using NuGet?
I'm interested in creating a NuGet package for a documentation tool I'm writing. 我对为正在编写的文档工具创建NuGet包感兴趣。 Ideally, I'd like the user to not have to configure my tool in anyway.
理想情况下,我希望用户不必以任何方式配置我的工具。 In order to do this, I need to be able to read some settings from the Project's
.csproj
or .vbproj
file to get the path of the Xml documentation file generated by the compiler. 为此,我需要能够从Project的
.csproj
或.vbproj
文件中读取一些设置,以获取由编译器生成的Xml文档文件的路径。 I also need to add a post-build step to the project. 我还需要在项目中添加一个后构建步骤。
I've looked through their documentation but I haven't seen any mention of being able to do this. 我浏览了他们的文档,但没有提及能够做到这一点。 Is this possible?
这可能吗? If so, is there any documentation or examples of this available?
如果是这样,是否有任何相关文档或示例?
Using PowerShell script, you can access the rich VS DTE
object model. 使用PowerShell脚本,可以访问丰富的
VS DTE
对象模型。 This allows your package to do all kind of things that NuGet doesn't have specific features for. 这使您的程序包可以执行NuGet没有特定功能的所有事情。 Look at this help topic for some info on using
init.ps1
or install.ps1
. 请查看此帮助主题,以获取有关使用
init.ps1
或install.ps1
一些信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.