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

Using task scheduler with System.Runtime.InteropServices in .NET FRAMEWORK 4.5 #980

Closed
Preethiravi196 opened this issue Jan 9, 2024 · 0 comments

Comments

@Preethiravi196
Copy link

Preethiravi196 commented Jan 9, 2024

Describe the bug
I am using CallerMemberName and CallerLineNumber from System.Runtime.InteropServices to get the method name and line number for the purpose of logging. System.Runtime.InteropServices resolves from mscorlib. After including TaskScheduler, I am getting an error that CallerLineNumberAttribute type already exist since TaskScheduler have their own custom System.Runtime.InteropServices.

To Reproduce
Steps to reproduce the behavior:
-> Create a WPF project in visual studio 2019 with .NET framework 4.5 and then include task scheduler package. Use CallerMemberName from System.Runtime.CompilerServices.

-> On compilation you will get the below error,

Severity Code Description Project File Line Suppression State
Error CS0433 The type 'CallerLineNumberAttribute' exists in both 'Microsoft.Win32.TaskScheduler, Version=2.10.1.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da' and 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Expected behavior
I want to include task scheduler. Also I want to use CallerMemberName for logging purpose where it should resolve properly from System.Runtime.CompilerServices.

Environment (please complete the following information):
OS - Windows 11 Pro
Task Scheduler version - 2.10.1

@Preethiravi196 Preethiravi196 closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 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

No branches or pull requests

1 participant