You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The auto-generated program.vb causes compilation errors if the test code is inside a namespace that starts with Microsoft.
Steps to reproduce
Create a new MSTest Net core project for VB
Rename the Namespace in the UnitTest1.vb to Microsoft.* like:
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Namespace Microsoft.FooBar
<TestClass>
Public Class UnitTest1
<TestMethod>
Sub TestSub()
End Sub
End Class
End Namespace
Expected behavior
The test project should compile without errors
Actual behavior
<ProjectName>.Program.vb(4,2): error BC30002: Type 'Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode' is not defined.
The text was updated successfully, but these errors were encountered:
As discussed with @nguerrera , @tmat going forward solution for test projects would be to use <HasRuntimeOutput>true</HasRuntimeOutput> property instead of setting output type to "exe, but , doesn't generate "runtimeconfig.dev.json", which the platform needs to find location of "testhost.dll".
The issue is currently blocked on dotnet/msbuild#1310
Description
The auto-generated program.vb causes compilation errors if the test code is inside a namespace that starts with Microsoft.
Steps to reproduce
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: