简体   繁体   中英

How to create .txt file on solution opening event of visual studio 2015?

当我们打开 Visual Studio 2015 并选择解决方案或单击它时,.txt 文件应该会在某个给定位置自动创建

You can create an extension for visual studio 2015. Then subscribe to when solution is opened

_solutionEvents = _applicationObject.Events.SolutionEvents;
_solutionEvents.Opened += new SolutionHandler(SolutionOpened);

and in that method create a new text file with

System.IO.File.WriteAllText(fileFullPathAndName, text);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM