w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to enable open XML Package Editor power tool for Visual Studio
Anup, Have you tried going to File->Open from Visual Studio? If that opens it from an Office client application as well, then the Visual Studio Package Editor is not the default option for opening documents of that file extension. If the document is a part of a solution (you can just create a new blank solution and add it in) you can right click on the file from Solution Explorer and choose "Open With", from there you can choose to open that file as a "Package File", and you can also select this as the default way to "open" files of that extension in Visual Studio.

Categories : Visual Studio 2010

How to open extension in Visual Studio 2010
Both extensions have a guide on their page. Regex Tester: http://visualstudiogallery.msdn.microsoft.com/16b9d664-d88c-460e-84a5-700ab40ba452 Regular Expression Tester Extension: http://visualstudiogallery.msdn.microsoft.com/bf883ae3-188b-43bc-bd29-6235c4195d1f

Categories : Regex

How to create extension which adds REPL window to Visual Studio
There's no simple example anywhere for this. What you might want to look at is the Python Tools for Visual Studio's REPL window implementation, which is open source.

Categories : C#

C# Visual Studio Open New Window
Adding a new form and opening it is very simple in C#/Visual Studio. Do the following: Add a new form to your project: Do this by right-clicking your project and choose: Add -> Windows Form. Name the form Create new instance of form and call form: Go to the location where the new form should be called from. Add following code there: NewForm newFrm = new NewForm(); newFrm.Show(); New form will be visible when application calls code above.

Categories : C#

Visual Studio Test Explorer window will not open
As a brutal fix I actually decided to reset all VS settings (not ideal as you lose all your custom settings like formatting and debugging preferences!). To do this open up a cmd line and cd to the VS directory (mine was C:Program Files (x86)Microsoft Visual Studio 11.0Common7IDE) and type: devenv.exe /ResetSettings Hope this helps someone in the future...

Categories : Visual Studio

Visual Studio doesn't open command window for console application
Your application is probably finishes its job so fast, that you dont notice the command window. Add Console.ReadKey(); at the end of your main function. That is assuming you actualy run an exe file.

Categories : C#

will visual studio 2012 projects open in visual studio 2010
Depends on what features you have in your 2012 projects. Some of the 2012 features will not open in 2010 and will therefore need upgrading. To quote Microsoft: "If you use both Visual Studio 2012 and Visual Studio 2010 SP1, you can create and modify projects and files in either version as long as you don't add features that require Visual Studio 2012." More details on the features that are not supported in 2010 can be found here.

Categories : Dotnet

Visual Studio: Differences between image paths set from the project window and programmatically set image paths
In first instance images are stored as a resouce file and are saved in the resources. Whereas in the second instance you specify the path where the image resides. Yes you can add image in resources progamatically if you are working in .net 4 or above. See this for details.

Categories : C#

c# visual studio - Better tool to use with formatted text
Check out AvalonEdit from SharpDevelop project. It has declarative formatting with 'out-of-the-box' support for many languages. And it can control any formatting by code as well. https://github.com/icsharpcode/SharpDevelop/wiki/AvalonEdit http://www.codeproject.com/Articles/42490/Using-AvalonEdit-WPF-Text-Editor And it's even available in NuGet https://www.nuget.org/packages/AvalonEdit

Categories : C#

visual studio c# change button tool tip on click
That is exactly what you would do. Just capitalize the 'T' in ToolTip. Maybe add some kind of counter system to determine whether to change it to that tool tip or to the previous one on click if you're going to have it switching back and forth each time.

Categories : C#

Margin tool tip in stylesheet looks off for Visual Studio 2012
Visual Studio will only suggest keywords, like as auto, inherit, and initial, the only other options are values (e.g. 5px, 10em, etc). top, right, bottom, and left are not values for the margin: property. You must be thinking of margin-top:, margin-right:, margin-bottom: and margin-left:, which are different properties entirely.

Categories : CSS

How to set up SourceGear DiffMerge as the diff/merge tool for Visual Studio?
Firstly, you need to change the default command line to: C:Program Files (x86)SourceGearVault Clientsgdm.exe I found the parameters in this thread on the SourceGear support forums, but the arguments given there are incorrect and result in the auto-merge being executed in reverse, i.e. old code overwrites new code. The correct arguments are: /m /t1=%6 /t2=%7 /t3=%8 /c=%9 %1 %3 %2 /r=%4

Categories : Visual Studio 2012

Open a Visual Studio Solution with a Visual Studio Add-in
You should use the ExecuteCommand to execute the standard File.OpenProject command. Similar to using the File>Open>Solution. Something like this will do in C#: string path = @"C:UsersxyzDocumentsVisual Studio 2010ProjectsMyAddin1MyAddin1.sln"; path = """ + path + """; _applicationObject.ExecuteCommand("File.OpenProject", path); Which translates to VB.NET: Dim path As String path = """C:UsersxyzDocumentsVisual Studio 2010ProjectsMyAddin1MyAddin1.sln""" DTE.ExecuteCommand("File.OpenProject", path) If you would like to know whether the command has finished, you should create an eventhandler for the command.

Categories : Vb.Net

Add files/folders to a visual studio project using command line tool
You can access Visual Studio automation from VB Script. See the following sample .vbs file that can be run as an executable: Dim dte Dim project Set dte = CreateObject("VisualStudio.DTE.11.0") dte.Solution.Open("C:UserssvDocumentsVisual Studio 2012ProjectsConsoleApplication1ConsoleApplication1.sln") For Each project In dte.Solution.Projects If project.Name = "ConsoleApplication1" Then project.ProjectItems.AddFromFile("C:UserssvDocumentsVisual Studio 2012ProjectsConsoleApplication1ConsoleApplication11.txt") project.Save(project.FullName) End If Next dte.Solution.Close()

Categories : File

Is there a good tool to design JQuery Mobile Interfaces in Visual Studio?
There isn't a requirement for this. The same logic why Visual Studio no longer has an HTML "designer", only an editor, for MVC applications. The main reason is interoperability (browser compat) and live editing (Code midway between starting and the user having carried out a number of actions). When you have a JS heavy site the non executed html is not very useful to look at. For live editing Tools like Expression blend are potentially useful but I don't know of anyone who uses it for production. "codiqa.com" is more a platform / prototype tool than a jquery ui design tool. And once you need super custom behaviours you would export their code into your good old editor and start cracking code like you used to. Not saying it isn't useful to get an easy start, but saying that it isn't the

Categories : Visual Studio

Replace visual studio 2012 Diff tool with winmerge when using Microsoft Git Provider
Backed up by that DZone-article, the trick is to configure the diff-tool in git.config: Open the git bash in your repository Create a config section for WinMerge as a diff-tool: $ git config --local difftool.winmerge.cmd '"C:Program Files (x86)WinMergeWinMergeU.exe" "$LOCAL" "$REMOTE"' Configure git to switch to WinMerge as the diff-tool: $ git config --local diff.tool winmerge If you want to have this setting as a global setting, replace the --local switch with --global.

Categories : GIT

Git Extension for Visual Studio
The message is about uncommitted changes, not real merge conflicts. Learn to NOT merge or do any fancy git stuff with uncommitted changes. Before an operation commit your changes or stash them. Even if conflict like that is not flagged it's likely not what you really wanted to do. In GE there's an option to show worktree changes (ignore the "slow" warning unless you work on a giant repo and regularly have hundreds of changed files) and get used to look at it in browse. Also the "Commit" button shows a count, that shall be 0 when you incite a merge. If in the middle of your work you want to synch (and thought again and have a really good reason, honest), use stash, then pull (or rebase), and after that is done, unstash your work. Real merge conflicts are best handled using visual merg

Categories : GIT

Why I am getting a Visual Studio Extension temporary name
I am using a helper method that obtains the package installation folder from the codebase of the assembly that defines my package class... internal static string GetPackageInstallationFolder() { Type packageType = typeof(MyPackage); var assemblyCodeBaseUri = new Uri(packageType.Assembly.CodeBase, UriKind.Absolute); var assemblyFileInfo = new FileInfo(assemblyCodeBaseUri.LocalPath); return assemblyFileInfo.Directory.FullName; }

Categories : Visual Studio

Visual Studio Extension KeyProcessor Alt Key
The correct code. Need used args.SystemKey and Keyboard.Modifiers. public override void KeyDown(KeyEventArgs args) { if (args.SystemKey == Key.E && (Keyboard.Modifiers & ModifierKeys.Alt) != 0) { } }

Categories : C#

How to programmatically detach debugger in Visual Studio
Looks like you have to use a win32 API call, have a look at the following links http://blogs.msdn.com/b/jmstall/archive/2006/03/09/detach-restrictions.aspx Programmatically detach debugger

Categories : Dotnet

How do I programmatically add a file to a visual studio project in C++?
There are two ways how you could do this. You simply treat the project as XML and you edit that XML. You use Visual Studio's COM/.NET APIs. It is not (IMHO) easy to do it using the Visual Studio APIs but it is doable. Start at MSDN's "How to: Get References to the DTE and DTE2 Objects" and follow the links.

Categories : Visual Studio 2010

Using standard Visual Studio windows programmatically
If you have a Team Foundation Server setup, which it looks like you do, then you can probably achieve this by working through the tfs web portal. For me the "Create Work Item" is found under: http://myserver:8080/tfs/<Collection>/<Project>/_workItems

Categories : Visual Studio 2012

code coverage tool from Visual Studio 2012 Team Tools does not work on release bits
Try this: Enabling Profiling. [UPDATE 5 Jun 2013 14:04:00-04:00 UTC] I also found this article that you may be interested in: Application Analytics: What Every Developer Should Know. As far as Code Coverage is concerned, I didn't see anything specific to using the VS Code Coverage tool and configuring for IIS. I did see lots of articles about testing web applications in general, some of which involved setting up code coverage (Setting Up Machines and Collecting Diagnostic Information Using Test Settings being an example). Sorry I couldn't be of more help to you.

Categories : Iis

How to install extension into visual studio 2012
Just found a way, If I double click the vsix file, and select visual studio version selector, it installs the extension. surprised the other ways didnt work but i think this did, still waiting to see.

Categories : Visual Studio 2012

Visual Studio extension define dependencies
Keep a Local copy of each reference. For every DLL or Reference, just right click on it and select Properties. In Properties Change "Copy Local" to true. I hope this is what your problem is..

Categories : C#

How can I programmatically open Powerpoint without seeing the window?
objPPT.Presentations.Open inputFile,,msoFalse It needs another comma objPPT.Presentations.Open inputFile,,,msoFalse The parms are: Presentations.Open "filename", boolReadOnly, boolOpenUntitled, boolWithWindow You're telling it to open the input file, read-only, not untitled and leaving the WithWindow parm at its default value (True) which opens WITH a visible window. Bear in mind that you can't write any code that selects anything (that requires a visible window), but since you're not doing this, you should be good to go. [APPENDED EDITS] Ansgar's correct (apologies for my earlier mistaken comment). We're not allowed to invoke PPT invisibly, BUT if you create/open a presentation windowlessly, PPT never appears. I'm not familiar enough with VBS scripting to work out the exact

Categories : Vbscript

Create Solution/Project programmatically without Visual Studio
I think generating the solution is a little extreme. The solution file structure hasn't changed much since 2005 http://msdn.microsoft.com/en-us/library/bb165951(v=VS.80).aspx, and there are a few projects trying to automate their generation, like Premake https://bitbucket.org/premake. However, the kind of scenario you describe, might be I believe (better?) adressed with t4 templates http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx, or only project file generation.

Categories : C#

visual studio 2010 or 2012 - any setting or tool to stop delete of collapsed region/section of code
Preventing this sort of thing completely may be a non-trivial task. A tool could certainly be created to do this, but there are many issues. Which code to protect? How to identify that code? File, Procedure, Range? What happens when the tool isn't loaded or fails to load? What happens when someone else on your team doesn't use the tool and deletes the code anyway? IMHO it may be more effective to develop practices and techniques 1. Detect that the code has been deleted. 2. Quickly Restore it. Some potential ways to achieve this are: Unit Tests Write some simple unit tests that depend on, and of course test, the code which you are looking to protect. When these tests fail, you have deleted, or in some other way broken, your code. VCS (Version Control System) The simplest

Categories : Visual Studio 2010

Visual Studio treat custom extension as CSharp
So inside of VS things are actually a bit different than the editor APIs imply -- we don't actually use content types (for the most part) to determine when to activate. Noah Richards has a great blog post that shows how to create an extension that marks another extension under an existing editor.

Categories : Misc

Visual Studio Extension icon in Text Editor
When you are creating your smart tags, you can set ISmartTagSession.IconSource to set the icon you want to show.

Categories : C#

Upgrade Visual Studio solution and project files programmatically
Let me present you a different view than the 2 you presented. The fact that an upgrade is slow is that all kinds of checks are performed on the projects/solutions that you attempt to upgrade. An 'Upgrade Report' is generated to provide feedback on those checks. This is information that should not be ignored since it provides remedies on the mentioned issues. You state that you deploy the projects/solutions via an installer. Presuming that you have a development team/tools that are up-to-date you could perform the upgrades as part of your installer design/development. Why would you not perform the upgrades yourself and include project files in your installer. During installation you would install the version of the project/solutions files that matches the target platform.

Categories : C#

Rolling back Visual Studio Extension to Earlier Version
Chocolatey has 2.7 version available (http://chocolatey.org/packages/WebEssentials2012), but at least in my case that just returned the newer 2.8 version. I installed 2.5.6.2 version found from Mads nightly builds feed (http://madskristensen.net/post/Web-Essentials-nightly-builds.aspx) and that did the trick for me, @import -statements are working again. Edit: 2.7 vsix package can be found from here: http://vswebessentials.com/nightly/webessentials2012-2.7.vsix

Categories : GIT

Is there any extension for visual studio to optimize C++ code unit testing?
There is the CppUnitTestFramework, look here: http://msdn.microsoft.com/en-us/library/hh694604.aspx It is integrated in the IDE and comes with a code coverage tool which is quite useful.

Categories : C++

How to configure rules in JSLint extension for Visual Studio 2012
This has been silent long enough I'll at least answer for VS 2008 and hope it's similar for the VS 2012 plugin. Question 1: Go to your tools menu. Select "JSLint Options". Look for "Tolerate sloppy whitespace", and check it. Hopefully the 2012 version has a similar checkbox. Question 2: The second is a little nastier. I don't believe there's a setting to turn it off, but even the VS plugin just uses the JSLint javascript file under the hood (or at least the 2008 version does via Noesis). So if you want, you can open up jslint.js and edit it. If you edit this part, the error is ignored: if (peek(0).id === '}' && peek(1).id === 'else') { // commented out >>> this.warn('unexpected_else'); } Voila. The JSLint code really is good, clean stuff that's easy to cust

Categories : Visual Studio 2012

Can I programmatically collapse/expand all preprocessor blocks of a certain name in Visual Studio 2012?
This is the most easiest scenario you can achive it, I think. You should create an Add-In first in C#. (in VS 2013 they become deprecated :( ) In the OnConnection method you should add your command: public void OnConnection( object application, ext_ConnectMode connectMode, object addInInst, ref Array custom ) { _applicationObject = (DTE2)application; if (connectMode == ext_ConnectMode.ext_cm_AfterStartup || connectMode == ext_ConnectMode.ext_cm_Startup) { Commands2 commands = (Commands2)_applicationObject.Commands; try { //Add a command to the Commands collection: Command command = commands.AddNamedCommand2(_addInInstance, "MyAddinMenuBar", "MyAddinMenuBar", "Executes the command for MyAddinMenuBar", true, 59, ref contextGUID

Categories : C++

Visual Studio Extension highlight based on passed in code block
If you're following that prototype, then you can adjust these lines here: //Find the new spans FindData findData = new FindData(currentWord.GetText(), currentWord.Snapshot); findData.FindOptions = FindOptions.WholeWord | FindOptions.MatchCase; wordSpans.AddRange(TextSearchService.FindAll(findData)); TextSearchService.FindAll is returning the list of spans in the editor that matched the text passed in. Nothing is stopping you from simply changing the spans or computing new ones before calling AddRange. Customize that logic to whatever you want. Obviously, if what you want to highlight doesn't depend upon the position of the caret, there's a fair bit of code you can delete for the determination of currentWord.

Categories : Visual Studio 2012

C#, Visual studio 2012, find default programs to run a specific extension
I don't quite understand your question exactly, if you could, could you add some code or at least expand your question with a possible scenario. I bet it would help the community respond with a more relevant answer. If you are trying to pull values out of the Registry, using a RegistryKey works. RegistryKey reg1 = new Registry.ClassesRoot; string[] values1 = reg1.OpenSubKey("txtfile").GetValueNames(); Will get you the names of the values held. I don't exactly understand what you wish to get out though but to better illustrate. object InstallationDirectory = reg.OpenSubKey(RegistryEntryPath).GetValue("Client Installation Directory"); would return you the specified installation path of a program. This may put you on the right track. EDIT: After reading your edited post I did

Categories : C#

Passing custom project properties from Visual Studio Extension during build
You can request service IVsBuildPropertyStorage, it has following method: SetPropertyValue Used by a project subtype to set an MSBuild property value. Something like this: EnvDTE.Project proj = ...; var sol = Package.GetGlobalService(typeof(VsSolution)) as IVsSolution; IVsHierarchy hier; sol.GetProjectOfUniqueName(p.UniqueName, out hier); var storage = hier as IVsBuildPropertyStorage; storage.SetPropertyValue(..); More information: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsbuildpropertystorage.aspx

Categories : Visual Studio

Visual Studio extension code completion- multiple file data
There is no ITextBuffer provided for files which exist on disk but are not currently open in Visual Studio. It is possible to create an instance of ITextBuffer for any arbitrary file by using ITextDocumentFactoryService::CreateAndLoadDocument. This takes a string and will give back an ITextDocument instance from which you can access an ITextBuffer. In order to find the existing ITextBuffer for files that are currently open you can do the following IVsRunningDocumentTable::FindDocument This takes a file path and returns a cookie representing that file if it is currently open (Example) IVsRunningDocumentTable::GetDocumentInfo This takes a cookie and returns back an IVsTextLines instance (Example) IVsEditorAdaptersFactoryService::GetDataBuffer takes an IVsTextLines and gives back an I

Categories : Visual Studio 2012

Cannot use WinDbg and SOS in Visual Studio Immediate window
NTSD command support (MSDN) and Immediate Window Commands describe which WinDbg commands (or similar to WinDbg) are supported by Visual Studio 2005, 2008 and 2010. It's only a small subset: .S .X .K .U .~ .Reload .Sympath .Cxr .Exr .Load .Unload .Unloadall Most important is probably the .Load which allows loading extensions and then using ! commands of the extension. It seems that support for WinDbg commands was dropped with VS 2012, since you cannot call the web page for VS versions higher than VS 2010.

Categories : Visual Studio 2012



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.