-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Allow AppDomain.SetData more than once #8029
Comments
CC @danmosemsft |
@AlexGhiondea any context on why this code exists? It looks like it precedes github: https://referencesource.microsoft.com/#mscorlib/system/appdomain.cs,2444 Unless there's a good reason, we should fix this. If you don't have cycles, LMK and I'll find someone. |
@sepidehms can you do this one for 5/10 ? |
@danmosemsft I can't say for sure I will finish it for 5/10 with two other tasks I need to finish, but I certainly can spend time on this for investigation. |
OK! |
@sepidehms the fix for this is to do something like what I have in this branch: https://github.com/AlexGhiondea/coreclr/tree/MakeSetData |
I have a PR for this here: dotnet/coreclr#11496 |
@ViktorHofer if @sepidehms doesn't have time to do this today could you please get the PR in. |
@danmosemsft the PR is approved -- I am just waiting for CI to complete |
Great - thanks both of you. |
Fixed right @AlexGhiondea |
We need regression test in corefx |
@AlexGhiondea should we move the test part into CoreFX? (we don't have to if it is easier this way) |
I added a test here: |
There seems to be an arbitrary limitation on Core CLR that prevents you from calling
AppDomain.SetData
more than once for the same name.This limitation doesn't exist on .NET Framework.
We use
AppDomain.SetData
in our tests to check our usage ofAppDomain.GetData
. We typically clean up after the test by passingnull
, but this throws.We discovered this by attempting to run our .NET Framework 4.6.1 test code on .NET Core App 2.0.
The text was updated successfully, but these errors were encountered: