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

Please update the format so it excludes this parameter when building in Release mode #506

Open
vulovicv23 opened this issue Feb 7, 2023 · 2 comments

Comments

@vulovicv23
Copy link

Hey guys!

First of all, thank you for awesome work!

I am having trouble when building my .net core 7 app in Release mode, basically, I have this:

 [Time("Inserted {x}")]
    private async Task InsertGame(long? x, Game game)

When I debug it, it works like a charm, but, when I try to create a Release build, it throws this error:
Fody/MethodTimer: Parameter 'x' is not available on the async state machine. Probably it has been optimized away by the compiler. Please update the format so it excludes this parameter.

Tried googling but couldn't find anything on this.

Can you guys please advise what to do from here?

Thanks!

@GeertvanHorrik
Copy link
Member

Are you using obfuscation?

@juanidamato
Copy link

Hi,
I had the same problem.
I figure out I was because I was not using in my code the 'x' parameter
I think optimizer remove it due to not usefull parameter

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

No branches or pull requests

3 participants