When are you going to ship netstandard.xml so we finally get XML documentation in VS?

Currently, the Unity experience does not provide IntelliSense documentation for the .NET Framework.

Rather, what one has to do to get this to work is as follows:

  • find the version Unity uses by looking at its version in C:\Program Files\Unity\Hub\Editor\VERSION\Editor\Data\NetStandard\ref\2.1.0\netstandard.dll
  • find closest NuGet package that matches the version, in this case it’s NuGet Gallery | NETStandard.Library.Ref 2.1.0
  • download it and copy netstandard.xml from it next to netstandard.dll
  • restart Visual Studio

At this point, one can finally see IntelliSense documentation.

Please fix that so one doesn’t have to perform all these steps at every upgrade of Unity.

Thank you :slight_smile:

6 Likes

Unity doesn’t care about programmers. They didnt do it in five years, they’ll never do it. Expect new awesome features though! -.-

3 Likes

Thanks for reporting this issue. At this point we don’t plan to add this documentation with the Unity installation, unfortunately. We’re working now on moving the Unity ecosystem to .NET Core, so our efforts are focused there.

You can follow that development on this forum thread: Unity Future .NET Development Status

I realize that this is not the ideal answer, but we have limited resources, and so we’ve chosen not to pursue this.

6 Likes

Thanks for the heads up:)

Is this the legal problem? Because it seems like you would only have to include one more file (~15mb) in the shipped editor files – I can’t really imagine any other reasons than legal or organizational standing in the way. I know that there are priorities in agile but making a 15min detour to add something this useful should be seriously considered imho… Sorry if I come out rude, but this is incredibly frustrating…

3 Likes

No, it is not a legal problem based on anything I am aware of. However it is more than a 15 minute fix. We need to ensure that it works properly, is tested (manually and automatically), ensure that these new files never accidentally end up in a player build, back port the change to relevant versions, ensure that it works in all supported IDEs, etc.

I’m not trying to make excuses, but just want to mention that the solution in not trivial.

4 Likes

Bureaucracy… when the papers one has to fill beforehand take way more time than the thing itself… :smile:

@JoshPeterson , thanks anyway! :slight_smile:

I wouldn’t call it bureaucracy - at least I did not intend to apply that all of this is unnecessary. In fact theses tests and back ports, etc. are necessary - just part of the cost of shipping and supporting something.

1 Like

That’s not bureaucracy. That’s sound processes to ensure that a large-scale, mass-distributed software such as Unity has a certain level of stability.

From Simple English Wikipedia, the free encyclopedia :smile:

Bureaucracy is the structure and set of rules that control the activities of people that work for large organizations and government.
It is characterized by standardized procedure (rule-following)…

I literally didn’t mean the negative connotation the word has today! It’s just that, as you mentioned, you have to follow a strict procedure even for the simplest things, which is perfectly understandable according the environment you’re working in; you can’t simply push stuff as you’d like, there’s a set of rules to follow.

Folks, have a great week-end. :slight_smile:

1 Like

I wonder if there’s a potential way for users to add this themselves with very little work on Unity’s side. Perhaps just a mechanism which makes it easier to patch. Strategies like that can often be hard to approve though.

1 Like

It depends if “copy paste from existing dotnet installation into editor folder” is considered a “simple patchable way”. If not, then there is also a solution/hack that editor plugin providers could prompt users to download additional XML files for in-editor documentation and patch the editor instance. Another could be pointing unity to existing dotnet files instead of using shipped ones, but this (I imagine) is even bigger feat for dev team than adding the netstandard.xml file to the build.

I think the biggest problem right now is lack of help in this matter - you have to 1) notice that you are missing docs and 2) find the help by yourself that you have to copy-paste one specific file into editor installation dir.

The “solution” (hack) seems to have stopped working, because as of recently the decompiled sources point to different dlls in Unity/Editor/2022.1.22f1/Editor/Data/UnityReferenceAssemblies/..., all of which seem to be missing .xml files. Actually it’s (almost certainly) due to the API compatibility I changed in the project settings from the Net Standard 2.x to .Net Framework 4.x as explained below. With compatibility option set to that, adding netstandard.xml doesn’t solve anything, because decompiled sources point to a collection of different DLLs instead of this single one netstandard.dll file, which means that all of those dlls require it’s own xml.

This is beyond annoying, it actively prevents me from working offline, because all symbols redirect me to online microsoft docs. Now I probably have to skim through system libraries and hunt for all kinds of different *.xml files, and guess if versions match or not. I don’t even know since when this changed, because recently everything was ok, But only now have I noticed after minor version updates (2022.1.22f1) that they are missing again.

I suspect when I started using dynamic keyword (introduced by .net 4) the API compatibility changed to .Net Framework, and now all decompiled sources point to those files mentioned above instead of netstandard.dll. I have to copy all xmls now using trial and error…

I managed to add SOME support but I don’t know if those symbols are compatible…
I bundled together xmls and wrote a simple script that creates symlinks to those xmls in the appropriate directories of unity editor. If someone else is just like me trying to have this basic functionality in unity for .Net Standard and .Net Framework API compatibility, then here you go…

It’s still working here,

Source:

Target:
C:\Program Files\Unity\Hub\Editor\2022.2.6f1\Editor\Data\NetStandard\ref\2.1.0

1 Like

I added the netstandard.xml file to the target location but it didn’t work.
I removed .dll from system.Xml.dll from C:\Program Files\Unity\Hub\Editor\2022.3.21f1\Editor\Data\NetStandard\compat\2.1.0\shims\netfx which is giving me the hints for system namespace.
edit: I reinstalled and tried it and it worked, but not for all classes.