开发者

How to determinate Target Platform of project via EnvDTE.Project interface

I am trying to determinate the target platform of Visual Studio project via automation model. However i still do not succeed in this. Does anybody know how to obta开发者_Go百科in project's target platform with DTE (Any CPU/x86/x64)?


Here is a Visual Studio macro that will print out the target platform of the active project to the macro output window when run with F5 from the macro IDE:

Public Sub ShowProjectPlatform()

    Dim project As Project = CType(CType(DTE.ActiveSolutionProjects, Object())(0), Project)
    System.Diagnostics.Debug.WriteLine("TargetPlatform = " & project.ConfigurationManager.ActiveConfiguration.Properties.Item("PlatformTarget").Value)

End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜