.net-core-3.1

Set up CI with Travis for .NET Core

为君一笑 提交于 2021-02-11 17:11:49
问题 I'm trying to set up a CI for my .NET Core 3.1 class library. I created an account at https://travis-ci.org/github and selected my repository containing the code for my class library for a CI build. Travis is successfully watching my master branch for commits, but I cannot get the CI build to succeed. My repository: https://github.com/MintPlayer/MintPlayer.AspNetCore.SitemapXml Target framework: .NET Core 3.1 My latest .travis.yml file: language: csharp mono: none dotnet: 3.1.302 script: -

I'm getting the error “Microsoft.AspNetCore.Hosting.Abstractions, Version=3.1.0.0” in .NET Core 3.1 app

痞子三分冷 提交于 2021-02-11 14:46:19
问题 The latest version of "Microsoft.AspNetCore.Hosting.Abstractions" is 2.2.0, so I'm not sure where it's getting 3.1.0.0. I've gone through all of my .csproj files, and all of them are referencing 2.2.0. I'm not sure where else to look. I have 3 different applications (solutions) that share projects, and this is happening on all of them at different times. One of them works if I publish it from VS, but I'd like to try to get them deployed using Azure DevOps release pipeline. 回答1: The Nuget

iTextSharp 5.5.13.1 no data is available for encoding 10000 when extracting text from PDF

心已入冬 提交于 2021-02-10 15:00:52
问题 I'm trying to extract text from a multipage PDF document and almost all documents extract fine, but a couple of documents blow up with the encoding 10000 error. The only unique thing about the document pages that don't work is that they have a button and form fields on them. { var pageNumbersToSave = new List<int>(); for (var i = 1; i <= r.NumberOfPages; i++) { try { var s = PdfTextExtractor.GetTextFromPage( r, i, new SimpleTextExtractionStrategy() ); I also tried using a PDFStamper to

iTextSharp 5.5.13.1 no data is available for encoding 10000 when extracting text from PDF

南笙酒味 提交于 2021-02-10 14:59:52
问题 I'm trying to extract text from a multipage PDF document and almost all documents extract fine, but a couple of documents blow up with the encoding 10000 error. The only unique thing about the document pages that don't work is that they have a button and form fields on them. { var pageNumbersToSave = new List<int>(); for (var i = 1; i <= r.NumberOfPages; i++) { try { var s = PdfTextExtractor.GetTextFromPage( r, i, new SimpleTextExtractionStrategy() ); I also tried using a PDFStamper to

iTextSharp 5.5.13.1 no data is available for encoding 10000 when extracting text from PDF

我是研究僧i 提交于 2021-02-10 14:57:39
问题 I'm trying to extract text from a multipage PDF document and almost all documents extract fine, but a couple of documents blow up with the encoding 10000 error. The only unique thing about the document pages that don't work is that they have a button and form fields on them. { var pageNumbersToSave = new List<int>(); for (var i = 1; i <= r.NumberOfPages; i++) { try { var s = PdfTextExtractor.GetTextFromPage( r, i, new SimpleTextExtractionStrategy() ); I also tried using a PDFStamper to

How to acccept date in dd-MM-yyyy format in net core web api?

心不动则不痛 提交于 2021-02-07 20:13:46
问题 I am using net core 3.1 in my web API project. I have created one API which accepts the date from the user. By default MM-dd-yyyy format is accepted in the project. But I want to accept the date in dd-MM-yyyy format and validate all dates accordingly. Below is my api : [HttpGet] public async Task<IActionResult> Get(DateTime fromDate, DateTime toDate) { return Ok(); } Also, I have APIs in which the date parameter is passed in the request body as JSON. I have tried following StackOverflow

Have a NuGet package output a file

不想你离开。 提交于 2021-02-07 10:36:33
问题 I have a Visual Studio project that I have made into a NuGet package. The project has a file in it (called SwaggerIndex.html ). I have set that file to have the "Copy to Output Directory" property to "Copy if newer". (I need this file to copy to the build folder on build.) In that solution it works just fine. (I created another project to test it, and when it references my project that has the SwaggerIndex.html , it outputs it to the build folder just fine.) However, when I package it into a

How to I make a cURL command call from .Net Core 3.1 Code

爱⌒轻易说出口 提交于 2021-01-29 14:44:07
问题 I have this complicated cURL command that is working perfectly : curl -L --negotiate -u : -b ~/cookiejar.txt "https://idp.domain.net/oauth2/authorize? scope=openid&response_type=code&redirect_uri=https://localhost:5001&client_id=client_id_here" However it is not really feasible to replicate in C# using HttpClient. But I need to call the cURL command from .Net Core code and get the response back. Is there a way to make a normal cURL command call in .Net Core (v3.1)? (In case you are interested

Certificate issue in Kestrel ssl JSON configuration using .net Core 3.1

Deadly 提交于 2021-01-28 11:45:54
问题 I have seen this question answered but it doesn't seem to be working for .net core 3.1 This code finds the Certificate: using (var store = new X509Store("Root", StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCerts = certCollection.Find(X509FindType.FindBySubjectName, "*.timedesk.com", false); if (currentCerts.Count == 0) throw new Exception("Https certificate is not found."); } This appsettings.json does not find the

Certificate issue in Kestrel ssl JSON configuration using .net Core 3.1

微笑、不失礼 提交于 2021-01-28 11:39:50
问题 I have seen this question answered but it doesn't seem to be working for .net core 3.1 This code finds the Certificate: using (var store = new X509Store("Root", StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCerts = certCollection.Find(X509FindType.FindBySubjectName, "*.timedesk.com", false); if (currentCerts.Count == 0) throw new Exception("Https certificate is not found."); } This appsettings.json does not find the