Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
1.4k views
in .Net Framework by 19 22 32
edited by

I've recently set up a new machine, and installed the Visual Studio Code that has been installed successfully

However, when attempting to compile a project, I encountered the following error:

C:\Program Files\dotnet\sdk\7.0.403\NuGet.targets: error: 'XWP_10112022' is not a valid version string.

Why is this causing an issue with NuGet, and any thoughts on how to resolve it?


1 Answer

1 like 0 dislike
by 159 196 380
selected by
 
Best answer

It appears that there is an environment variable on your machine named "XWP_10112022" that needs to be removed in order to make your project function and compiled properly.

How to Get All Environment Variables in Windows?

  1. Right click on the "My PC" icon > Select Manage
  2. In the opened dialog, click on "Advanced System Settings".
  3. Click on "Advanced" Tab > Environment Variables.
    Get All Environment Variables in Windows
  4. Search for the variable name that shown in your error message.
  5. Select it, then click on "Delete".
  6. Try now to recompile your project that should be working as expected.

See Also

If you don’t ask, the answer is always NO!
...