-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
added net core behavior #3140
added net core behavior #3140
Conversation
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.
LGTM, @mairaw.
xml/System.Diagnostics/Process.xml
Outdated
The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> member of the <see cref="P:System.Diagnostics.Process.StartInfo" /> property is <see langword="true" /> while <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" />, <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" />, or <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> is <see langword="true" />.</exception> | ||
<exception cref="T:System.ComponentModel.Win32Exception">There was an error in opening the associated file.</exception> | ||
<exception cref="T:System.ObjectDisposedException">The process object has already been disposed.</exception> | ||
<exception cref="T:System.PlatformNotSupportedException">Method not supported on Nano Server machines (.NET Core only).</exception> |
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 think this might happen on Windows Server Core and possibly Windows IoT as well. Also on Linux distros without certain shell compnents. So you might want a more general statement like Method not supported on machines that do not have a shell (.NET Core only)
or something.
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.
Or ... do not have suitable shell support ..
or something
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.
Ok. I'll add Nano Server as an example then.
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.
thanks
@pjanotti question to you while I was reviewing the changes at https://review.docs.microsoft.com/en-us/dotnet/api/system.diagnostics.process.start?view=netframework-4.7&branch=pr-en-us-3140. Should I add that same exception for Process.Start for all overloads instead? |
@mairaw No, only the following overloads that will always throw PNSE: Unix & OSX: public static Process Start(string fileName, string userName, SecureString password, string domain);
public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain); For Windows On UAP/UWP (not sure how this is being called in the docs) attempting to set |
Obrigada @pjanotti! I think I got everything in. |
@@ -1147,6 +1147,7 @@ p.WaitForExit(); | |||
|
|||
]]></format> | |||
</remarks> | |||
<exception cref="T:System.PlatformNotSupportedException">An attempt to set the value on Universal Windows Platform (UWP) apps occurs.</exception> |
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 way that the code behaves is that it throws in UWP if the code attempts to set the value to true, when the value is set to false the code works fine, see https://github.com/dotnet/corefx/commits/master/src/System.Diagnostics.Process/src/System/Diagnostics/ProcessStartInfo.Uap.cs
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.
Good catch @pjanotti! It was my bad!
LGTM |
* fixed broken link (dotnet#3169) * fixed pipes in tables (dotnet#3163) * added info about relative paths for output (dotnet#3042) * added info about relative paths for output * edits * Update how-to-write-a-simple-parallel-for-loop.md (dotnet#3174) Updated Cut to Copy in Copy/Cut and Paste this code into ... * fixed formulas (dotnet#3182) * fixed formulas * fixed formula * fixed formula * simplifying version list (dotnet#3176) * Minor fixes : inconsistent wording and some ghost characters (dotnet#3171) * what's new Tuples : sample use InvariantCulture * vb tuple example fix new language feature sample * minor typos * compiler warning corrected to match previously mentioned number * removed a "ghost" quote * fixed inconsistent "read-only" and "read only" * code formatting (missing space) * Adding C# version history post (dotnet#2867) * Create csharp-version-history.md * Added the actual text * Updated TOC with my entry. * first pass edit 1. Add Metadata 1. Change person 1. Formalize from blog post to docs style language. * Update csharp-version-history.md * fix build warnings on links. * respond to feedback * fixed build warnings * fixed version capitalization * Learn C# Tutorial (#2306) * First draft of new tutorial Learn the structure of a C# program, and explore the string class. proofread and tighten language. respond to feedback 2nd draft Move more code earlier. Tighten vocabulary discussions. Update outline start on the next draft. add section on searching strings fix build errors finish the string tutorial. reorder: ready for proofread. proofread update to use new syntax Update Tutorial to use the new engine typo in the title * build test, try samples * 2nd draft of the numbers tutorial. * proofread the second tutorial and create the third Branching and looping is ready for initial review. * respond to feedback on first tutorial. * proof read 3rd tutorial And add links to other C# Guide content * Remove links to upcoming tutorials. * Respond to feedback. * fix yaml parsing error. * More feedback. * feedback from team review Configure ms.technology for all quick starts to be devlang-csharp-interactive. Update .NET home page and C# Guide home page to point to the interactive tutorials. * Describe booleans, and update metadata. * add a tip about compiler messages * update timings of tutorials, update tip text * final review. * Fix typo: AesCrytpServiceProvider -> AesCryptoServiceProvider (dotnet#3185) * Fix typo: AesCrytpServiceProvider -> AesCryptoServiceProvider * Fix typo: crytopgraphy -> cryptography * added net core behavior (dotnet#3140) * added net core behavior * feedback * feedback * feedback * quick link fix to the hub page (dotnet#3193) The link target was updated for the Quick Starts, but the displayed text was not. * Removed duplicate entry from 'See Also' section (dotnet#3195) * removed invisible characters (dotnet#3192) * update snippet reference (dotnet#3191) * fixed broken link (dotnet#3190) * clarified example (dotnet#3184) * Updating condition(s) under which the method throws (dotnet#3152) * Updating condition(s) under which the method throws * Correcting a few hard-to-localize bits of content * Update mutually recursive functions snippet (dotnet#3186) * Update mutually recursive functions snippet Correct implementation should be something like (this one)[https://en.wikipedia.org/wiki/Mutual_recursion] * Typo fix in function name Event -> Even * 494407 Corrections to DnsSafeHost and IdnHost (dotnet#3143) * 494407 Corrections to DnsSafeHost and IdnHost * Actioning all comments :) * I used the wrong inline code delimiter * Improve Suits and Ranks definitions (dotnet#3197) * update target framework to 2.0 * Improve Suits and Ranks enumerable definitions * Revert "update target framework to 2.0" This reverts commit 008d19d. * Fixed Kelvin output, make culture independent (dotnet#3157) * Fixed Kelvin output, make culture independent - Fixed wrong expected output for Kelvin in the sample usage - Defined current culture in the sample usage to work out-of-the-box for international locales * Remove obsolete full qualified name * CurrentThread.CurrentCulture -> CultureInfo.CurrentCulture * Fixed Kelvin output, make culture independent (dotnet#3159) * Fixed Kelvin output, make culture independent - Fixed wrong expected output for Kelvin in the sample usage - Defined current culture in the sample usage to work out-of-the-box for international locales * Remove obsolete full qualified name * CurrentThread.CurrentCulture -> CultureInfo.CurrentCulture * Remove Duplicate Config Definition (dotnet#3200) For whatever reason, the sample XML was duplicated -- this commit removes that duplication so that the example is more readable. * fixed api link format (dotnet#3194) * Typo in document - IOne instead of One (dotnet#3202) Typo in document - IOne instead of One * Fix framework in dotnet store command topic (dotnet#3188) Reported by @pauliusnorkus. Thanks to @dasMulli for reminding me about the framework problem here. Using `netstandard2.0` worked during pre-release but no more.
* fixed broken link (dotnet#3169) * fixed pipes in tables (dotnet#3163) * added info about relative paths for output (dotnet#3042) * added info about relative paths for output * edits * Update how-to-write-a-simple-parallel-for-loop.md (dotnet#3174) Updated Cut to Copy in Copy/Cut and Paste this code into ... * fixed formulas (dotnet#3182) * fixed formulas * fixed formula * fixed formula * simplifying version list (dotnet#3176) * Minor fixes : inconsistent wording and some ghost characters (dotnet#3171) * what's new Tuples : sample use InvariantCulture * vb tuple example fix new language feature sample * minor typos * compiler warning corrected to match previously mentioned number * removed a "ghost" quote * fixed inconsistent "read-only" and "read only" * code formatting (missing space) * Adding C# version history post (dotnet#2867) * Create csharp-version-history.md * Added the actual text * Updated TOC with my entry. * first pass edit 1. Add Metadata 1. Change person 1. Formalize from blog post to docs style language. * Update csharp-version-history.md * fix build warnings on links. * respond to feedback * fixed build warnings * fixed version capitalization * Learn C# Tutorial (#2306) * First draft of new tutorial Learn the structure of a C# program, and explore the string class. proofread and tighten language. respond to feedback 2nd draft Move more code earlier. Tighten vocabulary discussions. Update outline start on the next draft. add section on searching strings fix build errors finish the string tutorial. reorder: ready for proofread. proofread update to use new syntax Update Tutorial to use the new engine typo in the title * build test, try samples * 2nd draft of the numbers tutorial. * proofread the second tutorial and create the third Branching and looping is ready for initial review. * respond to feedback on first tutorial. * proof read 3rd tutorial And add links to other C# Guide content * Remove links to upcoming tutorials. * Respond to feedback. * fix yaml parsing error. * More feedback. * feedback from team review Configure ms.technology for all quick starts to be devlang-csharp-interactive. Update .NET home page and C# Guide home page to point to the interactive tutorials. * Describe booleans, and update metadata. * add a tip about compiler messages * update timings of tutorials, update tip text * final review. * Fix typo: AesCrytpServiceProvider -> AesCryptoServiceProvider (dotnet#3185) * Fix typo: AesCrytpServiceProvider -> AesCryptoServiceProvider * Fix typo: crytopgraphy -> cryptography * added net core behavior (dotnet#3140) * added net core behavior * feedback * feedback * feedback * quick link fix to the hub page (dotnet#3193) The link target was updated for the Quick Starts, but the displayed text was not. * Removed duplicate entry from 'See Also' section (dotnet#3195) * removed invisible characters (dotnet#3192) * update snippet reference (dotnet#3191) * fixed broken link (dotnet#3190) * clarified example (dotnet#3184) * Updating condition(s) under which the method throws (dotnet#3152) * Updating condition(s) under which the method throws * Correcting a few hard-to-localize bits of content * Update mutually recursive functions snippet (dotnet#3186) * Update mutually recursive functions snippet Correct implementation should be something like (this one)[https://en.wikipedia.org/wiki/Mutual_recursion] * Typo fix in function name Event -> Even * 494407 Corrections to DnsSafeHost and IdnHost (dotnet#3143) * 494407 Corrections to DnsSafeHost and IdnHost * Actioning all comments :) * I used the wrong inline code delimiter * Improve Suits and Ranks definitions (dotnet#3197) * update target framework to 2.0 * Improve Suits and Ranks enumerable definitions * Revert "update target framework to 2.0" This reverts commit 008d19d. * Fixed Kelvin output, make culture independent (dotnet#3157) * Fixed Kelvin output, make culture independent - Fixed wrong expected output for Kelvin in the sample usage - Defined current culture in the sample usage to work out-of-the-box for international locales * Remove obsolete full qualified name * CurrentThread.CurrentCulture -> CultureInfo.CurrentCulture * Fixed Kelvin output, make culture independent (dotnet#3159) * Fixed Kelvin output, make culture independent - Fixed wrong expected output for Kelvin in the sample usage - Defined current culture in the sample usage to work out-of-the-box for international locales * Remove obsolete full qualified name * CurrentThread.CurrentCulture -> CultureInfo.CurrentCulture * Remove Duplicate Config Definition (dotnet#3200) For whatever reason, the sample XML was duplicated -- this commit removes that duplication so that the example is more readable. * fixed api link format (dotnet#3194) * Typo in document - IOne instead of One (dotnet#3202) Typo in document - IOne instead of One * Fix framework in dotnet store command topic (dotnet#3188) Reported by @pauliusnorkus. Thanks to @dasMulli for reminding me about the framework problem here. Using `netstandard2.0` worked during pre-release but no more.
Fixes #3111
/cc @vanillajonathan
Internal Review URLs:
UseShellExecute
Process.Start