C
C#2mo 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...2mo ago
further more googling for the system.runtime ddl version 4.0.0.0 adds some otehr error that probably isnt relevent
reflectronic
reflectronic2mo ago
what does the ouput show
Waiting...
Waiting...2mo 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
reflectronic2mo ago
no, i mean, when you go to "Output," the big text box, what is in it
Waiting...
Waiting...2mo 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
reflectronic2mo ago
are you using NuGet packages?
Waiting...
Waiting...2mo ago
no im not using anything i mean i havent added any the system.runtime reference yet
Waiting...
Waiting...2mo ago
No description
Waiting...
Waiting...2mo ago
(sorry im kind of dumb) adding a dll i found on the internet v4.0.0.0 dosent fix it
reflectronic
reflectronic2mo ago
no, do not do that
Waiting...
Waiting...2mo ago
okay
reflectronic
reflectronic2mo ago
delete that, it will only make things worse
Waiting...
Waiting...2mo ago
yah its deleted
reflectronic
reflectronic2mo ago
where did these DrivePool.Comm and Cove.Util and stuff come from
Waiting...
Waiting...2mo ago
its part of the sln should i delete those?
reflectronic
reflectronic2mo ago
you downloaded the code and added those projects to your solution?
Waiting...
Waiting...2mo 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
reflectronic2mo ago
can you show the csproj file for all of these projects that you added
Waiting...
Waiting...2mo ago
No description
reflectronic
reflectronic2mo ago
the part at the top is the part i need
Waiting...
Waiting...2mo ago
No description
Waiting...
Waiting...2mo ago
. i didnt make the csproj file
reflectronic
reflectronic2mo ago
are there more?
Waiting...
Waiting...2mo ago
? more what
reflectronic
reflectronic2mo ago
project files
Waiting...
Waiting...2mo ago
no
Waiting...
Waiting...2mo ago
No description
reflectronic
reflectronic2mo 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
jcotton422mo ago
dlls downloaded off the internet are probably malware
Waiting...
Waiting...2mo 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
jcotton422mo ago
well okay, they might not be but every single "download this dll" site i've seen has been very sketchy-looking
Waiting...
Waiting...2mo ago
damn it opens alot of windows
reflectronic
reflectronic2mo 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...2mo ago
dotnet frame work v 4.8
reflectronic
reflectronic2mo ago
it says that for all of them?
reflectronic
reflectronic2mo ago
ok how about this one go to the bin folder oh, uh, i guess that is empty hm
Waiting...
Waiting...2mo ago
hmmmm
reflectronic
reflectronic2mo 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...2mo ago
uh its empty
reflectronic
reflectronic2mo ago
hm ok
Waiting...
Waiting...2mo ago
No description
reflectronic
reflectronic2mo ago
ok, so, what program did you use to export this csproj
Waiting...
Waiting...2mo ago
dotpeek
reflectronic
reflectronic2mo 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...2mo ago
where is the option to export to sln?
No description
reflectronic
reflectronic2mo ago
Save Code
Waiting...
Waiting...2mo 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
reflectronic2mo ago
can you send what the new csproj looks like
Waiting...
Waiting...2mo ago
No description
reflectronic
reflectronic2mo ago
and the rest of it
Waiting...
Waiting...2mo ago
No description
reflectronic
reflectronic2mo ago
where does Microsoft.WindowsAPICodePack.dll come from
Waiting...
Waiting...2mo ago
?
reflectronic
reflectronic2mo ago
there is a Microsoft.WindowsAPICodePack.dll somewhere... where is it
Waiting...
Waiting...2mo ago
uh where should i check
reflectronic
reflectronic2mo ago
if you do this
No description
reflectronic
reflectronic2mo ago
does Microsoft.WindowsAPICodePack show up in there
Waiting...
Waiting...2mo ago
noe
No description
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic2mo ago
the .NET SDK can build .NET Framework projects, even WPF ones
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic2mo ago
yes, the .NET 8 SDK can build .NET 4.8 WPF projects which library is .NET Core
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
reflectronic
reflectronic2mo 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 User2mo ago
Message Not Public
Sign In & Join Server To View
Waiting...
Waiting...2mo ago
so am i just cooked? well still thanks for the help
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server