visual-studio-2012

Upgraded to .NET 4.5, now “value does not fall within the expected range”

混江龙づ霸主 提交于 2020-01-02 01:04:06
问题 I am getting an error box popup that says TargetFrameworkMoniker: value does not fall within the expected range . I am using VisualStudio 2012 . This is a windows form application. I have searched around and have found hat this error shows up when an element in the form has a duplicate name, which my form does not. I have upgraded all other projects in my solution and this is the last one. steps to reproduce: Right click on the project and go to properties in the application tab Change the

How do I exclude service references from code coverage using the runsettings file in Visual Studio 2012?

人盡茶涼 提交于 2020-01-02 00:58:31
问题 I'm using a custom runsettings file to control what projects are inspected for code coverage. I used the default template provided by Microsoft and have so far been able to exclude the items I want with no issues. My next action is to exclude from code coverage the auto-generated web proxy classes that are created by Visual Studio when you add a service reference. This seemed something that should work with the default runsettings template since it has a section that looks like this:

Syntax error in Razor view when passing model properties as parameters to javascript function

房东的猫 提交于 2020-01-02 00:56:11
问题 I get a Syntax error on each comma ( , ) and on the last bracket ( ) ) in the following code: <script type="text/javascript"> Filters.priceRangeInit(@Model.Min, @Model.Max, @Model.From, @Model.To); </script> The javascript function is in another file and looks like this: Filters = { priceRangeInit: function (min, max, from, to) { $('#price-range-slider').slider({ min: min, max: max, step: 50, values: [from, to], slide: function (event, ui) { $('#left-price-range-amount').val(ui.values[0]); $(

The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?)

馋奶兔 提交于 2020-01-02 00:55:11
问题 So, I have a MVC 4 project in C# and I am using Visual Studio For Web 2012 Express. I cannot compile the projecto due to the error: The type or namespace name 'BundleCollection' could not be found (are you missing a using directive or an assembly reference?) Normally, this would mean that a library is missing. Thus after making a quick search on the internet I used NuGet to install Microsoft.AspNet.Web.Optimization , but that still did not work. What makes this intriguing to me is that

Using Fiddler with Windows Store Unit Test

旧街凉风 提交于 2020-01-01 21:56:41
问题 I want to run Fiddler to help debug a portable API client that I'm developing. In Visual Studio, on the Windows Store Unit Test project property page > Debug tab I have checked the 'Allow Local Network Loopback' option. Every web request run during a store unit test fails with a System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to

Using Fiddler with Windows Store Unit Test

僤鯓⒐⒋嵵緔 提交于 2020-01-01 21:55:52
问题 I want to run Fiddler to help debug a portable API client that I'm developing. In Visual Studio, on the Windows Store Unit Test project property page > Debug tab I have checked the 'Allow Local Network Loopback' option. Every web request run during a store unit test fails with a System.Net.Sockets.SocketException : A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to

Explicit template specialization for constructor

旧街凉风 提交于 2020-01-01 19:14:12
问题 I have a template class, with a copy constructor: struct index_method {/*whatever*/}; template <class A, class B> class ExampleClass { public: ExampleClass(void) {} template <class C> ExampleClass( const ExampleClass<A,C>& src_, const B& b_ = B() ) : _b(b_) { } private: B _b; }; The following template constructor specialization is compiled properly by gcc 4.7.0: template <> template <> ExampleClass<double,index_method>::ExampleClass<index_method>( const ExampleClass<double,index_method>& src_

Method not found: 'Void System.Web.UI.ScriptResourceDefinition

折月煮酒 提交于 2020-01-01 18:54:09
问题 I've built a fairly simple website in using Visual Studio 2012 using .net 4.5 version. When I uploaded the website to my server I get the following error: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System

Method not found: 'Void System.Web.UI.ScriptResourceDefinition

点点圈 提交于 2020-01-01 18:53:05
问题 I've built a fairly simple website in using Visual Studio 2012 using .net 4.5 version. When I uploaded the website to my server I get the following error: Method not found: 'Void System.Web.UI.ScriptResourceDefinition.set_LoadSuccessExpression(System.String)'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System

Visual Studio 2012 Express Code Analysis

ぃ、小莉子 提交于 2020-01-01 16:36:11
问题 The Microsoft documentation talks about a limited set of code analysis tools being available for the express edition (e.g. Microsoft Visual Studio Blog ). I am using VS 2012 update 3, and can not see any code analysis options in context menus, or any buttons or menu options. I am pretty sure I ran some code analysis at some point, but that might have been before update 2 was installed. Does anyone know if this option has been removed from more recent express editions, and if not where I can