C
C#6mo ago
Merrig

✅ .NET SDK installed on the machine is targeting a different platform

I have found very little information on this specific issue related to vs code and unity. Whenever I launch vs code with the default console template opened it loads for a second and gives me this error. I know I have the latest version of the .NET SDK installed as x64 and I have no idea how to change what the c# dev kit is targeting. I have tried uninstalling the SDK, vs code, and all of the extensions within vs code. I have also tried editing my system environment variables and changing the path settings. I have truly no idea what to do and have been stuck on this issue for days. any help is much appreciated!
No description
No description
8 Replies
phaseshift
phaseshift6mo ago
Isn't unity still based on net framework? I don't think installing a recent .net SDK will help much with unity? If you're just seeing a 32 Vs 64 bit issue, I have seen similar symptoms due to bad ordering of .net related locations in PATH
Merrig
MerrigOP5mo ago
thats what ive been recomended to change ordering of .net locations in path but i dont know what is the correct order or if im supposed to add a knew file location.
Pobiega
Pobiega5mo ago
I can help you with the x86 sdk stuff, but as phaseshift said, unity uses .net fx, not modern .net Follow these instructions $dotnetpath
MODiX
MODiX5mo ago
* Open powershell in a terminal in admin mode as in the following video: https://cdn.discordapp.com/attachments/569261465463160900/1157744344183341156/20230930-1822-10.7436061.mp4 * copy/paste the following script:
iex "& { $(irm https://gist.githubusercontent.com/tebeco/5c6cc0eee8c28fad3523008d58f83914/raw/d14890f540ae74ad72d950c48f6a242e9401d31e/fix-dotnet-path.ps1) }"
iex "& { $(irm https://gist.githubusercontent.com/tebeco/5c6cc0eee8c28fad3523008d58f83914/raw/d14890f540ae74ad72d950c48f6a242e9401d31e/fix-dotnet-path.ps1) }"
in case of an invalid setup detected, it will: * tell you that it did (or not) detected an invalid Path setup * in case some action are require it will ask you to Press Enter to confirm
Pobiega
Pobiega5mo ago
Feel free to read what the script does if you dont trust it 🙂 It just removes the offending entry from your PATH
Merrig
MerrigOP5mo ago
i ended up getting a different error this time but its okay this is progress i really really appreciate your time looking into this cause ive been stuck on that bullshit for DAYS WAIT NEVERMIND I OPENED A NEW PROJECT AND IT WORKED THANK YOU SO MUCH IM SO GRATEFUL
Unknown User
Unknown User5mo ago
Message Not Public
Sign In & Join Server To View
MODiX
MODiX5mo ago
If you have no further questions, please use /close to mark the forum thread as answered
Want results from more Discord servers?
Add your server