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

Change gen.cs file location #18

Closed
wants to merge 4 commits into from
Closed

Change gen.cs file location #18

wants to merge 4 commits into from

Conversation

smellilac
Copy link
Contributor

Previously, your .csproj file was configured to create a gen.cs file. at the intermediate level ( Debug/.net/... ). Therefore, Visual Studio (possible problem with other code editors) cannot include the gen.cs file in the assembly. Because of this, I did not have the Builtin class (CS0246). So I moved the gen.cs file to the project root folder.

Copy link

deepsource-io bot commented Jul 21, 2024

Here's the code health analysis summary for commits bf137bf..ed20f5c. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C# LogoC#✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@smellilac
Copy link
Contributor Author

Sorry about the previous ones pullrequests, sometimes GPG just kills 😁

@HEJOK254 HEJOK254 self-requested a review July 21, 2024 18:32
@HEJOK254
Copy link
Owner

I'm thinking of changing the GeneratedFiles directory to just Generated, as I think it would sound better, and also it's already in the .gitignore

Not sure however if it shouldn't just be left as GeneratedFiles and added to the .gitignore, so it's not confused with the Generated directory that was already added to the .gitignore.

The actual gen.cs file shouldn't be tracked, since it's generated automatically on build, and not supposed to be edited manually.

@HEJOK254 HEJOK254 changed the title Changing the location of the gen.cs file Change gen.cs file location Jul 21, 2024
@smellilac
Copy link
Contributor Author

I'm thinking of changing the GeneratedFiles directory to just Generated, as I think it would sound better, and also it's already in the .gitignore

Not sure however if it shouldn't just be left as GeneratedFiles and added to the .gitignore, so it's not confused with the Generated directory that was already added to the .gitignore.

The actual gen.cs file shouldn't be tracked, since it's generated automatically on build, and not supposed to be edited manually.

It seems to me that given the current and potential size of the project, this is not so important, I mean that there will be no confusion with the names and the name of the folder reflects its essence.

As for the rest, yes, it’s really worth adding gen.cs to GeneratedFiles in gitignore.

If you agree, then I will do it

@HEJOK254
Copy link
Owner

It seems to me that given the current and potential size of the project, this is not so important, I mean that there will be no confusion with the names and the name of the folder reflects its essence.

As for the rest, yes, it’s really worth adding gen.cs to GeneratedFiles in gitignore.

If you agree, then I will do it

Good point
Besides, we can always change it later

You can change it, and I'll merge the PR.
Just remember to delete the gen.cs file. The Generated directory should already be in the .gitignore

@HEJOK254
Copy link
Owner

It seems like the build check is failing, which is probably just an issue with the workflow. I'll check if it builds correctly on my machine when I have time in about 2h and merge it.

Gonna have to fix the workflow aswell

@smellilac
Copy link
Contributor Author

It seems like the build check is failing, which is probably just an issue with the workflow. I'll check if it builds correctly on my machine when I have time in about 2h and merge it.

Gonna have to fix the workflow aswell

The problem is that the compiler recognizes the Builtin class late. I tried to solve this, but did not find an adequate way to communicate the build time using code.

@HEJOK254
Copy link
Owner

After reading a bit, it turns out that everything that had to be done was just changing BeforeTargets in the Date build target. Now it works even with the old path, which uses $(IntermediateOutputPath), which I think is a better approach, since it doesn't clutter the project files. Please try it on your own machine and tell me if it works or not.

Sorry I'm finding out about this so late :/

I think if you could revert the commits in the PR and change BeforeTargets to something like CoreCompile, which seems to work properly, I could rename and merge the PR. Or you could close this one and open a new one, idk

@smellilac smellilac closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants