-
Couldn't load subscription status.
- Fork 5
Sylecopify + Change project version to Dotnet sdk type. #17
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't accept your PR for a lot of reasons including:
- I can't compile (idk why your mmoved the whole "Compile" sequence in the .csproj)
- NET v4.8.1 used instead of NET v4.8
- Used file-scoped namespace instead of block-scoped namespace
- Your name is in the "companyName"
- Weird unused references added (like BepInEx)
Change this and i will accept the PR (unless i see some other things to change)
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <TargetFramework>net481</TargetFramework> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to net48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really not compatible on linux? The download seems to be available in the same way that net48 is released. Otherwise it shouldn't make much of a difference. This is just how I have my personal plugin template.
https://dotnet.microsoft.com/en-us/download/dotnet-framework/net481
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just a personnal thing, because most of EXILED plugins use .NET 4.8
I remember HSM used .NET 4.8.1 and it was not compatible with .NET 4.8 (most of plugins) projects, so i prefere to use .NET 4.8 instead of .NET 4.8.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I am normally only developing single server projects so I just use 4.8.1 for everything. Because this is an API it should be the lower version of the two allowing either to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why ?
| <PackageReference Include="BepInEx.AssemblyPublicizer" Version="0.5.0-beta.1" ExcludeAssets="RUNTIME" /> | ||
| <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.5.0-beta.1" ExcludeAssets="RUNTIME" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what is this, can you explain to me please ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevents developers from having to manually publicize documents. Saves time and effort making contributions easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice how Publicize="True". This automatically publicizes any assembly with Publicize="True".
<Reference Include="Assembly-CSharp" HintPath="$(EXILED_REFERENCES)\Assembly-CSharp-firstpass.dll" Private="False" Publicize="True"/>There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooooh i see, thats a good thing !
| <PackageReference Include="BepInEx.AssemblyPublicizer" Version="0.5.0-beta.1" ExcludeAssets="RUNTIME" /> | ||
| <PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.5.0-beta.1" ExcludeAssets="RUNTIME" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" /> | ||
| <PackageReference Include="HarmonyX" Version="2.14.0" ExcludeAssets="RUNTIME" /> | ||
| <PackageReference Include="MonoMod.Backports" Version="1.1.2" ExcludeAssets="RUNTIME" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HarmonyX is a modern fork which is an updated form of HarmonyLib. It maintains pretty much all HarmonyLib api endpoints but adds helpful items for transpilers. Generally speaking it is better maintained, and much cleaner for large patches.
Also it is from my plugin template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BepInEx.AssemblyPublicizer - Prevents developers from having to manually publicize documents. Saves time and effort making contributions easier.
HarmonyX - More updated form of Harmony that makes patching safer and easier and fixes some of the older flaws of harmony.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HarmonyX is a modern fork which is an updated form of HarmonyLib. It maintains pretty much all HarmonyLib api endpoints but adds helpful items for transpilers. Generally speaking it is better maintained, and much cleaner for large patches.
Also it is from my plugin template.
but it's still use the default 0Harmony exiled dependency, right ?
Because i used HarmonyLib for this (to not have any dependance for EXILED version)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose with exiled problems may arise. Technically because HarmonyX contains all of the original stubs of HarmonyLib as long as players add HarmonyX instead of HarmonyLib it should work just fine. However if they do not do this problems could occur. It is likely best to remove it. On my servers I just use HarmonyX.
| "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", | ||
| "settings": { | ||
| "documentationRules": { | ||
| "companyName": "Skyfr0676 and Redforce04", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove "and Redforce04"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes, I didn't know what you wanted the license to be. I would also recommend adding a license file.
This is because I converted the
Can Do. I just had this in my default plugin template which is what this .csproj project sdk stems from.
Same thing with the previous item, stemmed from the .csproj project sdk template that I utilized.
I'm still confused as to why Net v4.8 works but not Net v4.8.1. I suppose this shouldn't change anything otherwise though.
The references are used to make contributions easier by removing the need to manually publicize items. Bepinex publicizer effectively is similar to an auto-publicizing source generator which automatically does the publicizing. |
Changes
Styling
Project File (.csproj)
Note: Most of these changes were based off of a standard template I have. Some other small details may have changed because of this, like the build output path or embedded debug pdbs.
Packages
*Note: Occasionally HarmonyX will fight older HarmonyLib dependencies. HarmonyX is the latest harmony version and is a fork of the original project. It still contains all the stubs for older versions of harmony to use. Serverhosts should ensure the version of Harmony is HarmonyX to prevent any potential issues.
Feel free to let me know of any questions or issues. I would highly recommend testing these changes before publicly releasing this as some nullable items may throw NullReferenceExceptions.