visual-studio-2012

How can I create a (VSTO) Office 2007 add-in using VS 2012?

不羁的心 提交于 2019-12-17 17:38:18
问题 Visual Studio 2012 does not appear to support Office 2007 (it only has project templates for Office 2010). If I want to create an add-in compatible with Office 2007, do I need to use Visual Studio 2010, or is there a simple way to do it with VS 2012? If there is a way to do it in VS 2012, are there any restrictions/advantages, etc. in doing so? 回答1: You can get VS 2012 working with Office 2007 . First create an Outlook 2010 Add-In and modify the project file ( .csproj ) so that it will open

Visual Studio 2012 Error Reference.svcmap throwing Error

故事扮演 提交于 2019-12-17 16:36:20
问题 Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever i try to use the "add/remove reference" dialog in another solution, I get below error after adding the service. Error 1 Reference.svcmap: Failed to generate code for the service reference 'DPService'. Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Type 'WebSupergoo

Visual Studio not breaking on user-unhandled exceptions

蓝咒 提交于 2019-12-17 16:24:55
问题 When running my app in Visual Studio, it's ending on unhandled exceptions rather than showing a message box with the exception info and continuing on as I'm accustomed to. What options do I need to change to get it back to the behavior I'm used to? Edit: In Debug/Exceptions I do have the User-unhandled option selected for CLR Exceptions. 回答1: Debug->Exceptions->Check Thrown/User-Unhandled for Common Language Runtime Exceptions edit: Maybe try to do a clean/rebuild, and run again? Maybe debug

How can I invoke my MSBuild Target when msbuild.exe starts and when it ends

走远了吗. 提交于 2019-12-17 15:41:24
问题 In other words, I want this Target to be invoked just once a the start and end of the whole build session, not for each individual project that might be built as part of that session. Another way to put is it that when hitting Build (F7) in Visual Studio I would like to invoke my custom Target at the very beginning and end of the build, regardless of what was built (and whether or not it was successful). Is this possible? If not, are there alternatives to using MSBuild Targets that would

The 'ProviderPackage' package did not load correctly

為{幸葍}努か 提交于 2019-12-17 15:17:59
问题 I installed Visual Studio 2012 and at a later date Update 2. After installing Update 2, when I load any project, I get the following error: --------------------------- Microsoft Visual Studio --------------------------- The 'ProviderPackage' package did not load correctly. The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\username\AppData\Roaming\Microsoft\VisualStudio\11.0

Moq & Interop Types: works in VS2012, fails in VS2010?

此生再无相见时 提交于 2019-12-17 11:48:29
问题 I have a .NET library project with about 500 unit tests. All these tests run fine in Visual Studio 2012. However, some of my tests fail in Visual Studio 2010. In these failing tests, I use Moq to mock several Interop Types from Microsoft.Office.Interop.Excel . The test fails immediately when attempting to access these mocked interop types: Error: Missing method 'instance class Microsoft.Office.Interop.Excel.Range [ExcelAddIn.Core] Microsoft.Office.Interop.Excel.ListRow::get_Range()' from

Visual Studio 2012 doesn't convert vs2010 solution?

点点圈 提交于 2019-12-17 11:00:41
问题 I opened my vs2010 solution with vs2012 but it didn't make any conversion as from 2008 to 2010 was happening. So my solution still remains the same as 10 label on it. when I make a new solution of course it has 11 label on it. I haven't got any problem running like that but I am curious. Is there any difference? if yes, how to convert into vs2012 solution? 回答1: There are some exceptions, but mostly you'll be able to open the same project and solution files files in both VS2012 and VS2010 SP1.

How to enforce the 'override' keyword?

别来无恙 提交于 2019-12-17 10:57:06
问题 Is there any way to enforce the usage of the C++11 override keyword in Visual C++ 2012? (i.e. if I forget to say override , then I want to get a warning/error.) 回答1: C++11 almost had what you want. Originally the override keyword was part of a larger proposal (N2928) which also included the ability to enforce its usage: class A { virtual void f(); }; class B [[base_check]] : public A { void f(); // error! }; class C [[base_check]] : public A { void f [[override]] (); // OK }; The base_check

How to get list of projects in current Visual studio solution?

ぃ、小莉子 提交于 2019-12-17 10:44:57
问题 When we open Package Manager Console in any open solution, it shows all the projects of that solution. How it is loading all the projects of the same solution. When I tried with below shown code it is fetching me projects of the first solution which I have opened. private List<Project> GetProjects() { var dte = (DTE)Marshal.GetActiveObject(string.Format(CultureInfo.InvariantCulture, "VisualStudio.DTE.{0}.0", targetVsVersion)); var projects = dte.Solution.OfType<Project>().ToList(); return

Visual studio - getting error “Metadata file 'XYZ' could not be found” after edit continue

一世执手 提交于 2019-12-17 10:25:55
问题 I have stumbled into an issue that is really annoying. When I debug my software, everything runs OK, but if I hit a breakpoint and edit the code, when I try to continue running I get an error: Metadata file 'XYZ' could not be found After looking around for a while, I found some a similar issues, but they were all regarding a build failure, which is not my case (this happens only after edit-continue). What I have tried so far: My code is compiling and running. I cleaned the solution and