Content
Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022)
Why I can't Fake-Mock "System" in .net core 6.0(VS Enterprise 2022), I don't know what happened? I was trying to use "using System.Fakes; " , But it alert "missing an assemly reference" after following …


How can I call a method of the original class from the its fake class method
I created a fake assembly called MyProject.Web.Customer.Fakes from the project MyProject.Web.Customer. I am trying to call Read method of the MyProject.Web.Customer from its fake object from the test method.The fake class there is a method I have given…


Visual Studio 2019 Not responding after Open it without any solution ?
Hello Dear I Got big problem with my VISUAL Studio 2019 Community >>> First i downloaded it and try top setup its okay but after finished it i can't try it maybe take like 2-5 minutes till open and evry press inside it take maybe 5 minutes too…


How to execute e2e test in visual studio
Hello, I want to know how to execute e2e test in VS 2022 Check the screen shot above.


Gabled characters produced by Visual Studio 2022
Recently, I started working for migration of my software from Visual Studio 2008 to 2022. After a lot of difficulties with the new IDE, I succeeded in generating the .exe files without errors, one for "Release" version and the other for…


Best way to unit test cancellation
Good evening. I have been trying to write a unit test that will test the cancellation of a method. Now I have a unit test written that passes, but I am do not think it is what I am looking to achieve. I have tried a few different ways to achieve the…


TypeLoadException with different NLog versions in MSTest
Hi, I have a project A (an application) which includes a package B, which in turn contains a third party package C3, which in turn contains another third party package package D3. Both packages A and D3 use the same third party package NLog but with…


Visual Studio 2019 web recorder greyed out on load test
Hello, I've installed Visual Studio 2019 Enterprise on a server, and currently, I only get the web recorder not greyed out when I run the test with the user account I installed visual studio with. This account is local admin. But when try to run it…


Getting build error after selecting "automatically deploy the database project before unit tests are run" checkbox in SSDT visual studio 2022
In new visual studio update “Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.3”, After selecting the “automatically deploy the database project before unit tests are run” checkbox in SQL Server Test Configuration, when I tried…


how to use text files to run tests
hi i would like to know hoe can i use text files to run tests us it posible to use the as input and expected output? is so haw is it done in VS 2022?


Unit testing C++ CLR
What is the best approach to write Unit Tests for C++/CLR? We have a solution that includes C++ native, C++/CLR and C#.Net code. When I try to add a C++/CLR reference to a C#.net Unit Test project, it compiles, but when I run the tests it says…


How to see code coverage percentage in VS22 Enterprise?
Hey, we're moving from VS2019 Enterprise to VS22 Enterprise. In 2019 the code coverage looks like described here:…


How to write Unit test for DAL which call stored procedure and direct sql commands
Hello Everyone, I am writing unit test cases(using xunit) for DAL methods(which are calling stored procedures and some direct sql commands and not returning methods). How can I mock the results coming from db in unit tests. public class…


error System.Data.SqlClient.SqlException: 'Incorrect syntax near '´'.' in VB.NET (Windows Forms)
Im on vb.net framework version 4.8.1 Using an online database code Public Class register Private cmd As SqlCommand Private Sub register_btn_Click(sender As Object, e As EventArgs) Handles register_btn.Click Dim con As New…
Compile error when adding Xamarin iOS app to solution with .NET 6 NUnit test project
This came up as a result of attempting to upgrade our test projects from .NET Core 3.1 to .Net 6 in our solution that includes a Xamarin iOS app. It happens on the macOS-11 build agent in azure dev ops and also on my development mac running Visual Studio…


Microsoft.CodeCoverage.Console.exe don't remove C++ compile time code
Hello, I generate C++ code coverage with Microsoft.CodeCoverage.Console.exe. I have the following code : template<typename type_t> [[nodiscard]] static constexpr type_t* allocate_array(const usize count) noexcept…


uwp code coverage does not take effect
I created a UWP project and then created a UWP Unit Test. Running all tests is normal, but Analyze Code Coverage for All Tests is invalid and the result is 0 What can I do?
Can't run vstest
Hello all, I try to automate the UnitTests for our Azure Build Pipeline, but getting this error: Starting: Test run for Test plans ============================================================================== Task : Visual Studio…


Getting error (MyClassName).MyClassInitialize has wrong signature. The method must be static, public, does not return a value and should take a single parameter of type TestContext.
I'm running in VS 2022 with .NET Framework 4.8 I'm referencing NuGet packages MsTest.TestAdapter and MsTest.TestFramework 2.2.10. I'm getting this error for a lot of tests (MyClassName).MyClassInitialize has wrong signature. The method must…
Unable to see Intellitest dropdown in Visual Studio 2022
TL&DR Running Visual Studio Enterprise 2022 for Windows 10 Home [See ScreenShot] Created Library for Dotnet 6 (ClassLibrary2) Created Library Test for Dotnet 6 (ClassLibrary2Tests) No Intellitest Drop Down Dear Internet, …

