[MonoDevelop] What is a Mono version of EnvDTE80 Namespace
Michael Hutchinson
m.j.hutchinson at gmail.com
Wed Apr 14 11:04:19 EDT 2010
AFAIK, EnvDTE is the VS extensibility COM PIA. There is no exact
mapping to MD API. It should be possible to do something similar via a
MD addin.
See http://monodevelop.com/Developers/Articles/Creating_a_Simple_Add-in
This might help get you started:
using MonoDevelop.Projects;
using MonoDevelop.Ide;
foreach (var proj in IdeApp.Workspace.GetAllSolutionItems<DotNetProject> ()) {
var conf = proj.Files.GetFile ("web.config");
if (conf != null ) {
//do stuff, not sure what ExeConfigurationFileMap is
}
}
On Wed, Apr 14, 2010 at 12:45 PM, Sameer Ahmed <sameer135 at gmail.com> wrote:
> Hi All,
>
> What is a Mono version of this code?
>
> // Get an instance of the currently running Visual Studio IDE.
> EnvDTE80.DTE2 dte = (EnvDTE80.DTE2)
>
> System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.8.0");
>
> if ( dte != null )
> {
> dte.SuppressUI = true;
>
> EnvDTE.ProjectItem item =
> dte.Solution.FindProjectItem("web.config");
> if ( item != null )
> {
> if
> (!item.ContainingProject.FullName.ToLower().StartsWith("http:"))
> {
> System.IO.FileInfo info = new
> System.IO.FileInfo(item.ContainingProject.FullName);
> path = String.Format("{0}\\{1}", info.Directory.FullName,
> item.Name);
> configMap = new ExeConfigurationFileMap();
> configMap.ExeConfigFilename = path;
> }
> else
> {
> configMap = new ExeConfigurationFileMap();
> configMap.ExeConfigFilename = item.get_FileNames(0);
> }}
>
> Thanks & Regards,
>
> Sameer Ahmed.S
>
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>
>
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Monodevelop-list
mailing list