.net-standard

Html to Pdf library in Azure Function

[亡魂溺海] 提交于 2019-12-06 11:38:56
Azure functions apparently doesn't yet support System.Drawing ( sanbox info ). Running a function with a dependency on it throws the following message: System.Drawing is not supported on this platform. I was originally using Select.HtmlToPdf in a WebApp to create PDF documents from HTML. But, since moving the PDF generation to an Azure function, that is no longer an option. Also, the reccomended library is wkhtmltopdf , but that doesn't seem to have a .netstandard2.0 version. How would you accomplish PDF generation using Azure Functions (C#)? Update: the function is running on an S1 - App

How to convert UWP StorageFile to .NET FileInfo?

喜欢而已 提交于 2019-12-06 09:40:31
问题 Now that UWP supports .NET Standard 2.0, it has access to more of the System.IO namespace, including Fileinfo and DirectoryInfo. How does one convert an UWP StorageFile to a Fileinfo? And a StorageFolder to a DirectoryInfo for that matter? The naïve approach (get the StorageItem's full path and construct a Fileinfo using it) fails when trying to open the resulting Fileinfo, and I'd really like to get away from using PCLStorage if possible. 回答1: System.IO.File and System.IO.FileInfo have long

How to Configure Network Tracing Dotnet core for HttpClient calls?

落爺英雄遲暮 提交于 2019-12-06 05:22:48
As per reference document at https://docs.microsoft.com/en-us/dotnet/framework/network-programming/how-to-configure-network-tracing We can setup this in web.config or any other configuration file and we get detailed system.net traces, packets traces for HttpClient calls and any kind of issue in HttpClient calls can be captured in traces, be it certificate, TLS or anything else. However, do we have similar implementation for dotnet core / standard which can be used in both web app or console app/ libraries ? Configuration for dotnet framwork : <configuration> <system.diagnostics> <sources>

Debugging - Referencing .NET standard 1.4 libraries in Xamarin.Forms Android application (VS 2017)

♀尐吖头ヾ 提交于 2019-12-06 03:43:35
I use VS 2017. I have Xamarin.Forms Android project and I have to reference bunch of .NetStandard 1.4 libraries there. I have all projects in one solution. I basically added references and compiled solution with no problem. When I call from Xamarin method contained in .Net Standard library, it returns result but no breakpoint is hit inside that method. Also VS 2017 intellisense is not working for methods contained in .NetStandard libraries. Do I have to do something extra to enable debugging and intellisense in .Net Standard library when it's called from Xamarin.Forms Android application ? I

When using .Net Standard 1.4 in a library and .Net framework 4.6.1 in and application, unable to load file System.IO.FileSystem, Version=4.0.1.0

老子叫甜甜 提交于 2019-12-06 02:30:16
问题 I have a solution that contains a library and 2 applications. The applications represent the same program, with one built to target the Windows App Store through UAP10 and the other built to target a Microsoft Windows PC using .Net Framework 4.6.1. I'm using Visual Studio 2017. I set the library project target .Net standard 1.4. I set the UWP application to target Windows 10 Aniversary Edition (10.0; Build 14393), Min version Windows 10 (10.0; Build 10586). I set the generic Windows

A solution needed for referencing Nuget packages from projects in the same solution

人盡茶涼 提交于 2019-12-06 01:06:50
I have a single solution full of projects that are to be shared amongst my organization as general nuget packages. The solution is encompassed by one git repository and we have TeamCity running our builds for us, although we are not overly advanced in that we manually kick off the Teamcity builds when we are ready to generate/publish a new Nuget package for a given project in the solution, every project has its own TeamCity build configuration. When built, the projects generate nuget packages via the .csproj <project/> tag: GeneratePackageOnBuild we also control the versioning via version tags

Error for .NETStandard1.6 PCL: “Your project is not referencing the ”.NETPlatform,Version=v5.0“ framework”

巧了我就是萌 提交于 2019-12-05 11:48:12
To help reproduce the problem, the following steps are taken to create a .NETStandard1.6 PCL in Visual Studio 2015: Create a new Class Library(Portable for iOS, Android and Windows). In its Properties page, click "Target .NET Platform Standard". Change .NETStandard form .NETStandard1.1 to .NETStandard1.6 Build this empty project. The following error occurs: >C:\Program Files (x86)\MSBuild\Microsoft\NuGet\Microsoft.NuGet.targets(140,5): error : Your project is not referencing the ".NETPlatform,Version=v5.0" framework. Add a reference to ".NETPlatform,Version=v5.0" in the "frameworks" section of

Could not load file or assembly 'System.ComponentModel.Annotations' in published .Net 4.6.1 project referencing .Net Standard library

最后都变了- 提交于 2019-12-05 11:43:28
PLEASE NOTE : This is not a duplicate of Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.1.0.0 . Unlike the issue linked, this issue occurs only after publishing the application. As you will see below, I have tried every solution proposed in that post with no success. This issue occurs in a WPF .Net Framework 4.6.1 project which references a .Net Standard 2.0 library which itself references the System.ComponentModel.Annotations NuGet package. The issue is reproduced in the following project: https://github.com/kaitlynbrown/DataAnnotationsError To reproduce the

Missing .NET Standard 2.0 Framework with latest .NET Core SDK 2.2.1, .NET Framework 4.7.2, VS2017 15.9.3

时光总嘲笑我的痴心妄想 提交于 2019-12-05 10:24:41
EDIT FIX - Reinstalling VS did not work, reinstalling windows then VS did the trick... we live in 2019 almost and this shit is required to get vs to work properly? I created a .NET Standard Class library which it seems to point to 1.6, when i go to change it to 2.0, I dont see it in the list (see attached image) Also attached is latest info from my machine and versions, I have installed both the .NET Core 2.2.1 x64/x86 SDKs and I have the .NET Full Framework 4.7.2 EDIT 1: how vs was installed I had the very same problem, even went as far as reporting it to Microsoft. It only happens with a

How to get memory available or used in C# .net core / .net standard

元气小坏坏 提交于 2019-12-05 10:22:01
Is there a way to know the current used memory in the current process? I checked many questions: How to get the amount of memory used by an application How to get memory available or used in C# They are not available in .Net Standard 1.6. Krzysztof Branicki Here you can check how it is done in HealthChecks project . You can use Process class from System.Diagnostics namespace. * EDIT * System.Diagnostics.Process Nuget package might need to be added. Only xxxx64 memory properties are supported in .NET Standard (for example PrivateMemorySize64 and not PrivateMemorySize). 来源: https://stackoverflow