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

#706 Cuases misbehaviour on server 2008r2 #715

Closed
Vidarls opened this issue Mar 26, 2015 · 4 comments
Closed

#706 Cuases misbehaviour on server 2008r2 #715

Vidarls opened this issue Mar 26, 2015 · 4 comments

Comments

@Vidarls
Copy link

Vidarls commented Mar 26, 2015

System.Environment.SystemDirectory: "C:\Windows\system32"
(environVar SystemRoot): "C:\Windows"

When trying to find .net install dir using targetplatformprefix (https://github.com/fsharp/FAKE/blob/5d1e93e903cc53edd16dee201f48fa09024a71a0/src/app/FakeLib/EnvironmentHelper.fs#L111) it fails due to starting search in system32

Can you please revert until we have a better x-platform fix @forki ?

@forki
Copy link
Member

forki commented Mar 26, 2015

cc @bbenoist
ok will revert.

@forki forki closed this as completed in 4b4f052 Mar 26, 2015
@Vidarls
Copy link
Author

Vidarls commented Mar 26, 2015

Thanks.

Problem => Have lunch => Problem solved, I could get used to this..

@bbenoist
Copy link
Contributor

My bad, I always use %windir% instead of %SystemRoot% and misleaded it with System.Environment.SystemDirectory by using my System 1 😕

I should have used System.Environment.GetFolderPath(System.Environment.SpecialFolder.Windows) (present since .NET 4.0) instead.

@forki Are you OK to apply the following refactoring and deprecate SystemRoot?

/// The fully qualified path of the Windows directory. Typically "C:\Windows".
let WindowsDirectory = Environment.GetFolderPath Environment.SpecialFolder.Windows

/// The fully qualified path of the system directory. Typically "C:\Windows\System32".
let SystemDirectory = Environment.SystemDirectory

/// Deprecated, please use WindowsDirectory instead.
let SystemRoot = WindowsDirectory

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

3 participants