.vcxproj 没有立即更新 [英] .vcxproj didn't update immediately

查看:41
本文介绍了.vcxproj 没有立即更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Visual Studio 中更改某些项目属性时..vcxproj 文件没有立即更新.但是当我关闭解决方案时,它显示要求我保存文件.如何在我更新 .vcxproj 时更改一些属性?

When I changing some project properties in the Visual Studio.The .vcxproj file did not updating immediately.But when I close the solution,it shows up that ask me to save the file.How can I update the .vcxproj when I change some properties?

推荐答案

尝试使用 _DTE.ExecuteCommand(String, String) 方法.

            DTE dTE=Package.GetGlobalService(typeof(DTE)) as DTE;
            dTE.ExecuteCommand("File.SaveAll");

它可以以编程方式调用 VS 的 Save All 命令.它将保存所有修改过的文档文件和项目文件(可以更新 .xxproj 文件)的更改.因此,请使用单击命令按钮后将执行的方法中的代码.

It works to programmatically call the Save All command of VS. It will save changes for all modified document files and project files(which can update the .xxproj file). So use the code in the method which will execute after your command button is clicked.

这篇关于.vcxproj 没有立即更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆