.net-4.5

Visual Studio 11 metro apps unable to add reference?

梦想的初衷 提交于 2020-01-15 11:11:28
问题 I have installed Windows 8 and Visual Studio 11 to develop metro style apps. But each time i try to create Metro app project the projects get created but in reference there is nothing added but the project builds successfully and even its not allowing me to add any reference dll. 回答1: What are you adding a reference to? Metro style apps can only add references to other Metro style class libraries or portable class libraries. 回答2: Metro style applications targets .NETCore framework if

Visual Studio 11 metro apps unable to add reference?

风流意气都作罢 提交于 2020-01-15 11:11:03
问题 I have installed Windows 8 and Visual Studio 11 to develop metro style apps. But each time i try to create Metro app project the projects get created but in reference there is nothing added but the project builds successfully and even its not allowing me to add any reference dll. 回答1: What are you adding a reference to? Metro style apps can only add references to other Metro style class libraries or portable class libraries. 回答2: Metro style applications targets .NETCore framework if

Application exiting with an exit code of -1073740771

家住魔仙堡 提交于 2020-01-13 10:10:32
问题 I have a WPF application, which sometimes is exiting with an exit code of -1073740771. The issue is not occurring in any pattern and it's varying from system to system. In some system the issue is occurring for less that 10% of the total cases and in other system I am seeing it occurring at a rate of almost 30% of the total cases. I haven't been able to form any solid repro steps and it seems to be happening at random. The symptoms include that after I have clicked the close button, the

Build error when using VS 11, .NET 4.5 and Entity Framework

佐手、 提交于 2020-01-13 09:16:49
问题 In Visual Studio 2010, my solution was using .NET 4.2 (Entity Framework June 2011 CTP) so I could use spatial types in Entity Framework. When I upgraded to Visual Studio 11 Beta, it wouldn't build because of conflicts between the 4.2 and 4.5 framework so I uninstalled 4.2. Now I get this error when I build: Error 209: Currently, spatial types are only supported when used in CSDL files that have the UseStrongSpatialTypes annotation with a false value on their root Schema element. Anyone know

Throw and preserve stack trace not as expected as described by Code Analysis

杀马特。学长 韩版系。学妹 提交于 2020-01-13 08:39:49
问题 Doing a code analysis gave me item CA2200: CA2200 Rethrow to preserve stack details 'func()' rethrows a caught exception and specifies it explicitly as an argument. Use 'throw' without an argument instead, in order to preserve the stack location where the exception was initially raised. I have implemented the suggestion, but I seem to get the same stack trace regardless. Here is my test code and output (the white space is intended to give obvious line numbers): Expected error at Line 30 using

Using string interpolation and nameof in .VS 2015 NET 4.5

南楼画角 提交于 2020-01-12 18:46:29
问题 I'm using things like $"hello {person}" and nameof(arg1) in my code, but on checking the project properties I'm targeting .NET 4.5. Is this okay? I thought these things were introduced in 4.6. The project builds and runs okay on my machine - but I'm worried something will go wrong when I deploy it. 回答1: It's a compiler feature, not a framework feature. We successfully use both features with our .NET 3.5 projects in Visual Studio 2015. In a nutshell, the compiler translates $"hello {person}"

Using string interpolation and nameof in .VS 2015 NET 4.5

南楼画角 提交于 2020-01-12 18:46:20
问题 I'm using things like $"hello {person}" and nameof(arg1) in my code, but on checking the project properties I'm targeting .NET 4.5. Is this okay? I thought these things were introduced in 4.6. The project builds and runs okay on my machine - but I'm worried something will go wrong when I deploy it. 回答1: It's a compiler feature, not a framework feature. We successfully use both features with our .NET 3.5 projects in Visual Studio 2015. In a nutshell, the compiler translates $"hello {person}"

Using string interpolation and nameof in .VS 2015 NET 4.5

会有一股神秘感。 提交于 2020-01-12 18:46:19
问题 I'm using things like $"hello {person}" and nameof(arg1) in my code, but on checking the project properties I'm targeting .NET 4.5. Is this okay? I thought these things were introduced in 4.6. The project builds and runs okay on my machine - but I'm worried something will go wrong when I deploy it. 回答1: It's a compiler feature, not a framework feature. We successfully use both features with our .NET 3.5 projects in Visual Studio 2015. In a nutshell, the compiler translates $"hello {person}"

How do I read a binary file in a Windows Store app?

允我心安 提交于 2020-01-11 09:08:09
问题 How can I read a binary file in a Windows Store app, or more specifically how can I create my Stream, when the System.IO namespace contains no File class? The documentation examples for BinaryReader unhelpfully use File! 回答1: You always access files in Windows Store apps using StorageFile class: StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync(filename); You can then get the binary contents of the file using the WinRT APIs: IBuffer buffer = await FileIO

MVC4 + async/await + return response before action completes

℡╲_俬逩灬. 提交于 2020-01-10 07:45:08
问题 In my MVC4 app I need to add a controller for uploading and processing large files. Immediately after the file is uploaded I need to start async processing of that file and return response to the browser without waiting for the processing to complete. Obviously I could start a new thread for processing the file manually, but I'm wondering if I can implement this scenario using async/await mechanism introduced with .net 4.5 To test the concept I've tried something like this: public async Task