Questions

Using 2 different versions of the same dll?

I have been given 2 pre-compiled dlls: ``` Common.Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f3b12eb6de839f43, processorArchitecture=MSIL Common.Data, Version=2.0.0.0, Culture=neutral, P...

23 May at 12:32

Embedding C# sources in PDB with new csproj

The recently-released .NET tooling seem to have support for [embedding C# in PDBs](https://github.com/dotnet/roslyn/pull/12353), which should improve the experience of stepping into third-party, etc. ...

10 Mar at 09:7

Ignore bad certificate - .NET CORE

I'm writing a .NET Core app to poll a remote server and transfer data as it appears. This is working perfectly in PHP because the PHP is ignoring the certificate (which is also a problem in browsers) ...

2 Sep at 16:0

ASP.NET Core: Exclude or include files on publish

There were before `aspdotnet1.0` include/exclude sections on `project.json` file ``` { "exclude": [ "node_modules", "bower_components" ], "publishExclude": [ "**.xproj", "**.use...

Autogenerated IntermediateOutputPath in the .csproj file

After updating the code from Git I have an error in the `csproj`, because the `file` path doesn't exist. Here is the code which initiates the error: ``` <PropertyGroup Condition="'$(Configuration)|$(...

21 Jun at 23:23

Can I use regex expression in c# with switch case?

Can I write switch case in c# like this? ``` switch (string) case [a..z]+ // do something case [A..Z]+ // do something .... ```

11 Oct at 03:51

NuGet Package for Tuples in C#7 causes an error in my views

I am trying to use the new tuple features in C# 7 in an ASP.NET MVC 5 app, using .NET version 4.6.1. and Visual Studio 2017 RC. To do so I referenced this article here: [What's new in C# 7](https://bl...

23 May at 12:10

How to properly use Code Contracts in .NET Core

I wonder, how to properly use Code Contracts in , so far I tried to add CC to my project, compile and debug. I'm confused by message, which is appearing in each call which uses `Contract.Requires`, an...

13 Oct at 14:12

Detect API level incompatibilities in Xamarin Android App (Visual Studio 2015) at compile time instead of runtime

I am writing a Xamarin Android app using Visual Studio 2015 (Windows). I want to target the latest Android API, while maintaining backwards compatibility to API 16 (4.1 Jelly Bean). I know how to ens...

23 May at 12:9

How can I install the VS2017 version of msbuild on a build server without installing the IDE?

Historically, this has been done with the [Microsoft Build Tools](https://www.microsoft.com/en-us/download/details.aspx?id=48159). But it seems that [the Build Tools may not be available for versions ...

laravel updateOrCreate method

I have the following code in my method which I am sending via ajax to the controller method : ``` $newUser = \App\UserInfo::updateOrCreate([ 'user_id' => Auth::user()->id, 'about' ...

13 Nov at 08:50

Unsafe.As from byte array to ulong array

I'm currently looking at porting my [metro hash implementon](https://www.nuget.org/packages/MetroHash/) to use C#7 features, as several parts might profit from ref locals to improve performance. The h...

7 Jun at 06:18

How do I debug .NET 4.6 framework source code in Visual Studio 2017?

Here's what I've tried: Made a new Console App (.NET Framework) in Visual Studio 2017. Added the following code: ``` static void Main(string[] args) { new Dictionary<int, int>().TryGetValue(3, ...

C#7 tuple & async

Old format: ``` private async Task<Tuple<SomeArray[], AnotherArray[], decimal>> GetInvoiceDetailAsync(InvoiceHead invoiceHead) { ... } ``` How can you do that in C#7 with new tuples form...

9 Mar at 10:42

Visual Studio 2017 error: Unable to start program, An operation is not legal in the current state

After fresh installation of Visual Studio 2017 I tried to run .NET Core Web project and when trying to run it on Chrome I am getting this error: > Unable to start program, An operation is not legal i...

Why does ?: cause a conversion error while if-else does not?

Making some changes in the code I use the next line: ``` uint a = b == c ? 0 : 1; ``` Visual Studio shows me this error: > Cannot implicitly convert type 'int' to 'uint'. An explicit conversion ...

10 Mar at 00:58

View POST request body in Application Insights

Is it possible to view POST request body in Application Insights? I can see request details, but not the payload being posted in application insights. Do I have to track this with some coding? I am ...

Can't build create-react-app project with custom PUBLIC_URL

I'm trying ``` PUBLIC_URL=http://example.com npm run build ``` with a project built using the latest create-react-script. However, the occurrences of `%PUBLIC_URL%` in `public/index.html` are rep...

23 Oct at 20:21

How to call an async task inside a timer?

I figured out how to use a repeat a normal method with a timer, and it worked fine. But now I have to use some async methods inside of this method, so I had to make it a Task instead of a normal metho...

9 Mar at 02:33

Node.js ES6 classes with require

So up until now, i have created classes and modules in `node.js` the following way: ``` var fs = require('fs'); var animalModule = (function () { /** * Constructor initialize object * ...

8 Mar at 23:54

C++ cannot open source file

In C++ with Visual studio 2017, I copied some header files into my project folder, then added them under the "solution explorer" in c++. Now when I write ``` #include "name.h" ``` it prints an e...

8 Mar at 19:0

Vue.js computed property not updating

I'm using a Vue.js computed property but am running into an issue: The computed method being called at the correct times, but the value returned by the computed method is being ignored! My method `...

AutoQuery insight needed

So, I'm working with ServiceStack and love what it offers. We've come to a point where I'm needing to implement a queryable data API... prior to my coming to this project, a half backed OData impleme...

Python - Turn all items in a Dataframe to strings

I followed the following procedure: [In Python, how do I convert all of the items in a list to floats?](https://stackoverflow.com/questions/1614236/in-python-how-do-i-convert-all-of-the-items-in-a-lis...

23 May at 11:46

AWS V4 Signing of .NET HttpClient

I need to call an AWS Gateway API service that is secured with AWS_IAM. I want to use `HttpClient` as this is the recommended way by Microsoft. I have found some example code using other ways. I've ...