After updating to vs2017.3, the breakpoints will not be hit
We have an asp.net core 2.0 project (migrated from 1.x) running on Vs2017.3 (updated from 2017.2). After the update, breakpoints stop being hit. Vs reports that "The breakpoint will not currently be ...
- Modified
- 19 Aug at 08:48
CustomAuthorizationPolicy.Evaluate() method never fires in wcf webhttpbinding
I create a wcf service as you can see : ``` [OperationContract] [PrincipalPermission(SecurityAction.Demand, Role = "Admin")] [WebInvoke(Method = "GET", UriTemplate = "/Data/{data}")] string GetData(...
- Modified
- 21 Aug at 12:20
FormattedText.FormttedText is obsolete. Use the PixelsPerDip override
I am trying to populate labels to a horizontal slider and I was successfully able to do it using a class that derives from `TickBar` by passing the Text to FormattedText constructor. But now when I ta...
- Modified
- 5 Jun at 14:51
Change "Override high DPI scaling behavior" in c#
We have a control inside a WinForm (CefSharp control) that suffers from graphical artifacts when a users screen is set to 125% on windows. Its not just the control, stand alone Chrome does it to an e...
Is there a XAML equivalent to nameof?
I'm working with DevExpress's WPF tree list view and I came across what I think is a more general problem relating to renaming properties on the objects used as an item source. In the tree list view o...
- Modified
- 18 Aug at 14:59
Convert Microsoft.AspNetCore.Http.HttpRequest to HttpRequestMessage
I need to convert from an AspNetCore context to an to pass to an HttpClient. Is there a simple way of achieve this? Or any hint to implement this would be very helpful. I want to convert the reque...
- Modified
- 21 Aug at 14:14
How to insert a record into a table with a foreign key using Entity Framework in ASP.NET MVC
I'm new to Entity Framework code-first. This is my learning in ASP.NET MVC, using code-first for database creation. I have two classes: ``` public class Student { public int StudentId { get; set...
- Modified
- 18 Aug at 15:51
how to change jest mock function return value in each test?
I have a mock module like this in my component test file ``` jest.mock('../../../magic/index', () => ({ navigationEnabled: () => true, guidanceEnabled: () => true })); ``` these functions...
- Modified
- 18 Aug at 14:51
Use custom validation responses with fluent validation
Hello I am trying to get custom validation response for my webApi using .NET Core. Here I want to have response model like ``` [{ ErrorCode: ErrorField: ErrorMsg: }] ``` I have a validator ...
- Modified
- 18 Aug at 13:37
Create instance using ctor injection and ServiceProvider
I know there is `IServiceCollection` interface where I can register my services and `IServiceProvider` which can instantiate the services. How do I instantiate a class, based on specified Type, which...
- Modified
- 21 Aug at 01:27
How to use MemoryCache in C# Core Console app?
I would like to use the Microsoft.Extensions.Caching.Memory.MemoryCache in a .NET Core 2.0 console app (Actually, in a library that is either used in a console or in a asp.net app) I've created a tes...
- Modified
- 18 Aug at 08:22
Argument order for '==' with Nullable<T>
The following two `C#` functions differ only in swapping the left/right order of arguments to the operator, `==`. (The type of `IsInitialized` is `bool`). Using and . ``` static void A(ISupportIniti...
- Modified
- 14 Dec at 20:24
Pandas how to use pd.cut()
Here is the snippet: ``` test = pd.DataFrame({'days': [0,31,45]}) test['range'] = pd.cut(test.days, [0,30,60]) ``` Output: ``` days range 0 0 NaN 1 31 (30, 60] 2 45 (30, 6...
Getting IConfiguration from ServiceCollection
I´m writing my own extension method for `ServiceCollection` to registered the types of my module and I need to access the `IConfiguration` instance from the collection to register my Options. ``` ...
- Modified
- 18 Aug at 08:11
How to downgrade tensorflow, multiple versions possible?
I have tensorflow 1.2.1 installed, and I need to downgrade it to version 1.1 to run a specific tutorial. What is the safe way to do it? I am using windows 10, python 3.5. Tensorflow was installed with...
- Modified
- 18 Aug at 06:35
Disable Property of Azure Functions not working in Visual Studio 2017
I have Azure function with timer trigger. ``` public static void Run([TimerTrigger("0 */15 * * * *"), Disable("True")]TimerInfo myTimer, TraceWriter log) ``` Here the `Disable("true")` is not worki...
- Modified
- 18 Aug at 06:1
Http Request in TypeScript
I was trying to convert the following snippet in nodejs to typescript: [How do I make Http Request in Nodejs](https://docs.nodejitsu.com/articles/HTTP/clients/how-to-create-a-HTTP-request/) Here is m...
- Modified
- 18 Aug at 04:15
Flutter: Trying to bottom-center an item in a Column, but it keeps left-aligning
I'm trying to bottom-center a widget at the bottom of a Column, but it keeps aligning to the left. ``` return new Column( new Stack( new Positioned( bottom: 0.0, new Center( ...
- Modified
- 1 Jul at 09:20
How do I stretch an image to fit the whole background (100% height x 100% width) in Flutter?
I have an image that doesn't match the aspect ratio of my device's screen. I want to stretch the image so that it fully fills the screen, and I don't want to crop any part of the image. CSS has the c...
- Modified
- 23 Jul at 15:48
Detecting .net core 2.0
In a dotnet core 2.0 console application, the output of: ``` Console.WriteLine("Hello World from "+ System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription); ``` Is a rather unexpect...
- Modified
- 17 Aug at 21:20
How to have the semicolon character in a password for a SQL connection string?
My connection string: ``` con = new SqlConnection("Server=localhost;Database=mainDB;User Id=sqluser;Password=Y;9r.5JQ6cwy@)V_"); ``` That semicolon in the password causes an exception. How do I wri...
- Modified
- 17 Aug at 18:5
Could not load type 'Microsoft.Build.Framework.SdkReference' on project open in VS 2017 U1 (15.3)
After doing an (apparently successful) upgrade from VS 2017 15.1 to 15.3, I can no longer load any C# project (can't open existing, can't create new). All fail with this error: > Could not load type '...
- Modified
- 5 May at 15:51
How do I customize Visual Studio's private field generation shortcut for constructors?
VS 2017 (and maybe olders versions) gives me this handy little constructor shortcut to generate a `private readonly` field and assign it. Screenshot: [](https://i.stack.imgur.com/L3Ec9.png) This en...
- Modified
- 17 Aug at 13:36
Local user account store for Web API in ASP.NET Core 2.0
I'm using ASP.Net Core 2.0, I want to build a Web API project with Individual User Accounts Authorization type, but the only option is `Connect to an existing user store in the cloud`. [](https://i.st...
- Modified
- 6 Feb at 05:31