C
C#17mo ago
WantToBeeMe

❔ NuGet broken, i have no idea

So it has been ages since i coded in c#, turns out my NuGet is broken or something
50 Replies
WantToBeeMe
WantToBeeMeOP17mo ago
it also doesnt matter what ide i am using, its in vsc, intelliJ and cmd
ZacharyPatten
ZacharyPatten17mo ago
if code is open source please link it
WantToBeeMe
WantToBeeMeOP17mo ago
https://github.com/SebLague/Chess-Challenge here is the code, though i am pretty sure thats not it, i didnt make it. its straight downloaded without any changes
GitHub
https://youtu.be/iScy18pVR58. Contribute to SebLague/Chess-Challenge development by creating an account on GitHub.
WantToBeeMe
WantToBeeMeOP17mo ago
https://www.youtube.com/watch?v=iScy18pVR58 (from this video if that clears things up)
ZacharyPatten
ZacharyPatten17mo ago
it works fine for me. run a dotnet --info
WantToBeeMe
WantToBeeMeOP17mo ago
dot
ZacharyPatten
ZacharyPatten17mo ago
C:\Users\seven\source\repos>dotnet --info
.NET SDK:
Version: 7.0.302
Commit: 990cf98a27

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.302\

Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61b17

.NET SDKs installed:
7.0.203 [C:\Program Files\dotnet\sdk]
7.0.302 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
C:\Users\seven\source\repos>dotnet --info
.NET SDK:
Version: 7.0.302
Commit: 990cf98a27

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\7.0.302\

Host:
Version: 7.0.5
Architecture: x64
Commit: 8042d61b17

.NET SDKs installed:
7.0.203 [C:\Program Files\dotnet\sdk]
7.0.302 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download
there is my dotnet --info and it is currently working fine for me
Monsieur Wholesome
try dotnet build -v and show us the output?
ZacharyPatten
ZacharyPatten17mo ago
you have to add the level of "-v" dotnet build --verbosity diagnostic for example
-v, --verbosity <LEVEL> Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
WantToBeeMe
WantToBeeMeOP17mo ago
Monsieur Wholesome
What ZP said
ZacharyPatten
ZacharyPatten17mo ago
dotnet build --verbosity diagnostic
WantToBeeMe
WantToBeeMeOP17mo ago
oh god thats a lot of text
ZacharyPatten
ZacharyPatten17mo ago
does anything look off?
WantToBeeMe
WantToBeeMeOP17mo ago
thats not going to fit in this discord lol i have no idea lol, never seen it, though nothing looks red its just some white, gray and blue text oh
WantToBeeMe
WantToBeeMeOP17mo ago
WantToBeeMe
WantToBeeMeOP17mo ago
WantToBeeMe
WantToBeeMeOP17mo ago
thats the only error
ZacharyPatten
ZacharyPatten17mo ago
can you run a echo %PATH% and tell us if you see a "C:\Program Files (x86)\dotnet" in the output? I don't think that is the issue but worth a check
WantToBeeMe
WantToBeeMeOP17mo ago
lol, it littaraly echo's %PATH%
WantToBeeMe
WantToBeeMeOP17mo ago
ZacharyPatten
ZacharyPatten17mo ago
one sec ill get the powershell command. I was using terminal echo $env:path in powershell what you want to make sure is that you have a C:\Program Files\dotnet before you see a C:\Program Files (x86)\dotnet because you want to make sure x64 is being prefered over x32 again... I don't think this is the issue but I have seen other users with this issue so I just want to confirm this isn't it
WantToBeeMe
WantToBeeMeOP17mo ago
i dont see any programFiles\dotnet or something simular
WantToBeeMe
WantToBeeMeOP17mo ago
a lot of paths oh god only that last one has dotnet in it C:\Users\roose\.dotnet\tools
WantToBeeMe
WantToBeeMeOP17mo ago
wait nevermind
ZacharyPatten
ZacharyPatten17mo ago
you are good. it isn't the issue. I didn't think it was yeah but you have C:\Program Files\dotnet, and that is the one you care about. that is correct can you build other projects?
WantToBeeMe
WantToBeeMeOP17mo ago
i mean, i rarely code in c# XD, last time on this pc was a year ago i can build a lot of java projects lol, but you probably ment building c# projects
ZacharyPatten
ZacharyPatten17mo ago
yes C#
WantToBeeMe
WantToBeeMeOP17mo ago
i dont have any other c# project to test
ZacharyPatten
ZacharyPatten17mo ago
download some 🙂 or make one
WantToBeeMe
WantToBeeMeOP17mo ago
great, cant even run a c# project of 1 line 😅 just did dotnet new console -o app
ZacharyPatten
ZacharyPatten17mo ago
canyou open your .csproj please and share it with us app.csproj
WantToBeeMe
WantToBeeMeOP17mo ago
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

</Project>
ZacharyPatten
ZacharyPatten17mo ago
regardless I think you need to install the latest dotnet something is wrong
ZacharyPatten
ZacharyPatten17mo ago
I'm not sure what is wrong with you environent, but I would isntall the latest .NET 7: https://dotnet.microsoft.com/en-us/download
Microsoft
Download .NET (Linux, macOS, and Windows)
Free downloads for building and running .NET apps on Linux, macOS, and Windows. Runtimes, SDKs, and developer packs for .NET Framework, .NET, and ASP.NET.
WantToBeeMe
WantToBeeMeOP17mo ago
WantToBeeMe
WantToBeeMeOP17mo ago
its searching for C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages but \Microsoft Visual Studio doesnt exist... probably because i am stupid and moved things around lol
ZacharyPatten
ZacharyPatten17mo ago
yeah. if you moved things around that would explain it can you try to change the xxx.csproj from <TargetFramework>net6.0</TargetFramework> to <TargetFramework>net7.0</TargetFramework> and see if that helps the build at all "6.0" -> "7.0"
WantToBeeMe
WantToBeeMeOP17mo ago
nope i am going to reinstall vsc, but in the path that is in the programfile nope
ZacharyPatten
ZacharyPatten17mo ago
can you try a dotnet clean and dotnet build after
WantToBeeMe
WantToBeeMeOP17mo ago
dotnet clean gives the same error the same red long error MSB4018
ZacharyPatten
ZacharyPatten17mo ago
In my case. Go to C:\Program Files(x86)\Microsoft Visual Studio\Shared then create a new folder name is "NugetPackages"
saw this from a stack overflow post might be worth a shot
WantToBeeMe
WantToBeeMeOP17mo ago
lol, i cant even find that file
ZacharyPatten
ZacharyPatten17mo ago
not a file. is a folder
WantToBeeMe
WantToBeeMeOP17mo ago
oh yea, thats what i ment but i cant even find Microsoft visual studio
ZacharyPatten
ZacharyPatten17mo ago
can you hop on a screenshare? we are missing something here
WantToBeeMe
WantToBeeMeOP17mo ago
sure
ZacharyPatten
ZacharyPatten17mo ago
#dev-vc-0
WantToBeeMe
WantToBeeMeOP17mo ago
lol
Accord
Accord17mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server