visual-studio-2012

Getting IClassifier to work with custom content type

南楼画角 提交于 2020-01-07 05:46:08
问题 I am trying to add syntax highlighting for a custom content type based on text e.g. static class RTextContentType { public const string ContentTypeName = Constants.CONTENT_TYPE; [Export, Name(ContentTypeName), BaseDefinition("text")] internal static ContentTypeDefinition ContentTypeDefinition = null; // set via MEF } Then the classifier provider is declared like this, [Export(typeof(IClassifierProvider)), ContentType(Constants.CONTENT_TYPE)] class RTextClassifierProvider : IClassifierProvider

SQL Server debug Stored Procedure from .NET code

心已入冬 提交于 2020-01-07 05:14:08
问题 I'm wondering if there's a way to debug a stored procedure at the time it's called from .NET code? What are my possibilities? I'm using Visual Studio 2013 Community Edition and SQL Server 2014 回答1: I have managed to figure it out myself. It's quite similar to what you can find in VS 2010. I had to import database as a project to my solution. Turn on SQL Debugging in my application project properties. Re-open my project. Connect to my SQL Database through SQL Server Object Explorer. Right

“InvalidCastException was unhandled”

只谈情不闲聊 提交于 2020-01-07 05:10:30
问题 I'm trying to do an app which tells me the total times of all videos. Its not practical it's only a practice to improve my coding abilities :) In this line is the error Shell32.Shell shell = new Shell32.Shell(); And this is the error Unable to cast COM object of type 'System .__ ComObject' to interface type 'Shell32.Shell'. There was an error in operation because the QueryInterface call on the COM component for the interface with IID '{} 286E6F1B-7113-4355-9562-96B7E9D64C54' generated the

Dead items in context menu left by addin in Visual Studio

一曲冷凌霜 提交于 2020-01-07 04:36:13
问题 We are developing addin for Visual Studio. It creates items in Solution Explorer context menu. The problem is when we remove the addin, menu item is still there but without icon. When I click on it, VS propose to remove the command. See screenshot. How should they be uninstalled to remove the command? At the moment I just remove the addin file from "Visual Studio 2012\Addins" folder during uninstall. I'm using class Connect : IDTExtensibility2 回答1: One option is to run a .vbs script on

Visual Studio 2013. dbml file not updating

元气小坏坏 提交于 2020-01-07 04:28:29
问题 I am working on a Visual Studio project that uses ASP.NET/C# with LinqToSql. All has been going fine, until some changes were made to one of the database tables. After that, the Table in question was removed from the DBML database diagram, and the new version added back in using the Server Explorer. Trouble is, VS2013 still does not see the new fields, and will not compile if I reference them. The new table structure is clearly visible in the DBML database diagram. 回答1: Rebuild your project

NuGet command in VS : can install package but not added to packaged.config & project

a 夏天 提交于 2020-01-07 03:56:11
问题 I am having a problem with a package in a private repository, running install-package "PackageName" just install the package in "packages" folder, but the file packages.config doesn't contain this package, also the project file (*.csproj) is not being updated to have reference to this package. Normally, it should have a line saying that "Added package to project successfully", but not in this case. Could anyone please help? Thank you for any idea. 回答1: An easier way to add reference to a

Using c++ dll made from eclipse in visual studio 2012 c#?

人走茶凉 提交于 2020-01-06 21:00:11
问题 How can I use a c++ dll made from eclipse on visual studio 2012 c#? I already made the dll and tried to reference it in c# but visual studio gives an error that " A Reference to "....dll" could not be added please make sure that it is a valid assembly or com". I have read about it needs to be a managed com or something? If so, How can I do that in my eclipse c++ dll? 回答1: I made a pretty complete tutorial as an answer of another question here on Stack Overflow. See How to access class in C++

.chm file is not programmatically accessible in SOME folders

半城伤御伤魂 提交于 2020-01-06 19:55:11
问题 I have built a VS2012 application in VB. RECENTLY, I've found that I'm unable to access a HELP (.chm) file in my app development folder (and, for that matter, several of the folders leading up to that folder). I've now placed a copy of the .chm file in all of the folders forming the path to the app development folder. For reference, the app development folder is: C:/Users/Gary/My Documents/Visual Studio 2012/Projects/Doctor Doctor/Doctor Doctor/Doctor Doctor/Bin/Debug Up until a week ago, no

How to write an Edit Action

不羁的心 提交于 2020-01-06 19:40:55
问题 I am trying to come up with an edit action. See below for what i have so far. ViewModel: using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Web; using System.Web.Mvc; namespace GlobalUnitedSC.WebUI.Models { public sealed class CreateMensPlayerViewModel { //Player profile starts here [HiddenInput(DisplayValue=false)] public int MensTeamId { get; set; } [HiddenInput(DisplayValue = false)] public int PlayerId { get; set; }

Index was outside the bounds of the array vb.net n mapwingis

别来无恙 提交于 2020-01-06 19:28:15
问题 I am making a map app with VB.net and Mapwingis . I want to save the map data with an array, but any error. this code : Dim scheme As New MapWinGIS.ColorScheme Dim idx As Integer idx = FormMain.TreeViewLayer.Nodes.IndexOf(FormMain.TreeViewLayer.SelectedNode) sf = FormMain.AxMapMain.get_Shapefile(idx) mainMapHandler = FormMain.AxMapMain.AddLayer(sf, True) sf = FormMain.AxMapMain.get_Shapefile(mainMapHandler) Dim fieldName As Integer fieldName = CBSymVarNameUnique.SelectedIndex sf.Categories