visual-studio-2012

Explicit template declaration/definition in VS 2012

六月ゝ 毕业季﹏ 提交于 2019-12-23 08:15:23
问题 The following code declares a template, declares an explicit instantiation definition, then declares an explicit instantiation declaration: template <typename T> T Double(T number) { return number * 2; } extern template int Double<int>(int); // declaration template int Double<int>(int t); // definition int main(int argc, char* argv[]) { int n = Double(10); return 0; } gives an error: error C2929: 'int Double<int>(int)' : explicit instantiation; cannot explicitly force and suppress

Suppress warning on solution level. Treat warning as error on solution level

て烟熏妆下的殇ゞ 提交于 2019-12-23 08:07:32
问题 I am trying to set global rules for my team. We are using VS2012 with TFS for our C# projects. I'd like to suppress some of the warnings and also treat some of the warnings as errors. I found the way to do it on the project level - project properties -> build tab. But we have solution with more than hundred projects and I am looking for some easier way to set those rules globally. 回答1: A solution is just a (pretty dumb) container for projects. If you open it in a text editor you'll quickly

VS Web Essentials 2012 compile master LESS on imported save

末鹿安然 提交于 2019-12-23 07:40:07
问题 I am trying to maintain a global .less file which @imports the rest of the application .less files. I am currently developing this project in Visual Studio 2012 using the Web Essentials extension which automatically generates css files on save. However it only compiles the .less file which has just been saved and it's children and I want upstream "master" .less files which @import the current file to be compiled. Anyone know how to do this? 回答1: In the latest nightly build, you now have an

VS 2012 / 2013 AccessViolationException

房东的猫 提交于 2019-12-23 07:16:53
问题 When I run the project (F5) I receive the following exception in IDE: An unhandled exception of type 'System.AccessViolationException' occurred in System.Windows.Forms.dll Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Stack trace reports at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.Control.SendMessage(Int32 msg, Int32

What 's wrong with VS2012 and Performance Analyzer?

随声附和 提交于 2019-12-23 07:06:29
问题 I am trying to do some perf. analysis on a piece of code that is dog slow... I start VS2012 Premium as Admin, load my solution and the go to 'Analyze - Launch Performance Wizard' Immediately I am shown a dialog that says: Could not load file or assembly 'VSPerfReader.DLL' or one of its dependencies. Awesome! The file is located here: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Team Tools\Performance Tools I can start Windows Performance Analyzer (standalone) from 'start' just fine btw

MSTest data driven Test set DisplayName for Rows from DataSource

白昼怎懂夜的黑 提交于 2019-12-23 07:06:04
问题 How can I set the DisplayName of a Data Row in data driven tests, where the data source is a XML and the provider is Microsoft.VisualStudio.TestTools.DataSource.XML. XML: <?xml version="1.0" encoding="utf-8" ?> <environments> <environment><name>IE</name></environment> <environment><name>Chrome</name></environment> </environments> App Config: <!-- CONNECTION STRINGS SETTINGS --> <connectionStrings> <add name="IE_Chrome" connectionString="IE_Chrome.xml" providerName="Microsoft.VisualStudio

How do I delete an Imported Snippet in Visual Studio?

依然范特西╮ 提交于 2019-12-23 07:00:09
问题 I imported a snippet, and I want it gone. Problem is that the Snippet Manager has the Remove button grayed out when I go in and try to remove it, any ideas? 回答1: Chances are that code snippet was imported to Program Files folder (e.g. C:\Program Files (x86)\Microsoft Visual Studio 11.0\Web\Snippets\CSS\1033\CSS) instead of C:\Users\\Documents\Visual Studio 2012\Code Snippets Snippet Manager displays the location of selected snippet, just go there, delete it manually and restart Visual Studio.

Visual Studio 2012 - where has ASPX design and split view gone?

一个人想着一个人 提交于 2019-12-23 06:59:05
问题 Just started a new web forms project in Visual Studio 2012. Opened my aspx page in 2012 and there is no Split or Design View? I am using the RTM version. Have they honestly taken this out? If not, where can I find them? 回答1: Follow theses steps Go to Tools --> Select Options Tick the box at the bottom of this dialog: Show all settings. Select HTML Designer --> Enable HTML designer 回答2: For those using Visual Studio 2015: In Solution Explorer , right-click on the file you wish to open. Choose

Exception Message: There is no working folder mapping for

被刻印的时光 ゝ 提交于 2019-12-23 06:48:49
问题 I am trying to test automated builds in tfs/vs.net 2012. I have set the workpaths in the source control explorer but now I am getting an error: Exception Message: There is no working folder mapping for $/testing/buildtest. (type ItemNotMappedException) 回答1: I had the same problem. Turned out I had forgotten to expand the Items to Build section of the Process tab. To fix you need to: Edit build definition Open Process tab on left Open the 1. Required section open up Items to Build ensure the

The best overloaded method match for XXX has some invalid arguments

谁说我不能喝 提交于 2019-12-23 05:43:12
问题 I'm a new beginner to the entity framework . I try to write te following method but i get a compile time error. protected static void EntitySQLQuery(AWEntities context) { string cmd = @"SELECT VALUE c FROM AWEntities.Person AS c WHERE c.FirstName = @FirstName"; ObjectQuery<Person> persons = new ObjectQuery<Person>(cmd, context);//Error } The best overloaded method match for 'System.Data.Objects.ObjectQuery.ObjectQuery(string, System.Data.Objects.ObjectContext)' has some invalid arguments 回答1: