AddTestAttachment does not work anymore in VS2022
See original GitHub issueDescription
If the following code is executed:
using NUnit.Framework;
namespace NUnitTest
{
public class Tests
{
[Test]
public void TestNunitAttachment()
{
TestContext.AddTestAttachment(@"C:\Windows\WindowsUpdate.log");
}
}
}
The attached file is not clickable (it works with MSTest). I assume the file-scheme is causing the issue.
See the following image:

Versions
NUnit: 3.13.2 NUnit-Test-Adapter: 4.1.0 .net platform: 5 / 6 Visual Studio edition: VS2022 Enterprise Version 17.1.0 Preview 1.0
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Adapter V4 Release Notes
914 AddTestAttachment does not work anymore in VS2022; 918 New DiscoveryMode doesn't play nicely with TestFixtureSource - Missing GenericFixture; 919 VSTest ...
Read more >nunit - TestContext.AddTestAttachment(string path) is not ...
I am trying to run nunit tests in azure test plan by triggering Release build pipelines. I have observed file attachments with greater...
Read more >How to fix Visual Studio 2022 17.5 Intellisense not working
This is a general problem that started with 17.5: intellisense, renaming, underlining all failing; GoToDeclaration etc all much slower.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@OsirisTerje I was able to test the beta1 both within VS2022 test explorer and within TeamCity tests system, and both are able to display the test attachments correctly.
I still believe that Visual Studio should be more forgiving regarding paths, since a “file:///c:xxx” should be valid, but that falls into MS side.
For me the new beta works perfectly 👍. Thank you very much.