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

[release/5.0] Fix EventLog on Windows ARM64 #46598

Merged
merged 6 commits into from
Jan 14, 2021

Conversation

ericstj
Copy link
Member

@ericstj ericstj commented Jan 5, 2021

Backport of #45884 to release/5.0

Fixes: #27742

Customer Impact

When writing to EventLog on a machine without .NETFramework installed messages would be missing their format DLL which is required. The result was that both in both the Event Viewer and in the message returned by our APIs the message would be shown as:

The description for Event ID '{0}' in Source '{1}' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them.  The following information is part of the event:

Followed by the actual message string, when the expectation is that it will only contain the actual message string.

Regression?

No, new architecture (though seen as a regression from .NETFramework/other architectures)

Testing

Added automated tests that validated the content of the message. Forced these tests to fail and then ensured they passed with fix. Validate the content of the newly added resource dll. Manual testing to simulate missing .NETFramework.

Risk

Low. We are growing the size of the package and the application by a small amount by adding a resource DLL but folks who decide they do not want it can choose to remove it from their application and this API will work as before. We've also chosen to keep precedence for the .NETFramework DLL, if it is present, so as not to introduce a new DLL load into existing functional applications in servicing.

* Make EventLog work without .NETFramework

* Use a project file instead of targets to create message DLL

* Add EventLogMessagesTests

* Address feedback

* Exclude EventLogMessage tests on net48

* Apply code review feedback

Also fix one test which would fail on machine without .NETFramework.

* Fix HelpLink test
Update assembly version of EventLog package and build it in
servicing.

Also update the package baseline to ensure that Windows.Compatibility
package gets the new version.
@ghost
Copy link

ghost commented Jan 5, 2021

Tagging subscribers to this area: @tommcdon, @krwq
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #45884 to release/5.0

Fixes: #27742

Customer Impact

When writing to EventLog on a machine without .NETFramework installed messages would be missing their format DLL which is required. The result was that both in both the Event Viewer and in the message returned by our APIs the message would be shown as:

The description for Event ID '{0}' in Source '{1}' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them.  The following information is part of the event:

Followed by the actual message string, when the expectation is that it will only contain the actual message string.

Regression?

No, new architecture (though seen as a regression from .NETFramework/other architectures)

Testing

Added automated tests that validated the content of the message. Forced these tests to fail and then ensured they passed with fix. Validate the content of the newly added resource dll. Manual testing to simulate missing .NETFramework.

Risk

Low. We are growing the size of the package and the application by a small amount by adding a resource DLL but folks who decide they do not want it can choose to remove it from their application and this API will work as before. We've also chosen to keep precedence for the .NETFramework DLL, if it is present, so as not to introduce a new DLL load into existing functional applications in servicing.

Author: ericstj
Assignees: danmosemsft
Labels:

area-System.Diagnostics

Milestone: -

@ericstj ericstj self-assigned this Jan 5, 2021
@ericstj ericstj requested a review from danmoseley January 5, 2021 20:13
5.0 infra doesn't traverse runtime-specific TFMs during restore.

Workaround by referencing Message project everywhere, and only
including it in package on windows.
@Anipik Anipik added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jan 11, 2021
@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 12, 2021
@leecow leecow added this to the 5.0.3 milestone Jan 12, 2021
@danmoseley
Copy link
Member

@Anipik this was approved - is it still "no merge"?

@danmoseley
Copy link
Member

Oh - I recall -it's because we're checking with aspnet about potential impact of a new file.

@Anipik Anipik removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jan 13, 2021
@Anipik
Copy link
Contributor

Anipik commented Jan 13, 2021

@Anipik this was approved - is it still "no merge"?

waiting for the green ci here #46888

@Anipik Anipik merged commit 3b20bc9 into dotnet:release/5.0 Jan 14, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants