To be clear about what I'm talking about, here's a cut down version of the SSDT project file. Once I reloaded each project I was able to use the test designer to set test condition properties without error. I set the ToolsVersion of the SSDT project to "15.0" to match the unit test project. I could see the ToolsVersion of the SSDT project was "4.0", even though it was created from scratch in Visual Studio 2019, while the ToolsVersion of the unit test project created from the SSDT project was "15.0". I unloaded then edited each project in Visual Studio. I got the hint the ToolsVersion might be important from this MSDN thread: To download and install SSDT for Visual Studio 2017, or an older version of SSDT, see Previous releases of SQL Server Data Tools (SSDT and SSDT-BI). Historically, there was no backwards compatibility, meaning that with a newer version of SSDT, you couldn't create SSIS packages for an older version of SSDT. It turns out the issue was caused by a mismatch in the ToolsVersion attribute in the two project files: The SSDT project and the unit test project. SQL Server Data Tools (SSDT) is the development environment for creating and maintaining Integration Services (SSIS) packages and projects. Has anyone come across a similar issue and found a fix for it? I ran into the same problem with a Row Count condition as well - I couldn't set any property in the Properties window because whenever I did the error dialog prevented me from changing the value. The issue is not confined to just Scalar Value test conditions. So it appears the problem is confined to the test designer. I've been able to work around the problem by setting the property value in the underlying C# class, instead of using the Properties window. ![]() However, there was no indication of what the object was that was null. I found that trying to set any property in the Properties window resulted in the same error. ![]() ![]() The detailed message was "Object reference not set to an instance of an object." When I tried to set the Expected Value in the Properties window an error dialog appeared, saying "Property value is not valid". I was trying to add a Scalar Value test condition to my first SQL Server Unit Test. To add a new unit test to the test project I right click the project, select Add > New Item. I found the easiest way to create a separate unit test project capable of running SQL Server tests was to right click on a stored procedure in the SSDT project, and select Create Unit Tests., then select the option to add the unit test to a new project. In Visual Studio 2019 I created a SSDT project and populated it by importing a database. I've found an issue in the unit test designer that I have no idea how to debug or resolve. I've been experimenting with unit tests in Visual Studio for SQL Server Data Tools (SSDT) projects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |