S
Sharon
Hello Gurus,
Hope you can help me…
I have s VS2005 solution with several C# projects.
I want to manipulate the projects to add a snk key file and to set the
projects to sign it using that key.
I’m trying to write a utility project in C# to change the project setting
for that purpose as follow:
using EnvDTE;
using EnvDTE80;
using VSLangProj80;
EnvDTE80.DTE2 dte;
dte = (EnvDTE80.DTE2)Marshal.GetActiveObject("VisualStudio.DTE");
string str = dte.Solution.FullName;
Projects projects = dte.Solution.Projects;
VSLangProj80.VSProject2 vsPrj;
foreach( Project proj in projects )
{
vsPrj = (VSLangProj80.VSProject2)proj.Object;
Project prj = vsPrj.Project;
// Now I want to do the sign setting for the project.
}
The problem is that the line with VSLangProj80.VSProject2 causes en error as
follow:
System.IO.FileNotFoundException - "Could not load file or assembly 'EnvDTE,
Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified."
I don’t have this EnvDTE version and I could not find it to download.
I do have the newer versions.
How can I fix this?
Some more coding questions:
(1) How can I load the Solution object with a specific solution file of my
choosing?
(2) Having the VSProject2, how do I set it to sign with a specific snk key
file?
______
Thanks
Sharon
Hope you can help me…
I have s VS2005 solution with several C# projects.
I want to manipulate the projects to add a snk key file and to set the
projects to sign it using that key.
I’m trying to write a utility project in C# to change the project setting
for that purpose as follow:
using EnvDTE;
using EnvDTE80;
using VSLangProj80;
EnvDTE80.DTE2 dte;
dte = (EnvDTE80.DTE2)Marshal.GetActiveObject("VisualStudio.DTE");
string str = dte.Solution.FullName;
Projects projects = dte.Solution.Projects;
VSLangProj80.VSProject2 vsPrj;
foreach( Project proj in projects )
{
vsPrj = (VSLangProj80.VSProject2)proj.Object;
Project prj = vsPrj.Project;
// Now I want to do the sign setting for the project.
}
The problem is that the line with VSLangProj80.VSProject2 causes en error as
follow:
System.IO.FileNotFoundException - "Could not load file or assembly 'EnvDTE,
Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one
of its dependencies. The system cannot find the file specified."
I don’t have this EnvDTE version and I could not find it to download.
I do have the newer versions.
How can I fix this?
Some more coding questions:
(1) How can I load the Solution object with a specific solution file of my
choosing?
(2) Having the VSProject2, how do I set it to sign with a specific snk key
file?
______
Thanks
Sharon