-
Notifications
You must be signed in to change notification settings - Fork 326
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
Loading native dll's correctly for UWP release mode #1234
Loading native dll's correctly for UWP release mode #1234
Conversation
public PlatformArchitecture GetCurrentProcessArchitecture() | ||
{ | ||
// On ARM machines you cannot run x64/x86 process, so OS is ARM, we can safely say current process is ARM | ||
if (Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE").Contains("ARM")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering how does Android/ARM devices specify this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ARM does have a 32bit and 64bit concept as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know that, but we currently do not have arm64 bits for native dll's that we are invoking. Are we saying we officially support running for arm64?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec is not clear here. Implementation is incomplete - confusing OS architecture with Process Architecture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've mentioned this in the comment "// On ARM machines you cannot run x64/x86 process, so OS is ARM, we can safely say current process is ARM"
Yes, I'm using OS Architecture to determine, but that is for ARM processes.
Another way would be to read the PE header of current process, which is certainly not good.
@@ -42,6 +42,18 @@ public interface IProcessHelper | |||
string GetTestEngineDirectory(); | |||
|
|||
/// <summary> | |||
/// Gets the location of msdia140.dll, depending on current process architecture.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: may not hardcode name of a consumed assembly here. It could be anything, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msdia, is just an example here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move it to remarks
section in that case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
@@ -556,19 +556,11 @@ internal static class DiaSourceObject | |||
|
|||
public static IDiaDataSource GetDiaSourceObject() | |||
{ | |||
var currentDirectory = new ProcessHelper().GetCurrentProcessLocation(); | |||
var currentDirectory = new ProcessHelper().GetNativeDllDirectory(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename. nativeDllDirectory may not be currentDirectory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave a comment
* Loading native dll's correctly for UWP release mode * nit's * decouple process bitness with OS Architecture
* Object Model Api fix (#1231) * Adding the missing property LocalExtensionData in TestCase * Fixed the test. * Do not crash data collector if a extension initialize fails. (#1230) * Do not crash data collector if a extension initialize fails. * Add unit tests for the scenario. * Fix for changes in XPathNavigator for netcoreapp2.0 (#1226) * Fix for changes in XPathNavigator in netcoreapp2.0 * Removed IXPathNavigable. * Use TPv2 as default for .NET 3.5. (#1232) * Loading native dll's correctly for UWP release mode (#1234) * Loading native dll's correctly for UWP release mode * nit's * decouple process bitness with OS Architecture * HardCoded version of CLI to 2.1.0-preview1-007372 (#1238) HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues. Reverted to old version of CLI because of dotnet/cli#7921 * Added null check for parent node. * Added conditional statements to support building against netcoreapp1.0 * Get OSArchitecture from Platform Abstraction to check for ARM Processor (#1242) * GetOsArchitecture from Platform Abstraction to check for ARM * making sure path is always small
* Loading native dll's correctly for UWP release mode * nit's * decouple process bitness with OS Architecture
* Object Model Api fix (#1231) * Adding the missing property LocalExtensionData in TestCase * Fixed the test. * Do not crash data collector if a extension initialize fails. (#1230) * Do not crash data collector if a extension initialize fails. * Add unit tests for the scenario. * Use TPv2 as default for .NET 3.5. (#1232) * Loading native dll's correctly for UWP release mode (#1234) * Loading native dll's correctly for UWP release mode * nit's * decouple process bitness with OS Architecture * HardCoded version of CLI to 2.1.0-preview1-007372 (#1238) HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues. Reverted to old version of CLI because of dotnet/cli#7921 * Get OSArchitecture from Platform Abstraction to check for ARM Processor (#1242) * GetOsArchitecture from Platform Abstraction to check for ARM * making sure path is always small
Issue: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/VS.in%20Agile%20Testing%20IDE/_workitems/edit/516264