.net-4.6

Expressions breaking code when compiled using VS2015 Update 1

余生长醉 提交于 2020-01-01 03:58:07
问题 After installing Visual Studio 2015 Update 1 on my machine I saw that some of my unit tests failed. After doing some investigation I was able to reduce the problem to this line of code: Expression<Func<GameObject, bool>> expression = t => t.X == 0 && t.Y == 0 && t.GameObjectType == GameObjectType.WindMill; When hovering over the expression variable the results were different in the versions of Visual Studio: VS 2015: VS 2015 Update 1: The logic that was doing the comparison for the enums

Mixed WPF and winforms project DPI awareness

空扰寡人 提交于 2019-12-29 07:44:23
问题 I have a C# program that uses both winforms and WPF and I'm struggling to get it to work in high DPI environments. Currently, if I remove all WPF projects from the solution and run it, it will scale fine, however as soon as I add any wpf back in (necessary for the functionality) the scaling fails and the UI becomes unusable. This seems like the exact same issue as previous SO questions: DPI Scaling in .Net 3.5 in Mixed WinForms and WPF Application and Problems getting WinForms to scale

.NET 4.6 - monodevelop on linux

回眸只為那壹抹淺笑 提交于 2019-12-23 12:56:34
问题 I have mono installed from beta channel (http://www.mono-project.com/docs/getting-started/install/linux/) - version 4.0.4 I can't compile Visual Studio 2015 project. In project options under Build->General the Target framework is .NETFramework 4.6 (Not installed). Compilation errors: Project settings: 回答1: You will have to downgrade to .NET 4.5 profile if you do want to target both .NET and Mono, or you help Mono out by filling the gaps between 4.5 and 4.6, or you simply wait till someone

Cannot set app to use system default TLS version by adding appcontext settings in web.config

不问归期 提交于 2019-12-20 01:43:14
问题 According to .net guidance of TLS protocol programming, it suggests to config security via appcontext switch when your project targets on .net 4.6. This way works when add appcontext in app.config for console application. However, it doesn't work when add appconext switch in web.config for website project. This is the config I add. <runtime> <AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false;Switch.System.Net.DontEnableSystemDefaultTlsVersions=false"/> <

Visual Studio 2015, Microsoft Fakes and System.Security.Claims.Claim

北城余情 提交于 2019-12-20 01:38:11
问题 I have an interface in a .NET 4.5 (not 4.6) class library, public interface IBrokenFakeInterface { Claim WhyWontItGenerateFakeOfThisInterface(); } In my unit test project (MSTest) when I have added the Fakes for the appropriate assembly containing this interface, I get compiler warning that says it cannot generate the stub. Warning: Cannot generate stub for ClassLibrary1.IBrokenFakeInterface: method System.Security.Claims.Claim ClassLibrary1.IBrokenFakeInterface

DateTimePicker garbled after Windows 10 Creators Update

断了今生、忘了曾经 提交于 2019-12-18 04:11:43
问题 Application built with VS 2015, C#, Winforms, using the DateTimePicker Windows control, text is garbled after updating machines to the Windows Creators Update. Has anyone else come across this or is there any suggested work around ? 回答1: The June cumulative update for Windows 10 (KB 4022725) includes an updated COMCTL32.DLL that contains a fix for this issue. The file version should be 5.82.15063.413 after the update is installed. https://social.msdn.microsoft.com/Forums/en-US/4cf03067-46c4

GC behavior when pinning an object

最后都变了- 提交于 2019-12-17 22:19:33
问题 While browsing through the code of PinnableObjectCache from mscorlib , I've encountered the following code: for (int i = 0; i < m_restockSize; i++) { // Make a new buffer. object newBuffer = m_factory(); // Create space between the objects. We do this because otherwise it forms // a single plug (group of objects) and the GC pins the entire plug making // them NOT move to Gen1 and Gen2. By putting space between them // we ensure that object get a chance to move independently (even if some are

How to build .NET 4.6 Framework app without Visual Studio installed?

前提是你 提交于 2019-12-17 15:15:23
问题 Until now, I could build .NET 4.5.2 using command line c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild MySolution.sln The only what I need to install on a computer was .NET Framework and Visual Studio 2010 shell. Now I consider upgrading to .NET 4.6., but I cannot find a way how to build a solution without Visual Studio. I don't want to install Visual Studio 2015, because it is too big for this hosted virtual machine. I hope some MSBuild or Microsoft package installation could be

Garbage Collection and Parallel.ForEach Issue After VS2015 Upgrade

喜欢而已 提交于 2019-12-17 10:52:12
问题 I have some code to process several million data rows in my own R-like C# DataFrame class. There's a number of Parallel.ForEach calls for iterating over the data rows in parallel. This code has been running for over a year using VS2013 and .NET 4.5 without issues. I have two dev machines (A and B) and recently upgraded machine A to VS2015. I started noticing a strange intermittent freeze in my code about half the time. Letting it run for a long time, it turns out that the code does eventually

ASP.NET 5 web application as Azure Web Role?

被刻印的时光 ゝ 提交于 2019-12-14 04:27:04
问题 We have a ASP.NET 5 web application in our solution. Typically, we could right click on the Cloud Service "Roles" item and add a new role from an existing project in the solution. But it cannot identity this project as a Web Role: How are we able to host a ASP.NET 5 project in a Azure Web Role? Edit: We are using Azure SDK 2.7 回答1: Sorry, we don't support WebRoles at the moment. You might* be able to hack your way around but officially there is no support. That means that any hack you do,