C
C#4mo ago
Waiting...

How can I fix this system.runtime error?

The project is dot net 4,8 but I have no idea how to fix this. Im not sure whats its asking for either since I dont have the system.runtime referenced yet
No description
68 Replies
Waiting...
Waiting...OP4mo ago
further more googling for the system.runtime ddl version 4.0.0.0 adds some otehr error that probably isnt relevent
reflectronic
reflectronic4mo ago
what does the ouput show
Waiting...
Waiting...OP4mo ago
Severity Code Description Project File Line Suppression State Error Unknown build error, 'Could not load type 'System.Security.SecurityRulesAttribute' from assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.' yua
reflectronic
reflectronic4mo ago
no, i mean, when you go to "Output," the big text box, what is in it
Waiting...
Waiting...OP4mo ago
1>------ Build started: Project: yua, Configuration: Debug Any CPU ------ 1>C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, 'Could not load type 'System.Security.SecurityRulesAttribute' from assembly 'System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.' ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 21:33 and took 04.411 seconds ==========
reflectronic
reflectronic4mo ago
are you using NuGet packages?
Waiting...
Waiting...OP4mo ago
no im not using anything i mean i havent added any the system.runtime reference yet
Waiting...
Waiting...OP4mo ago
No description
Waiting...
Waiting...OP4mo ago
(sorry im kind of dumb) adding a dll i found on the internet v4.0.0.0 dosent fix it
reflectronic
reflectronic4mo ago
no, do not do that
Waiting...
Waiting...OP4mo ago
okay
reflectronic
reflectronic4mo ago
delete that, it will only make things worse
Waiting...
Waiting...OP4mo ago
yah its deleted
reflectronic
reflectronic4mo ago
where did these DrivePool.Comm and Cove.Util and stuff come from
Waiting...
Waiting...OP4mo ago
its part of the sln should i delete those?
reflectronic
reflectronic4mo ago
you downloaded the code and added those projects to your solution?
Waiting...
Waiting...OP4mo ago
i used another program to get the code of a program and convert it to a solution file it had a bug where it wouldnt detect one of my usb drives so i was tryna fix it but i cant seem to figure out how to compile should i delete those files ? to fix the run time dependency error? I had a simular error before and i fixed it by going online and downloding the dll for it but this one is different
reflectronic
reflectronic4mo ago
can you show the csproj file for all of these projects that you added
Waiting...
Waiting...OP4mo ago
No description
reflectronic
reflectronic4mo ago
the part at the top is the part i need
Waiting...
Waiting...OP4mo ago
No description
Waiting...
Waiting...OP4mo ago
. i didnt make the csproj file
reflectronic
reflectronic4mo ago
are there more?
Waiting...
Waiting...OP4mo ago
? more what
reflectronic
reflectronic4mo ago
project files
Waiting...
Waiting...OP4mo ago
no
Waiting...
Waiting...OP4mo ago
No description
reflectronic
reflectronic4mo ago
if you open "Visual Studio Developer Powershell," then move into the lib folder with all of those DLLs, and then run
gci *.dll | % { "$_.FullName:"; ildasm $_.FullName | sls "TargetFramework" -context 0,2; "`n" }
gci *.dll | % { "$_.FullName:"; ildasm $_.FullName | sls "TargetFramework" -context 0,2; "`n" }
what does it print
jcotton42
jcotton424mo ago
dlls downloaded off the internet are probably malware
Waiting...
Waiting...OP4mo ago
oh bruh the sln wouldnt open cuz dotnet wont install on my laptop so i used a vm but that also means the built exe will have malware right?
jcotton42
jcotton424mo ago
well okay, they might not be but every single "download this dll" site i've seen has been very sketchy-looking
Waiting...
Waiting...OP4mo ago
damn it opens alot of windows
reflectronic
reflectronic4mo ago
oh uh close them try again with
gci *.dll | % { "$_.FullName:"; ildasm /text $_.FullName | sls "TargetFramework" -context 0,2; "`n" }
gci *.dll | % { "$_.FullName:"; ildasm /text $_.FullName | sls "TargetFramework" -context 0,2; "`n" }
Waiting...
Waiting...OP4mo ago
dotnet frame work v 4.8
reflectronic
reflectronic4mo ago
it says that for all of them?
reflectronic
reflectronic4mo ago
ok how about this one go to the bin folder oh, uh, i guess that is empty hm
Waiting...
Waiting...OP4mo ago
hmmmm
reflectronic
reflectronic4mo ago
ok, well, stay in the lib folder
gci *.dll | % { "$_.FullName:"; ildasm /text $_.FullName | sls ".assembly extern System.Runtime$" -context 0,2; "`n" }
gci *.dll | % { "$_.FullName:"; ildasm /text $_.FullName | sls ".assembly extern System.Runtime$" -context 0,2; "`n" }
Waiting...
Waiting...OP4mo ago
uh its empty
reflectronic
reflectronic4mo ago
hm ok
Waiting...
Waiting...OP4mo ago
No description
reflectronic
reflectronic4mo ago
ok, so, what program did you use to export this csproj
Waiting...
Waiting...OP4mo ago
dotpeek
reflectronic
reflectronic4mo ago
can you try using https://github.com/icsharpcode/ILSpy instead
GitHub
GitHub - icsharpcode/ILSpy: .NET Decompiler with support for PDB ge...
.NET Decompiler with support for PDB generation, ReadyToRun, Metadata (&more) - cross-platform! - icsharpcode/ILSpy
Waiting...
Waiting...OP4mo ago
where is the option to export to sln?
No description
reflectronic
reflectronic4mo ago
Save Code
Waiting...
Waiting...OP4mo ago
Severity Code Description Project File Line Suppression State Error (active) MC1000 Unknown build error, 'Could not find type 'System.Security.SecurityRuleSet' in assembly 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.8\Facades\System.Runtime.dll'.' DrivePool.UI C:\Program Files\dotnet\sdk\8.0.400\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 211 this is the only error now
reflectronic
reflectronic4mo ago
can you send what the new csproj looks like
Waiting...
Waiting...OP4mo ago
No description
reflectronic
reflectronic4mo ago
and the rest of it
Waiting...
Waiting...OP4mo ago
No description
reflectronic
reflectronic4mo ago
where does Microsoft.WindowsAPICodePack.dll come from
Waiting...
Waiting...OP4mo ago
?
reflectronic
reflectronic4mo ago
there is a Microsoft.WindowsAPICodePack.dll somewhere... where is it
Waiting...
Waiting...OP4mo ago
uh where should i check
reflectronic
reflectronic4mo ago
if you do this
No description
reflectronic
reflectronic4mo ago
does Microsoft.WindowsAPICodePack show up in there
Waiting...
Waiting...OP4mo ago
noe
No description
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic4mo ago
the .NET SDK can build .NET Framework projects, even WPF ones
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic4mo ago
yes, the .NET 8 SDK can build .NET 4.8 WPF projects which library is .NET Core
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic4mo ago
i am guessing the problem is that one of the dependencies is referencing System.Runtime.dll, which needs special care on .NET Framework, but because this is decompiled and not done through NuGet it's not there properly and so the XAML compiler is failing i can't figure out which dependency is causing it
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Waiting...
Waiting...OP4mo ago
so am i just cooked? well still thanks for the help
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server