-
-
Notifications
You must be signed in to change notification settings - Fork 121
[Bug]: Cannot build the project because of namespace that doesn't exits - TUnit.Mocks.Generated #5281
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
TUnit.Mocks will auto-generate the global using file but the namespace TUnit.Mocks.Generated will appear in this file and doesn't exist because there is no generated mock.
Expected Behavior
No error and can build the project even there is no generated mock.
Actual Behavior
I can't build the project because there is a namespace that doesn't exist yet unless I use a Mock.
Steps to Reproduce
- Create a solution
- Install TUnit.Mocks
- Build the project
- The project will fail with the error
TUnit Version
1.22.3-beta
.NET Version
.NET 10.0
Operating System
Windows
IDE / Test Runner
Visual Studio
Error Output / Stack Trace
The type or namespace name 'Generated' does not exist in the namespace 'TUnit.Mocks' (are you missing an assembly reference?)Additional Context
No response
IDE-Specific Issue?
- I've confirmed this issue occurs when running via
dotnet testordotnet run, not just in my IDE
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working