Code Monkey home page Code Monkey logo

Comments (3)

Krinkle avatar Krinkle commented on July 18, 2024

Hm.. if i understand this .NET Standard page correctly, the newer/stable/slimmer target that Mono and dotnet both support isn't netcoreapp but netstandard. Looks like netstandard2.0 would be a good place to start.

When compiling the project with netstandard2.0, there are two groups of issues.

Primary reference "System".
/Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3245: Could not resolve this reference.
Could not locate the assembly "System". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

Primary reference "System.Data".
/Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3245: Could not resolve this reference.
Could not locate the assembly "System.Data". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

Primary reference "System.Web".
/Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3245: Could not resolve this reference.
Could not locate the assembly "System.Web". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

Primary reference "System.Xml".
/Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3245: Could not resolve this reference.
Could not locate the assembly "System.Xml". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

and

Program.cs(13,27): error CS0012: The type 'Object' is defined in an assembly that is not referenced.
You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]
…
obj/Debug/CVNBot.AssemblyInfo.cs(14,19): error CS0234: The type or namespace name 'Reflection' does not exist in the namespace 'System' (are you missing an assembly reference?) [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]
…
obj/Debug/CVNBot.AssemblyInfo.cs(14,55): error CS0518: Predefined type 'System.String' is not defined or imported [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]
…

452 Errors, continued…

from labs-countervandalism-cvnbot.

Krinkle avatar Krinkle commented on July 18, 2024

The first error has a pretty clear instruction:

You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

Although I wasn't quite sure how/where to add this, I quickly found a random example on the internet, that demonstrates it, so followed its example, which brings the diff to:

-    <TargetFramework>netcoreapp3.1</TargetFramework>
+    <TargetFramework>netstandard2.0</TargetFramework>
@@ -32,10 +32,11 @@
+    <Reference Include="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" />
-    <Reference Include="System" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Web" />
-    <Reference Include="System.Xml" />
+    <Reference Include="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" />
+    <Reference Include="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" />
+    <Reference Include="System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" />
+    <Reference Include="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" />``` 

However, I'm not sure I did that right:

/Library/Frameworks/Mono.framework/Versions/6.8.0/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3106: Assembly strong name "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e08" is either a path which could not be found or it is a full assembly name which is badly formed. If it is a full assembly name it may contain characters that need to be escaped with backslash(\). Those characters are Equals(=), Comma(,), Quote("), Apostrophe('), Backslash(\). [/Users/krinkle/Development/CVNBot/src/CVNBot/CVNBot.csproj]

... followed by 100s of similar errors to the ones I got before.

from labs-countervandalism-cvnbot.

Krinkle avatar Krinkle commented on July 18, 2024

Closing in favour of #73.

from labs-countervandalism-cvnbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.