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

TargetType attribute cannot be specified multiple times #849

Open
BadMagic100 opened this issue Apr 27, 2024 · 0 comments
Open

TargetType attribute cannot be specified multiple times #849

BadMagic100 opened this issue Apr 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@BadMagic100
Copy link

What happened?

The docs state that

You're able to specify additional [TargetType] attributes to specify more types to run the patcher for

In practice, if you actually do this, you receive the compiler error "CS0579: Duplicate 'TargetType' attribute."

Steps to reproduce

Minimal reproducer

[PatcherPluginInfo("com.badmagic.grimepreloaderplugin", "Grime Preloader Patchers", "0.1.0")]
public class GrimePrepatcher : BasePatcher
{
	[TargetType("Rewired_Core.dll", "Rewired.Utils.Classes.Data.IndexedDictionary`2")]
	[TargetType("Rewired_Core.dll", "Rewired.Utils.Classes.Data.ADictionary`2")]
	public void PatchDictionaryType(TypeDefinition type)
	{
	}
}

BepInEx Distribution

Bleeding Edge from BepisBuilds

Log outputs

No response

Environment

- OS: Windows 10 (probably not relevant)
- BepInEx: 6.0.0-be.688
- Game: GRIME
@BadMagic100 BadMagic100 added the bug Something isn't working label Apr 27, 2024
@BadMagic100 BadMagic100 changed the title Actually allow multiple TargetType attributes on preloader patchers TargetType attribute cannot be specified multiple times Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant