C# not recognizing packages
i keep getting this error whenever i run my code using restsharp
this my code
i installed both NuGet And RestSharp, is there a way to fix this?
23 Replies
can you show your
csproj
file for this project?okay, now run
dotnet build
ok
you should not be using
mcs
also, your versions are... wrongim on linux, how can i run it then?
dotnet build
and dotnet run
ok
the latest version of RestSharp is
110.2.0
dotnet build gave me error
show the error?
ok
ah, remove the..
from your proj file
ok
like this ?
should i remove ?
you need a opening for the <ItemGroup> to wrap the package references
this should be all you need
a correct version for restsharp, no invalid NuGet reference
ok
thanks
its fixed
i have a question
feel free to ask
how can i turn the Program.cs file to .exe
well you're on linux, so you just mean an executable file ye?
not specifically .exe, which is for windows
i want to test it on windows
then I think you might have to build it on a windows machine
regardless, you're looking for
dotnet publish
, but it has tons of optional switches that configure how it worksok, thanks