.net-4.0

Problem with bin Deploying ASP.NET MVC 3

和自甴很熟 提交于 2019-12-25 03:46:19
问题 I have problem with deploying my website to a server (which is not mine). I have one application that is running on this server and it is working (mvc 3, EF4). It was some time ago so I don´t know exactly what I changed to run it on that server but I think it was just adding referencies to bin folder. Now when I am trying on same server run my second app I did what is here: http://midnightprogrammer.net/post/Bin-Deploy-ASPNET-MVC-3-Application-With-SQL-CE-40-Entity-Framework.aspx and It says

Variable increment step in WinForm NumericUpDown control depending on whether Shift/Ctrl/etc. are pressed

落爺英雄遲暮 提交于 2019-12-25 03:45:25
问题 What I want is somewhat similar to what happens in a WinForm designer in Visual Studio, say VS2010. If I place a button and select it and use arrow keys, it will move around by 5 pixels in whatever direction I chose by pressing the right key. Now, if I hold either a Shift or a Ctrl modifier as I do that (forgot which one, sorry), then the button will move only by 1 pixel at a time. I want this to happen with my NumericUpDown control in a C# WinForm app. Let's say a default increment is 100.0,

Unable to create MVC4 web role for Azure project

寵の児 提交于 2019-12-25 02:34:48
问题 I tried creating an Azure project in Visual Studio 2012 Ultimate with a single MVC4 web role in it but got this error message. The project itself after creating didn't contain the MVC4 role I wanted. I only found similar error messages for MVC2 and on my other computer it works fine. 回答1: The roletemplatedata.xml file is a file included in each Windows Azure project in Visual Studio (ie: Web Roles with MVC3, MVC4, WCF, ...). You should be able to find it under C:\Program Files (x86)\Microsoft

How to get a Grid to raise MouseDown events when no UIElemets in cells clicked?

◇◆丶佛笑我妖孽 提交于 2019-12-25 01:54:22
问题 I observe Mouse.MouseDown and PreviewMouseLeftButtonDown are only raised when the mouse is clicked in a cell that contains a UIElement , e.g.: XAML <Window xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="WpfApplication5.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" Width="300" Height="300"> <Grid Mouse.MouseDown="Grid_MouseDown" PreviewMouseLeftButtonDown="Grid_PreviewMouseLeftButtonDown"> <Grid.ColumnDefinitions> <ColumnDefinition Width="100"/>

System.Reflection.IntrospectionExtensions for .NET 4.0?

被刻印的时光 ゝ 提交于 2019-12-25 01:54:00
问题 Is it possible to get IntrospectionExtensions for .NET 4.0. It is available by default in .NET 4.5, but for various reasons, I would like to use it in .NET 4.0. 回答1: Simply add the Mono source code to your project and compile it, https://github.com/mono/mono/blob/mono-4.0.2.4/mcs/class/corlib/System.Reflection/IntrospectionExtensions.cs#L40 Make sure you remove it once migrating to .NET 4.5 and above. 来源: https://stackoverflow.com/questions/22366976/system-reflection-introspectionextensions

Update view from another view

走远了吗. 提交于 2019-12-25 01:42:06
问题 I'd like to update a view from another view via events. At the moment I have no idea how to do that?. My Case: I have a calculation engine, and when I perform the calculation, I want to inform the user about the performed steps. So I open a new window with a RichTextBox control to display the desired information. When a new step is performed, I want to raise an event in order to display the text in the other window ( RichTextBox ). Is there an example which can help me to do this? 回答1:

how to add .net 3.5 to visual studio 2010?

时光怂恿深爱的人放手 提交于 2019-12-25 00:36:07
问题 I tried to installed visual studio 2010 and it installed .net 4 only. i want to add .net 3.5 to the visual studio. I have installed the 3.5 and now i'm having problem with add .net 3.5 to the new visual studio. how can i add 3.5 to vs 2010? 回答1: You don't need to "add" .NET 3.5 to VS2010. When you create a new project, you just specify which version of .NET you want to target. (You can change this later, too, in project properties.) 回答2: Try this link: http://www.microsoft.com/downloads/en

T4 - Error 60: A field initializer cannot reference the non-static field, method, or property

两盒软妹~` 提交于 2019-12-24 23:24:24
问题 I try to use the solution from Microsoft documentation. At the beginning of my .tt file I put: <#@ template language="C#" hostSpecific="True" #> <#@ output extension="cs" #> <#@ import namespace="System.IO" #> Then I try to get some variables from my previosly transformed file: <#+ string myFile = File.ReadAllText(Host.ResolvePath("AssemblyInfo1.cs")); #> In the line above I get error. If the line is commented everything is OK. Error output is: Error 60: A field initializer cannot reference

How to avoid WPF Application not Responding when logging off

安稳与你 提交于 2019-12-24 23:23:23
问题 When trying to press the standard Windows 7 logoff button while my WPF app is running, I get "This program is preventing Windows from logging off". I would like to force it to close without having to press "Force log off". Similarly, pressing "End Task" in the (applications) Task Manager causes it to become non-responsive rather than just close the program. I have tried adding this to Window_Closing, but this doesn't seem to do it: private void Window_Closing(object sender, System

SSIS Excel Source Connection. What does it use to read Excel?

雨燕双飞 提交于 2019-12-24 20:33:09
问题 Using SSIS, I Can use an OLE Connect with a Jet driver to read Excel or I can use a separate Connection type of "Excel Connection" Both seem to have issues reading files with merges cells, as I feared. I am curious what SSIS is using to connect to Excel when an "Excel Connection" is used. Other than VBA, what would you suggest for reading an Excel file that has merged cells, formulas, formatting, etc, on a server? I am using Excel 2003. Update Here's the code that I use to read the XLS: