gibbed / Gibbed.Borderlands2

Tools & code for use with Borderlands 2.
zlib License
635 stars 143 forks source link

Requiring reference to netstandard 2.0 #139

Open LynnRobert opened 4 years ago

LynnRobert commented 4 years ago

I keep getting the following error when I opened the codes on my computer:

MemoryStream innerUncompressedData The type 'Stream' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

VS code reports 47 of the same problem in projects/Gibbed.Borderlands2.FileFormats/SaveFile.cs So none of the methods about Stream or MemoryStream works. ( ReadBytes, WriteValueS32, etc.)

I tried to add the following part to Gibbed.Borderlands2.FileFormats.csproj but it doesn't help. `

`

And if I change the target framework to this <TargetFramework>netstandard2.0;net40</TargetFramework>

I get errors like

C:\Users......vscode\extensions\ms-vscode.csharp-1.15.2.omnisharp\1.30.1\msbuild\15.0\Bin\Microsoft.Common.CurrentVersion.targets(1603,5): Error: Project '..\Gibbed.Borderlands2.ProtoBufFormats\Gibbed.Borderlands2.ProtoBufFormats.csproj' targets 'net40'. It cannot be referenced by a project that targets '_,Version=v4.0'.

I have on my computer .NET framework 4 and 4.8, .Net Core SDK 3.1.201, and using c# extension version 1.15.2 for VS code.

Could anyone help me with this issue? Didn't have any experience with .net before, so if you need additional info pls tell me.

gibbed commented 4 years ago

Did e2a9b46 possibly fix this for you?

But if you don't have .NET Standard 2.0 available, you should be able to safely remove it from any projects that reference it-- it's not actually used by the BL2 projects.