I have a web app in dot net along with other projects. when i open the .sln file and publish the web project, it does. But, when I try to publish the web proj using command line and .csproj, it gives an error. "Nothing to do. None of the projects specified contain packages to restore."
I got this after converting my csproj
to vs2019
format and running dotnet test
. The solution was to ensure i had the right test adapter and framework. My csproj
files had both the old Microsoft.VisualStudio.QualityTools.UnitTestFramework
reference and the new MSTest.TestAdapter
+ MSTest.TestFramework
+ Microsoft.NET.Test.Sdk
.
I kept the new ones and my tests were run.