-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Microsoft.JavaScript.UnitTest references a vulnerable NewtonSoft.Json package #2513
Comments
Hi! I would like to understand your scenario. That package shouldn't be needed anymore, was always in beta and hasn't been updated in years. Also, you can install 13.0.3 manually, that should fix the issue. |
I have been following this guide from 11/23/2023 to write unit tests for ASP.NET Core.
This is how the dependency came in. After your message I removed both dependencies. Reopened VS, built and tested. Then an Issue came up. Every 2nd build (reproducable) there is an error that pops up and none of the TypeScript files get compiled and copied to
A rebuild makes it good again. Another rebuild after fails. And so on. The successful build produces files in A deterministic build would be great. How do I add TypeScript with unit tests to a C# Project? |
You do need the TypeScript nuget. You shouldn't need the test nuget. If you're getting an error in CompileTypeScriptWithTSConfig I'm assuming you have that one, though. The issue in the error seems to be that file (colos.js) either not compiled or not copied to the right location before it runs. |
As I‘ve written, every 2nd Build fails as soon as the dependency is removed. If Ir re-add it ever build is successful. This is reproducible. The successful build has a target called The failing build instead has a target named There is seriously smth weird going on… so the question remains: what’s the how-to, to have TS with unit tests in an cs aspnet core 9 project? |
I use the package Microsoft.JavaScript.UnitTest 1.5.10610.1 is a C# project (ASP.NET) to run typescript tests.
The build and Visual Studio warn me about a vulnerable NewtonSoft.Json package.
As a workaround i installed
Newtonsoft.Json 13.0.3
but I do my serialization usingSystem.Text.Json
.So it would be nice to have a dependency update and a newly published package of
Microsoft.JavaScript.UnitTest
.The text was updated successfully, but these errors were encountered: