❔ Getting a weird error and don't know how to fix it

I just tried launching a tutorial code I haven't launched in a few months and when I pressed debug, I got this error
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Cannot load file or assembly System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or any of its dependencies. The system cannot find the specified file.
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.
Cannot load file or assembly System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a or any of its dependencies. The system cannot find the specified file.
What might be the cause of this and how do I fix it?
21 Replies
friedice
friedice14mo ago
what is the tutorial code, a console app?
Giratina Musics(Road 2 Polyglot)
console app ye
friedice
friedice14mo ago
do you have the proper sdk installed?
Giratina Musics(Road 2 Polyglot)
how do I check that ah found it
friedice
friedice14mo ago
open command prompt and type
dotnet --info
dotnet --info
friedice
friedice14mo ago
what does your code and .csproj look like?
Giratina Musics(Road 2 Polyglot)
and the code
friedice
friedice14mo ago
$code $paste
MODiX
MODiX14mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Giratina Musics(Road 2 Polyglot)
BlazeBin - crhpkhbsgbgh
A tool for sharing your source code with the world!
friedice
friedice14mo ago
are you using visual studio? what happens when you type msbuild in developer powershell
Giratina Musics(Road 2 Polyglot)
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework and I'm indeed using visual studio
friedice
friedice14mo ago
did you move or rename your files? try building your sln in visual studio by putting this in visual studio dev powershell msbuild "C:\path to solution\project.sln" doesnt seem to be an issue with your code, probably project setup somehow try creating a new console app and just running hello world
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
}
}
public class Program
{
public static void Main()
{
Console.WriteLine("Hello World");
}
}
Giratina Musics(Road 2 Polyglot)
that worked
friedice
friedice14mo ago
id probably just port the code to the new console app, seems like the easiest solution then
Giratina Musics(Road 2 Polyglot)
ah ok let me try that it worked
friedice
friedice14mo ago
thumbsupcat
Accord
Accord14mo 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
More Posts