读取VS2008项目文件
2011-11-07 16:12
363 查看
Engine engine = new Engine( AppDomain.CurrentDomain.BaseDirectory ); Project project = new Project( engine ); project.Load( @"D:\个人文件夹\我的文档\Visual Studio 2008\Projects\Demo\Demo.csproj" ); string assemblyName = project.GetEvaluatedProperty( "AssemblyName" ); IEnumerator enumerator = project.EvaluatedProperties.GetEnumerator(); while (enumerator.MoveNext()) { BuildProperty property = enumerator.Current as BuildProperty; if (property.Name.Equals( "AssemblyName" )) { System.Console.WriteLine( string.Format( "Key:{0},Value:{1}", property.Name, property.Value ) ); } }
需要引用Microsoft.Build.BuildEngine.dll
相关文章推荐
- Silverligth项目加载问题 无法读取项目文件“SL1201.csproj”。请确认 声明中的路径正确,且磁盘上存在该文件。
- Java web 项目读取src或者tomcat下class目录下的xml文件或者properties文件
- Java GUI项目读取Jar内部外部文件 打包EXE 在没有java环境的电脑上可运行
- vs2010 "写入项目文件时出错。没有注册类别","无法读取项目文件",解决方法
- 地第6周-项目五-多文件读取
- 解决vs2008 项目文件(b/s)右键“在浏览器中打开”出现两个浏览器
- vs2008 csharp dll项目文件转web工程
- JSP项目从普通类中读取资源文件路径解决方案
- 使 Web Application 项目文件能同时被 VS2005 和 VS2008 打开的方法
- 第十五周上机实践项目——工资数据的输入(从文件中读取数据)
- 用vs2008 建立的 qt项目可以 生成.pro文件吗?
- opencv + vs 解决方s案加载失败,无法读取项目文件“xxx.vcxproj”
- Java Web项目如何读取.properties配置文件
- 使 Web Application 项目文件能同时被 VS2005 和 VS2008 打开的方法
- Maven组织的web项目读取WEB-INF下properties文件
- 无法读取项目文件 .csproj
- ios-本地项目下 json文件的读取
- 无法读取项目文件 .csproj
- VS2008 修改模板,让项目文件自动添加版权信息
- NetCore入门篇:(十一)NetCore项目读取配置文件appsettings.json