visual-studio-2019

Why do I still get “unresolved external symbol” error after adding the reference to the test project?

家住魔仙堡 提交于 2021-01-28 04:41:49
问题 I created a C++ project in Visual Studio 2019. I added two files to it: MyClass.hpp and MyClass.cpp . Then I created a test project and added the original project as a reference. If I doubleclick on the reference in the test project, I can see MyClass . But if I try to run the tests, I get this error: MyTest.obj : error LNK2019: unresolved external symbol "public: struct MyRef __thiscall MyClass::SetData(struct Data)" (?SetData@MyClass@@QAE?AUMyRef@@UData@@@Z) referenced in function "private:

Visual Studio 2019 Test Explorer not working well with xUnit

梦想的初衷 提交于 2021-01-27 22:13:30
问题 I've just installed Visual Studio 2019 Professional and I noticed some misbehavior if I compare it to the VS 2017 which I used to work with. The Test Explorer window In the VS 2017 when I open a project, that already had been opened previously, I see all the tests in the Test Explorer. In the VS 2019 the window is empty until I rebuild the solution. If I rebuild the solution and all the xUnit tests are discovered I cannot click on any single test. I can click on all the folders in the

error MSB8040: Spectre-mitigated libraries are required for this project

时光总嘲笑我的痴心妄想 提交于 2021-01-27 13:04:09
问题 I have a problem that I cannot solve. My code: #include "ntddk.h" #include <stdlib.h> NTSTATUS DriverEntry(IN PDRIVER_OBJECT theDriverObject, IN PUNICODE_STRING theRegistryPath) { DbgPrint("Hello World!"); return STATUS_SUCCESS; } My goal is to run this program without any problems. Error message: error MSB8040: Spectre-mitigated libraries are required for this project. Install them from the Visual Studio installer (Individual components tab) for any toolsets and architectures being used.

error MSB8040: Spectre-mitigated libraries are required for this project

你离开我真会死。 提交于 2021-01-27 12:56:28
问题 I have a problem that I cannot solve. My code: #include "ntddk.h" #include <stdlib.h> NTSTATUS DriverEntry(IN PDRIVER_OBJECT theDriverObject, IN PUNICODE_STRING theRegistryPath) { DbgPrint("Hello World!"); return STATUS_SUCCESS; } My goal is to run this program without any problems. Error message: error MSB8040: Spectre-mitigated libraries are required for this project. Install them from the Visual Studio installer (Individual components tab) for any toolsets and architectures being used.

Is it possible to make WebView control to read local html files?

拈花ヽ惹草 提交于 2021-01-27 12:11:43
问题 I'm making an application with WebView control. And I want it to read local html file. But I can't find the right way to make it possible. At first, I simply tried to use Navigate method and provide the file path in the "file:///~" format string as a parameter, but it didn't work. https://docs.microsoft.com/ja-jp/windows/communitytoolkit/controls/wpf-winforms/webview-known-issues This Microsoft page says that WebView control does not recognize "file:///~" protocol. And it shows the 3

Django Unit Testing in Visual Studio 2017 or 2019:

别说谁变了你拦得住时间么 提交于 2021-01-27 07:10:46
问题 Django needs setup code so unit tests on models that need a database will work. Standard Django unit test do that silently in the background but not with Visual Studio. I have not found a good way to provide setup code that will work for starting test runs from both the Visual Studio Test Explorer and with django manage.py test . Visual Studio Test Explorer does not call setUpModule/tearDownModule nor tearDownClass. The following code works from within VS, but I find it ugly, AND it doesn't

Visual Studio IDE0059 C# Unnecessary assignment of a value bug?

烂漫一生 提交于 2021-01-27 06:10:39
问题 I have the following C# Code (I reduced it to the bare minimum to simplify it). Visual Studio 2019, .NET Framework 4.7.2. public void Demo() { ReportStart(); var success = false; try { int no = 1; switch (no) { case 1: default: break; } DoSomething(); success = true; } finally { ReportEnd(success); } } From my understanding, there is nothing wrong about it. The function may fail (I don't want to catch it) but before leaving, it will report successful execution to another method. When

How to get jQuery intellisense in Visual Studio 2019

孤人 提交于 2021-01-26 11:48:51
问题 I am trying to get jQuery intellisense working in Visual Studio. I am using the latest jQuery version jquery-3.3.1.js and latest Bootstrap v4.3.1. I have tried every solution on Stack Overflow but nothing has yet worked for me. I tried to reference jquery-3.3.1.intellisense.js but nothing happened. I also tried installing jQuery typed script and then adding jsconfig.json and referencing the jQuery typed script in it but unfortunately again nothing happened. To be clear, I expect intellisense

How to create .Net 5.0 Class Library project in Visual Studio 2019 16.8.1?

瘦欲@ 提交于 2021-01-21 12:50:14
问题 I can not see the Class Library(.NET) option on Add a New Project window in Visual Studio 16.8.1. How can I create a Class Library (.NET) project? (Not .Net Core or .Net Framework) 回答1: If the project templates are still giving you .NET Core 3.1 as the highest option, and the project properties options aren't allowing what you want - it isn't a problem: simply right-click on the project in Solution Explorer and select "Edit Project File", to edit the .csproj, and you can change the target

ssis - visual studio hangs on execute suggested action

跟風遠走 提交于 2021-01-20 08:52:37
问题 I've got a problem with visual studio enterprise 2019, it hangs on "execute suggested actions" when I use it to add a using reference, is there any way to solve? 回答1: It's a Visual Studio bug. They are working on it. Take a look here: https://developercommunity2.visualstudio.com/t/Infinite-suggested-action-never-ends/1223055 The fix will be probably released on the next release (16.9). UPDATE: Still in vs 16.8.4 but should be solved in 16.9. 来源: https://stackoverflow.com/questions/65220989