Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

ConfigurationManager fix for UAPAOT #20488

Merged
merged 2 commits into from
May 31, 2017
Merged

ConfigurationManager fix for UAPAOT #20488

merged 2 commits into from
May 31, 2017

Conversation

tijoytom-zz
Copy link
Contributor

@tijoytom-zz tijoytom-zz commented May 31, 2017

Use Assembly.CodeBase is not available on
uapaot,replacing with
Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
assembly.ManifestModule.Name)

Use Assembly.CodeBase is not available on
uapaot,replacing with
Path.Combine(AppDomain.CurrentDomain.BaseDirectory,
assemblyName.Name)
@tijoytom-zz
Copy link
Contributor Author

@atsushikan

@stephentoub
Copy link
Member

cc: @JeremyKuhne

@danmoseley
Copy link
Member

@tijoytom per the email thread last week, do I understand right that @MichalStrehovsky will be enabling Assembly.CodeBase to produce something reasonable? Ie., you just don't want to hold up on that.

@@ -60,15 +60,17 @@ private ClientConfigPaths(string exePath, bool includeUserConfig)
// used for local paths and "file://" for UNCs. Simply removing the prefix will make
// local paths relative on Unix (e.g. "file:///home" will become "home" instead of
// "/home").
Uri uri = new Uri(exeAssembly.CodeBase);
string configBasePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, exeAssembly.GetName().Name);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're not using exeAssembly.ManifestModule.Name?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK , I will use ManifestModule.Name then

@MichalStrehovsky
Copy link
Member

do I understand right that @MichalStrehovsky will be enabling Assembly.CodeBase to produce something reasonable

@atsushikan would be the one making that change. After a lengthy email discussion we decided that on Project N, in cases when the original managed assemblies no longer exist because they were fully nativized, CodeBase will return what ManifestModule.Name would return - so not a full path. It's what Mono is doing, and it's not usable for this scenario because of the lack of a rooted path.

@tijoytom-zz
Copy link
Contributor Author

restest Innerloop netfx Windows_NT Debug x86 Build and Test

@tijoytom-zz
Copy link
Contributor Author

retest Portable Linux x64 Debug Build

@tijoytom-zz
Copy link
Contributor Author

Portable Linux x64 Debug Build failure seems to be infrastructure

@tijoytom-zz
Copy link
Contributor Author

@JeremyKuhne Is this good for merge?

@tijoytom-zz tijoytom-zz merged commit 6db3bbd into dotnet:master May 31, 2017
@JeremyKuhne
Copy link
Member

Sorry, I was OOF. Looks good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants