Skip to content
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

MSTest NuGet references are not correctly read in German #4699

Closed
SetTrend opened this issue Jan 17, 2025 · 4 comments
Closed

MSTest NuGet references are not correctly read in German #4699

SetTrend opened this issue Jan 17, 2025 · 4 comments

Comments

@SetTrend
Copy link

SetTrend commented Jan 17, 2025

I'm not sure if this is an TestFX issue or a NuGet issue …

I made a strange observation with my solutions that I'm maintaining from within Visual Studio 2022 v17.12.4:

The NuGet Package Manager doesn't correctly read MSTest NuGet package versions

No matter how often I update them, the NuGet Package Manager still lists the old MSTest NuGet package versions and suggests to update them.

This only happens when I'm working in German (which I do because the keyboard shortcuts are the same then across applications).

Now, here's the strange observation I made

Trying to produce a screen recording video of proof, I switched the Visual Studio UI to English, so you'd better be able to understand what's happening.

Doing so, after restarting Visual Studio 2022, the erroneous list of NuGet package updates to perform suddenly vanished!

I was baffled …

Then I switched the Visual Studio UI back to German … And now the NuGet Package Manager didn't list any erroneous updates anymore, too!

I could reproduce this behaviour with a second .NET solution. Again, I took a screen recording, recording the whole session:

MSTest.NuGet.doesn.t.work.in.German.mp4

Current Behaviour

When I create a new MSTest project having Visual Studio UI set to use German and update all the NuGet references,
I then need to …

  1. manually switch the Visual Studio UI to English
  2. close and re-open Visual Studio 2022
  3. open NuGet Package Manager
  4. close NuGet Package Manager
  5. manually switch the Visual Studio UI back to German
  6. close and re-open Visual Studio 2022
  7. open NuGet Package Manager
  8. close NuGet Package Manager

Expected Behaviour

The MSTest NuGet package references should be correctly read while Visual Studio 2022 is using the German language UI.

@Evangelink
Copy link
Member

Hi @SetTrend,

This is actually a limitation of MSTest.Sdk (it's a limitation of all custom MSBuild SDKs) where version updates is not well integrated with NuGet. You basically need to update the version manually. We have tried to list it in our documentation https://learn.microsoft.com/dotnet/core/testing/unit-testing-mstest-sdk#known-limitations

For your project:

Image

You would actually need to do:

Image

@SetTrend
Copy link
Author

SetTrend commented Jan 17, 2025

Hi @Evangelink,

that's not the issue here.

There references were already manually updated. See here: #4107 (reply in thread)

This issue here is that whenever I restart Visual Studio, it doesn't recognize that the references already are updated.

This issue doesn't occur when Visual Studio is set to English. It only occurs when set to German.

Please re-open.

@Evangelink
Copy link
Member

On your video the versions are not good that's why I did commented.

Also on the video you shared, after switching back to German (restart of vs) there is no issue. This is because nuget doesn't understand well the versions coming from custom SDKs confusing it.

@SetTrend
Copy link
Author

SetTrend commented Jan 17, 2025

On the contrary. The references are already updated. Still the NuGet Package Manager displays them as being outdated:

NuGet references

That's the issue described here.

I have no idea where the NuGet Package Manager takes its (obsolete) information from. The packages in the solution have been updated weeks ago.

There must be some caching issue within the NuGet Package Manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants