问题标签 [visual-studio-sdk]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2478 浏览

visual-studio-2010 - 如何修改项目文件的 Visual Studio 上下文菜单并向其添加命令

我为 Visual Studio 2010 创建了新类型的项目(通过 Visual Studio SDK),该项目由 *.pat 文件组成。*.cpp 文件在其上下文菜单选项中具有“编译”。我想将此类选项添加到我的文件类型的上下文菜单中。我该怎么做?

0 投票
2 回答
1237 浏览

c# - MVC 3 显示用户特定数据

我正在尝试使用 MVC 3 创建一个网站应用程序-问题是我想设置一个网站,用户在其中登录他们只能看到特定于他们的数据。例如,当您登录 Facebook 时,您只能看到您的“墙”,而看不到其他人。

有人可以指点我有关如何设置可以将数据连接到用户的数据库的教程吗?

提前致谢!

0 投票
1 回答
559 浏览

c# - Custom reference types

It's always been possible to add references for your project in Visual Studio. These show up under the special "References" folder in the solution explorer. You can also add service references, which also get put under their own special folder. I'd like to create my own reference type, complete with special folder, that other projects can use. What is this called, and where is some good documentation on how to do this?

0 投票
1 回答
278 浏览

projects-and-solutions - 为什么VS不能用自定义编辑器创建VSPackage项目?

我正在尝试创建一个 VSPackage 项目(使用 Visual Studio 2010 SP1 SDK),当我不添加自定义编辑器时它可以完美运行。但是当我这样做时,它卡在“正在创建项目 VSPackageX ...”并且 Visual Studio 基本上没有响应。

事件日志中没有任何内容,我不知道 Visual Studio 的日志文件位于何处。

关于如何解决这个问题的任何想法?

0 投票
1 回答
185 浏览

visual-studio - 处理 Visual Studio 2010 事件

是否可以处理 Visual Studio 事件?例如,在用户打开工具箱时执行一些操作。

使用 VS2010 SDK 我怎么能做这样的事情?

另外,我怎么知道 Visual Studio 仍在初始化并且正在以编程方式加载包?

以及如何以编程方式知道 Visual Studio 已加载所有包,现在它已准备好供用户交互?我更多的是寻找 VisualStudio 事件,如 LoadingPackagesEvent、AllPackagesLoadedEvent.. 或类似的东西!

任何帮助是极大的赞赏!

  • 达特
0 投票
2 回答
487 浏览

visual-studio - VS SDK: ToolWindowPane hides when debugging

I used the VS 2010 SDK to create and show a custom ToolWindowPane with a WPF control as content. I create a new instance and show it each time a Tool menu item is clicked (the ProvideToolWindow attribute has MultiInstances = true).

When the user attaches the debugger (e.g., hits F5 while in C# project) my ToolWindowPane suddenly hides. I'd like to make sure my tool window is always visible while open, no matter what context the user is in. Is there a way I can enforce that?

I've tried using the ProvideToolWindowVisibility attribute but that automatically shows a new instance of my tool window rather than keeping a remaining one open.

0 投票
3 回答
1263 浏览

envdte - DTEEvents.OnStartupComplete 事件不适用于 VSPackage (VSSDK2010)

在 Package 构造函数中,我为 OnStartupComplete 事件添加了事件处理程序。但是当我运行代码时,不会调用事件处理程序。我究竟做错了什么?

0 投票
1 回答
1096 浏览

visual-studio - 如何以编程方式找出解决方案中每个启动项目的操作?

在Solution->Properties下,我可以设置多个启动项目: 解决方案属性

我知道我可以获得标有“开始”的项目列表(通过使用 EnvDTE: solution.SolutionBuild.StartupProjects),但是如何获得其操作为“不调试就开始”的项目列表?它们不会出现在列表中。

0 投票
0 回答
130 浏览

visual-studio - 我必须等待什么事件才能安全访问 IWpfTextView.TextViewLines

我开始为 VS 编辑器编写一个装饰器,我的数据很大程度上基于行号,所以我需要访问 IWpfTextView 上的 TextViewLines 属性来计算我的一组装饰器。

但是,当调用 TextViewCreated 时,该属性仍为 Null。

我尝试等待第一次调用 OnViewLayoutChanged,实际上当时该属性不为空,但行数为 '2',对于 50 行文件,似乎只是前两行。

我需要什么时间来获得完全初始化的实际反映完整文件内容的 TextViewLines?还是我误解了我应该得到什么?

这适用于 VS2010 SP1 上的 csharp 内容类型。

0 投票
1 回答
1638 浏览

c# - Visual Studio 2010 SDK -- 如何在 XML 注释组旁边放置一个装饰?

我很难找出如何做到这一点,Visual Studio SDK 参考也不是很有帮助。

我试图弄清楚如何获得NormalizedSnapshotSpanCollectionXML 注释。我想在它们旁边放一个图标...我不想在每行旁边放一个图标,而只在每组的第一行旁边...