visual-studio-2019

C# 9.0 Support for Top-level programs in Visual Studio 2019

a 夏天 提交于 2021-01-28 19:51:46
问题 With the coming of C# 9.0 and .NET 5 a new feature is getting introduced called "Top-level programs". This functionality takes away a lot of the boilerplate code necessary to create a simple C# application by not having to wrap your code in the usual namespace/class/Main method, as explained in the Welcome to C# 9.0 blog To create a simple "Hello World" application the only required code for a Top-level program is the following (taken from the blog) using System; Console.WriteLine("Hello

No test under python unittest in visual studio 2019

余生长醉 提交于 2021-01-28 18:40:53
问题 I have an existing python project in visual studio 2019 (Version16.3.9) containing unit test created for unittest.py under visual studio 2017. I already configered the project for unittest, because this is needed in visual studio 2019: But there are no unit tests shown. But I got the following error: File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\PythonFiles\testing_tools\run_adapter.py", line 17, in <module> tool, cmd,

How to enable visual studio find results window with “advanced features”?

我的梦境 提交于 2021-01-28 14:26:32
问题 Please refer to this for the 2 types of Find results window I've encountered in VS2019 using the Quick find feature (or the default Ctrl+F). The first image is a window that seems advanced, in that it has grouping of the results (by project, by file), it has other options like the Keep results , and List view toggles, etc etc. The second image on the other hand is a really plain results list, without the options/features of the first one. For the first window , I don't remember anymore how I

How can I prevent Visual Studio (2019) from opening “VS Debug Console” and just use the old .NET Core Host console?

懵懂的女人 提交于 2021-01-28 12:20:33
问题 It seems like with VS 2019 (Enterprise?), there is a new type of console application host available that even stays unclosed after I stop debugging. When starting multiple projects, the first console application that starts up will be of this new type. I am searching for a way to prevent VS to use this console for the "main"-project, and simply use the same console for every project I am starting. I have started the same solution with 4 ASP.NET Core projects inside VS 2017 and Visual Studio

Intellisense delay in Visual Studio 2019

纵然是瞬间 提交于 2021-01-28 09:00:37
问题 When editing C++ code on a fast machine, Intellisense pops up way too quick. Most of the time Intellisense is not needed (and unwanted). There are occasions when the popup is useful, of course, so I don't want to disable Intellisense altogether. I'm either having to hit ESC or move the mouse to get the popup to go away. If you're working quickly, this interrupts the flow and after a while gets annoying. Is there a delay for Intellisense? Something along the lines of "Only pop up if user does

Generate graph of include files in Visual Studio Community 2019

ⅰ亾dé卋堺 提交于 2021-01-28 08:33:05
问题 I wanted to "Generate the graph of include files" in my C++ project, using Visual Studio 2019 Community, but that option doesn't appear when I right click, despite appearing (with the same project) in another PC, with Visual Studio 2017. Did they remove it this year? 回答1: Action "Generate Graph Of Include Files" is available only in VS2019 Enterprise edition, as part of the Code Maps module. It can be run i.e. via option in context menu within code file. 来源: https://stackoverflow.com

I created a new project in VS 2019 and it doesn't compile because VS fails to find Toolset v142

左心房为你撑大大i 提交于 2021-01-28 06:20:26
问题 The 'template' for the new project is MFC Dynamic Link Library. The problem seems to boil down to Visual Studio looking for the folder "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\Win32\PlatformToolsets\v142" - which doesn't exist. I have run and re-run the Visual Studio installer - always adding more things for toolset v142, but nothing seems to help. Is there some way to get this folder to appear? With the right stuff in it? In reality, I am upgrading an existing

Find 2 x values of the current y in a List(of Point)

橙三吉。 提交于 2021-01-28 06:17:11
问题 I have a List(of PointF) . 2 nested for loops run through a rectangle that is stretched around a circle (or circle-ish (but is really is a closed path)). I want to work within this circle with GetPixel(x,y) . That means, I need the respective minimum and maximum x value of the respective y. How can I work that out with this List(Of PointF)? The reason I'm requesting help here is because I get confused with these List.Find(predicates or matches) things. For x As Integer = CInt(xmin) To CInt

Visual Studio 2019 - Adding WebJob project in WebApp

房东的猫 提交于 2021-01-28 05:36:08
问题 In my solution i have an aspnet core 2.2 WebApp, and i want to add an existent project like webJob but there isn't the option: Add WebJobs from existent project Why? With the same procedure i add WebJobs on my other .Net application, and this option is shown in visual studio 2019 EDIT Changed images with english language. Sometimes the Add > Existing project as Azure WebJobs it's showned but if I click on it it shows this error: (the selected project is the aspnet.core 2.2. WebApp) After this

Latest version of nuget package still not up to date

孤人 提交于 2021-01-28 05:02:44
问题 We are using our own nuget server on the local network. I've got a dotnet standard 2.0 library which I'm packaging via nuget. Currently it's at 1.0.5.4 (both File version and Assembly version). However when I install it in another solution it's missing a property that I added in the latest version increment. When I F12 on a class of that nuget it reads at the top: #region Assembly lib-mycode-async, Version=1.0.5.1, Culture=neutral, PublicKeyToken=null // C:\Users\{Username}\.nuget\packages