.net-core

.NET Core 3.1 - Could not load file or assembly System.Runtime, Version=4.2.2.0

余生长醉 提交于 2021-01-21 20:36:31
问题 .NET Core 3.1 console app generates error during build - System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. But it works on .NET Core 3.0 version. I'm using Microsoft.Orleans. This is csproj - <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp3.1</TargetFramework> </PropertyGroup> <ItemGroup>

SignalR Hubs Clients are null when firing event

孤者浪人 提交于 2021-01-21 12:30:35
问题 I've written a generic hubs which I'm having some issues with so to debug it I've decided to make a simple connection count like so: public class CRUDServiceHubBase<TDTO> : Hub, ICRUDServiceHubBase<TDTO> { public const string CreateEventName = "EntityCreated"; public const string UpdateEventName = "EntityUpdated"; public const string DeleteEventName = "EntityDeleted"; protected int _connectionCount = 0; public Task Create(TDTO entityDTO) { return Clients.All.InvokeAsync(CreateEventName,

SignalR using IdentityServer bearer won't receive any JWTBearerEvents from Hub

喜你入骨 提交于 2021-01-21 10:18:45
问题 We have an api (.net core 2.2) which use IdentityServerAuthenticationDefaults.AuthenticationScheme for all the controllers which works fine. We now decide to add SignalR Hub for a conference service. The hub is working fine only if we remove the authorize attribute [Authorize(AuthenticationSchemes = IdentityServerAuthenticationDefaults.AuthenticationScheme)] We did try to handle the token in the query using the following both methods (TokenRetriever or JwrBearerEvents) : services

SignalR using IdentityServer bearer won't receive any JWTBearerEvents from Hub

人盡茶涼 提交于 2021-01-21 10:18:15
问题 We have an api (.net core 2.2) which use IdentityServerAuthenticationDefaults.AuthenticationScheme for all the controllers which works fine. We now decide to add SignalR Hub for a conference service. The hub is working fine only if we remove the authorize attribute [Authorize(AuthenticationSchemes = IdentityServerAuthenticationDefaults.AuthenticationScheme)] We did try to handle the token in the query using the following both methods (TokenRetriever or JwrBearerEvents) : services

dotnet core build in parallel or simultaneously

做~自己de王妃 提交于 2021-01-21 08:11:28
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

dotnet core build in parallel or simultaneously

让人想犯罪 __ 提交于 2021-01-21 08:07:39
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

dotnet core build in parallel or simultaneously

给你一囗甜甜゛ 提交于 2021-01-21 08:05:21
问题 In this solution I have 2 apps: AppA , AppB that share class library Shared . I have tried automating the build/running of these in parallel with both a PowerShell and node scripts (I'd be open to other solutions). I'm using both --no-dependencies and --no-restore flags, but intermittently I get: 'CSC : error CS2012: Cannot open \'C:\\Users\\User\\source\\repos\\ParallelBuild\\Shared\\obj\\Debug\\netcoreapp2.0\\Shared.dll\' for writing -- \'The process cannot access the file \'C:\\Users\\User

Nuget restore fails on Azure Devops with message “unable to load the service index for source”

狂风中的少年 提交于 2021-01-21 06:18:37
问题 I have a build for a .NET solution that is running in a private agent. The solution contains both .NET Core 2.1 and .NET Standard 2.0 projects. Some of the nuget packages installed are the following: NETStandard.Library v2.0.3 Microsoft.AspNetCore.Mvc v2.0.0 Microsoft.NETCore.App v2.1.5 The build fails when trying to restore the nuget packages with the following error: "F:\Agent01\w\141\s\xxxxxxx.sln" (Restore target) (1) -> (Restore target) -> C:\Program Files\dotnet\sdk\2.1.500\NuGet

.NET CORE MvcHtmlString(TextboxFor, LabelFor).ToString() Error

╄→гoц情女王★ 提交于 2021-01-21 05:19:48
问题 Hello i must convert MvcHtmlString to string. I was using before this code.(.net framework) TagBuilder div = new TagBuilder("div"); div.MergeAttribute("class", "form-group"); var label = helper.LabelFor(expression, new { @class = "control-label col-lg-1" }); div.InnerHtml += label.ToString(); Now I am developing .net core and I get error at div.InnerHtml += label.ToString(); Error Image Returns a string that represent the current object. Reference to type 'HtmlString' claims it is defined in

HttpClient doesn't redirect even when AllowAutoRedirect = true

可紊 提交于 2021-01-20 18:10:33
问题 I'm trying to parse a wikispaces page but I'm not able to get the actual page. I'm not sure if its a HttpClient bug or some missing configuration. This is my code: HttpClientHandler handler = new HttpClientHandler(); handler.AllowAutoRedirect = true; _httpClient = new HttpClient(handler); HttpResponseMessage response = await _httpClient .GetAsync("http://medivia.wikispaces.com/Monsters"); When i run that code I get the StatusCode 302 and get sent to https://session.wikispaces.com/1/auth/auth