.net-4.5

MSBuild 4.5 is ignoring project dependencies

ぐ巨炮叔叔 提交于 2021-02-18 05:36:27
问题 I have a VS2010 solution file with over 20 projects in it, and some of the projects have dependencies on other projects from within the solution. I also have multiple build configurations set up for different purposes, but I've trimmed down the projects to be built to just include the bare minimum number of projects. For example, I have three libraries (A, B, and C), a website project, and a website deployment project (VS2010). The website has references to libraries A and B, and B in turn

WCF - Conflicting endpoints after .Net 4.5 installation

半世苍凉 提交于 2021-02-18 03:24:28
问题 I'm recently installed the 4.5 framework on our development web server which runs IIS 7.5 on Windows Server 2008. After installation, two web services started having the same error. These web services were built using the MS REST Starter Kit. Here is the error I'm getting. A binding instance has already been associated to listen URI . If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in

WCF - Conflicting endpoints after .Net 4.5 installation

故事扮演 提交于 2021-02-18 03:21:00
问题 I'm recently installed the 4.5 framework on our development web server which runs IIS 7.5 on Windows Server 2008. After installation, two web services started having the same error. These web services were built using the MS REST Starter Kit. Here is the error I'm getting. A binding instance has already been associated to listen URI . If two endpoints want to share the same ListenUri, they must also share the same binding object instance. The two conflicting endpoints were either specified in

Aggregate and ToArray function in System.Array not working

≡放荡痞女 提交于 2021-02-17 05:24:09
问题 I have this two errors: 'System.Array' does not contain a definition for 'Aggregate' and no extension method 'Aggregate' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?) 'System.Collections.Generic.IEnumerable<object[]>' does not contain a definition for 'ToArray' and no extension method 'ToArray' accepting a first argument of type 'System.Collections.Generic.IEnumerable<object[]>' could be found (are you missing a

How to draw control while is moved in a Drag-and-drop event

时间秒杀一切 提交于 2021-02-11 10:02:30
问题 In Vb.net, through Drag and Drop events, a control (button) is moved from a Panel to another Panel. Is there any way or option to draw the control (button) while is being moved by cursor? Now I have only reached to change cursor shape, and when the action of Drag and Drop is finished, the control is drawn in its new panel parent. Thanks in advance. Edit: Added code public Sub New() InitializeComponent() '…. Panel1.AllowDrop = True Panel2.AllowDrop = True AddHandler Panel1.DragEnter, AddressOf

Task.ContinueWith fires before task is finished

浪尽此生 提交于 2021-02-08 21:49:12
问题 I'm trying to start a task after I register a continuation for it. But continuation fires immediately after await Task.Delay() is called. using System; using System.Linq; using System.Threading.Tasks; namespace ConsoleApplication30 { class Program { static void Main(string[] args) { var task = new Task(async delegate { Console.WriteLine("Before delay"); await Task.Delay(1000); Console.WriteLine("After delay"); }); task.ContinueWith(t => { Console.WriteLine("ContinueWith"); }); task.Start();

The maximum size of object that can be passed as Parameter to POST method

◇◆丶佛笑我妖孽 提交于 2021-02-08 14:38:12
问题 I have a web API controller with a POST method as follows. public class MyController : ApiController { // POST: api/Scoring public HttpResponseMessage Post([FromBody]MyClass request) { // some processing of request object return Request.CreateResponse(HttpStatusCode.OK, someResponseObject); } .... } This is consumed by a HTTPClient as follows HttpClient httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

ListBox SelectedValueChanged/SelectedIndexChanged not firing when data source changes

微笑、不失礼 提交于 2021-02-07 14:28:29
问题 I need to keep track of the selected item on a ListBox to update/disable other controls according to the currently selected value. This is the code to reproduce the issue: public partial class Form1 : Form { private readonly BindingList<string> List = new BindingList<string>(); public Form1() { InitializeComponent(); listBox1.DataSource = List; listBox1.SelectedValueChanged += (s, e) => System.Diagnostics.Debug.WriteLine("VALUE"); listBox1.SelectedIndexChanged += (s, e) => System.Diagnostics

.net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-07 06:50:14
问题 .net 4.6 framework is inplace upgrade then how is the .net framework 4.5 works in vs2015? I see only one folder v4.0.30319 . How is the dll stored and where ? 回答1: Update : Note that Reference Assemblies only contain metadata and NOT any code at all. Thanks @vcsjones for pointing this out below! You can find a "Reference Assemblies" folder on your system in which the exact binaries for each framework version are kept: Visual Studio then uses those depending on which version you are targeting.

Switch-Case on Class.PropertyName (not value)

孤街浪徒 提交于 2021-02-06 09:25:02
问题 I have a class which implements INotifyPropertyChanged like this: public class Person : INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged; string _color; public string Color { get{ return _color; } set { _color = value; RaisePropertyChanged(); } } ... private void RaisePropertyChanged([CallerMemberName]string prop = "") { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(prop)); } } When the Color property setter is called, it