.net-4.6.2

“Could not load file or assembly” error when net462 app references a netstandard1.5 library. But why?

陌路散爱 提交于 2019-12-06 13:58:26
I am trying to figure out what I could be doing wrong in this sample project. I am getting an error when my net462 application references a netstandard1.5 library. The application has a dependency on "System.Collections.Immutable": "1.3.0" , which targets NetStandard 1.0 according to Nuget. The library depends on "NETStandard.Library": "1.6.0" . Am I setting up either of these projects wrong? I would greatly appreciate any insight on this... Here are their project.json : app: { "buildOptions": { "emitEntryPoint": true }, "dependencies": { "SomeLibrary": "1.0.0-*" }, "frameworks": { "net462": {

In .NET Framework 4.6.2 the FormattedText() is Obsoleted, how can i fixed it

限于喜欢 提交于 2019-12-05 10:47:51
问题 When I try to build the WPF project with .net framework 4.6.2, I got an error, Because the FormattedText() is Obsoleted as below: [Obsolete("Use the PixelsPerDip override", false)] public FormattedText(string textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, double emSize, Brush foreground); The new override method is public FormattedText(string textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, double emSize, Brush foreground,

VSTS Hosted Build .Net Framework 4.6.2

試著忘記壹切 提交于 2019-12-04 17:25:58
问题 I'm getting errors during VSTS build process stating .net 4.6.2 is not found. Any idea when it will be made available on the build agents? 2016-08-30T17:09:31.0009946Z ##[error]C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1098,5): Error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the

How to prevent DNS lookup when fetching by using HttpClient

丶灬走出姿态 提交于 2019-12-04 04:50:51
问题 I am not sure i am doing correctly or not Would below way prevent DNS lookup when keep-alive is set false? The host is : tatoeba.org The url is : http://188.213.24.161/eng/sentences/show/1 Here screenshots the url is given as above the host is set as below 回答1: I believe that if you specify your host as an ip address (as you did), then .net will skip the dsn look up (regardless of the keep alive or the host header setting). If you dig a little bit into HttpClient you will see it basically

In .NET Framework 4.6.2 the FormattedText() is Obsoleted, how can i fixed it

二次信任 提交于 2019-12-03 22:59:46
When I try to build the WPF project with .net framework 4.6.2, I got an error, Because the FormattedText() is Obsoleted as below: [Obsolete("Use the PixelsPerDip override", false)] public FormattedText(string textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, double emSize, Brush foreground); The new override method is public FormattedText(string textToFormat, CultureInfo culture, FlowDirection flowDirection, Typeface typeface, double emSize, Brush foreground, double pixelsPerDip); Q: How can I determine the pixelsPerDip ? Q: How can I use old constructor

Cannot select Target Framework 4.5 in Visual Studio 2015

百般思念 提交于 2019-12-03 18:05:25
问题 I have uninstalled my localized(german) .net version to get english exception messages. Afterwards i've installed the latest .NET 4.6.2 framework on my windows 10 development pc. Then i've openend my solution which contains projects that target .NET Framework 4.5 and noticed that they couldn't be loaded anymore because this version is not installed. Then visual studio suggested to use a different version and change it later. When i've done it i couldn't change to the desired framework version

How to prevent DNS lookup when fetching by using HttpClient

末鹿安然 提交于 2019-12-02 03:41:45
I am not sure i am doing correctly or not Would below way prevent DNS lookup when keep-alive is set false? The host is : tatoeba.org The url is : http://188.213.24.161/eng/sentences/show/1 Here screenshots the url is given as above the host is set as below I believe that if you specify your host as an ip address (as you did), then .net will skip the dsn look up (regardless of the keep alive or the host header setting). If you dig a little bit into HttpClient you will see it basically uses HttpWebRequest for making the requests. https://github.com/dotnet/corefx/blob/master/src/System.Net.Http

Reuse ICryptoTransform objects

℡╲_俬逩灬. 提交于 2019-12-01 19:57:01
I have a class that is used to encrypt textual data. I am trying to reuse the ICryptoTransform objects where possible. However, the second time I am trying to use the same object, I get partially incorrectly decrypted data. I think the first block is wrong but the rest seems to be okay (tested it with longer texts). I stripped down the class to the following: using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Security.Cryptography; using System.Text; namespace Sample.Crypto { public class EncryptedStreamResolver : IDisposable { private

Error using long paths in .net 4.7

不想你离开。 提交于 2019-12-01 03:28:34
I have set Enable Win32 Long Paths in the Local Group Policy Editor to Enabled and restarted the computer. And here's the code: string path = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); for (int i = 0; i < 10; i++) path += "\\" + new string('z', 200); Directory.CreateDirectory(path); I'm getting the error: System.IO.DirectoryNotFoundException: 'Could not find a part of the path 'C:\Users...\Desktop\zzzzzzzzzz... (Which is actually a strange error message.) app.config already has: <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7" /> More info (probably not

StreamWriter: (Write+Flush)Async seem much slower then synchronous variants

∥☆過路亽.° 提交于 2019-12-01 01:04:27
I was trying to find an IO bottleneck in my class and surprisingly noticed that sw.Write("m"); sw.Flush() can be 20000 faster then await sw.WriteAsync("m"); Await sw.FlushAsync(); when writing 1000000 messages to a file. Does, by any chance, anyone know why? My bet is StreamWriter 's constructor taking a String does not parametrize a stream for async usage. The code below can be launched from C# interactive. Yes, it's not the best place to measure the speed but it will show the matter at hand anyway: var sr = new StreamWriter("G:\\file.file"); var N = 1000; var sw = new Stopwatch(); sw.Start()