Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono: dependency classes aren't added to solution automatically #11930

Closed
ghost opened this issue Oct 8, 2017 · 13 comments
Closed

Mono: dependency classes aren't added to solution automatically #11930

ghost opened this issue Oct 8, 2017 · 13 comments

Comments

@ghost
Copy link

ghost commented Oct 8, 2017

When you create a base class in a file, and create a deriving class in another file and attach it to a node, the build will fail, complaining that the base class isn't a part of the build.

@khairul169
Copy link
Contributor

Autoload singleton also doesn't added automatically while regenerating the solution after deleting whole project solution..

@neikeq
Copy link
Contributor

neikeq commented Oct 8, 2017

@tagcup What is the build error exactly?

@neikeq neikeq added this to the 3.0 milestone Oct 8, 2017
@neikeq neikeq added the bug label Oct 8, 2017
@ghost
Copy link
Author

ghost commented Oct 8, 2017

The type or namespace name `BaseClass' could not be found. Are you missing an assembly reference?

@ghost
Copy link
Author

ghost commented Oct 8, 2017

Attached an example project demonstrating the issue
monodependency.zip

@neikeq
Copy link
Contributor

neikeq commented Oct 8, 2017

There was a mistake in the example you uploaded. Line 4 of Player.cs should be public class Player : PlayerBase not public class PlayerBase : Player. After changing that, it gives the error you were talking about, because the file which declares PlayerBase is not part of the project.

Can you describe how did you create the file for the base class?

@ghost
Copy link
Author

ghost commented Oct 8, 2017

Yeah, probably sent the wrong file, anyway, that's what I mean.

Can you describe how did you create the file for the base class?

emacs Player.cs. Why should it matter?

@ghost
Copy link
Author

ghost commented Oct 8, 2017

BTW, assuming that globals need to be implemented using a singleton class in a separate file, I also bumped into the issue @khairul169 mentioned too, originally

@ghost
Copy link
Author

ghost commented Oct 8, 2017

Ah maybe you mean that's the kind of thing that would be added along with support for external editors / IDEs?

@neikeq
Copy link
Contributor

neikeq commented Oct 8, 2017

The reason is you didn't create the file from Godot or an IDE, which would have added it automatically.
Right now, there is no way for CSharpScript to know its base CSharpScript, only the base MonoClass, so it can't check that file as well to add it to the project. This will be possible soon though.

@neikeq
Copy link
Contributor

neikeq commented Oct 8, 2017

Also need to check AutoLoads as mentioned above.

@ghost
Copy link
Author

ghost commented Oct 9, 2017

The reason is you didn't create the file from Godot or an IDE, which would have added it manually.

This will be possible soon though.

Yeah, that was kind of the point that I'm trying to make.

Also need to check AutoLoads as mentioned above.

Well, yes, I do reproduce the same problem?

@akien-mga
Copy link
Member

We have now entered release freeze for Godot 3.0 and want to focus only on release critical issues for that milestone. Therefore, we're moving this issue to the 3.1 milestone, though a fix may be made available for a 3.0.x maintenance release after it has been tested in the master branch during 3.1 development. If you consider that this issue is critical enough to warrant blocking the 3.0 release until fixed, please comment so that we can assess it more in-depth.

@akien-mga akien-mga modified the milestones: 3.0, 3.1 Jan 6, 2018
@akien-mga akien-mga modified the milestones: 3.1, 3.2 Jan 9, 2019
@akien-mga akien-mga modified the milestones: 3.2, 4.0 Dec 13, 2019
@akien-mga
Copy link
Member

This seems to have been fixed a long time ago, the project in #11930 (comment) with the fix in #11930 (comment) works fine in 3.5 beta 1, and likely in earlier releases too.

@akien-mga akien-mga modified the milestones: 4.0, 3.5 Jan 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants