Commit graph

135 commits

Author SHA1 Message Date
Mike Richmond f2b9f7d5ab Add WindowsUBR to Get-ComputerInfo (#2995) 2017-01-23 13:07:38 -08:00
Jason Shirk 02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Dave Wyatt 177c99de93 Adding ValidateNotNullOrEmpty attribute to parameters listed in #2672 (#2685) 2016-12-08 10:28:55 -08:00
Naadir Jeewa 32a8601f92 Rebase onto .NET Core 1.1 (#2737)
* Rebase onto .NET Core 1.1

Modify `Build.psm1` and `project.json` files to use .NET Core 1.1.

.NET Core 1.1 ships with an older dotnet/cli than has currently been used,
so we revert to use case-sensitive directory names for dependencies.

.NET Core 1.1 is a pre-requisite for supporting Fedora 24.

* PSReadLine: Bump major version of PSReadline to 6.0.0-*

* Microsoft.PowerShell.Commands.Utility: Bump major version of Microsoft.CodeAnalysis.Csharp

* Microsoft.PowerShell.SDK: Revert attempt to import netcoreapp1.1 instead of dnxcore

* build.psm1: Restore ability to specify version of dotnet-install.sh
2016-12-07 18:29:21 -08:00
Jason Shirk (POWERSHELL) 386b4f37f4 Remove CheckForSevereException and private FailFast
Our private implementation of FailFast was likely introduced
when each individual application needed it's own code to
get Watson reports. The CLR takes care of this for us now,
so we don't need our implementation.

Our method CheckForSevereException was also introduced in
the early days of the CLR - the exceptions it was checking
for aren't actually raised the CLR anymore, they just FailFast.
I removed them as there is a tiny bit of overhead (in code size)
and also in the generated code, e.g. dynamic sites called the method.
2016-12-01 13:46:56 -08:00
iSazonov d543195bd4 Fix Verbs<> class strings #2716 (#2762)
* Fix Verbs
* Replace `-runspace` with `-Session`
2016-11-23 09:19:15 -08:00
Aditya Patwardhan b18adb85d4 Add OpenCover PS Module to collect code coverage (#2585)
* Add OpenCover PS Module to collect code coverage

OpenCover PS Module helps is collecting Code Coverage using the OpenCover
toolset. The module helps in comparing two code coverage runs as well.

* Change OpenCover.psd1 to ASCII

* Fix an error in path for OpenCover

Fixed an error on path for OpenCover. Also used ZipFile class instead of
cmdlet as it might not be available on CI system.

* Convert module to be Powershell v4 compliant

Changed implementation from classes to PSObjects and implemented
Expand-ZipArchive.

* Added CodeCoverage as a configuration to project.json files

Added CodeCoverage as the new configuration for all the project.json
files. When Start-PSBuild is executed with configuration as CodeCoverage,
we change the degubType to 'full' as required by OpenCover toolset.

Also made changes to appveyor.psm1 to build a CodeCoverage package on
daily builds and publish it as a zip.

* Addressed code review comments

Changed from Add-Member to use pscustomobject type accelator. Removed
[gc]::collect.

* Added explicit garbage collection

* Addressed code review comments

- Make sure that the build Start-PSPackage gets is not a code coverage
  build
- Add debugType = full for FullCLR
- Remove configurations from PackageManagement files as it is not needed.
- Build CodeCoverage build first in AppVeyor.

* Resolve merge conflict

* Fix indentation

* Fix newline at end of file

* Added command discovery for locating OpenCover.console.exe
2016-11-11 11:12:07 -08:00
Dongbo Wang f96dcbb016 Update project version to 6.0.0 to match our release version 2016-11-04 16:33:35 -07:00
Hemant Mahawar 67638548fc Add ValidateNullOrEmpty to -Name parameter of Get-Service (#2542)
* Adding validation to Get-Service -Name parameter
2016-10-27 16:37:50 -07:00
Dongbo Wang 54cb65bbf2 Move *.csproj files to PowerShell/src/vs-csproj and PowerShell/test/vs-csproj to avoid confusing the latest dotnet.exe.
If a *.csproj file is in a project directory, the latest dotnet.exe will use it, instead of the project.json file, to build the project.
2016-10-21 14:12:10 -07:00
Mike Richmond 3bbeabf6bc Adding WindowsVersion to Get-ComputerInfo 2016-10-19 14:59:38 -07:00
Dongbo Wang 2e402cfef1 Update powershell to depend on latest dotnet core packages (preview1-24530-04 from 9/30/2016) 2016-10-14 10:02:44 -07:00
Jason Shirk (POWERSHELL) f252683e90 Remove SessionStateOverflowException
This exception is no longer used by PowerShell, so it has been removed.

It is a public api, so removing it risks breaking somebody. Nobody has any reason
to catch or throw this exception, so it seems safe to remove, but I decided to
be conservative and keep it for Windows PowerShell.  It seems safe enough to remove
in Nano.
2016-09-28 15:47:08 -07:00
Sergei Vorobev 6992a6479a Merge pull request #2260 from jsoref/spelling-public
Fix spelling in public APIs
2016-09-19 17:33:46 -07:00
charub 3d7beb4425 Provide an unsupported message for 'Verb' parameter (#1691)
Add the 'Verb' parameter to Powershell core and add an unsupported message
for the same.
2016-09-15 10:50:36 -07:00
Josh Soref fb467d497d spelling: error ids in ErrorRecord (#2258) 2016-09-14 12:51:07 -07:00
Josh Soref 0bba0328bc spelling: public identifiers in src/Microsoft.PowerShell.Commands.Management 2016-09-01 16:08:57 +00:00
Josh Soref 281f2a3ea1 spelling: locals in src/Microsoft.PowerShell.Commands.Management 2016-08-28 07:12:42 +00:00
Dongbo Wang 58a2ba730d Merge pull request #2046 from xiaoyinl/use-https-links
Use HTTPS links for go.microsoft.com
2016-09-01 17:23:09 -07:00
Josh Soref 1ad8dec8d2 spelling: display messages (#2135)
spelling: resource strings (display messages and comments)
2016-08-31 14:35:28 -07:00
Dave Wyatt 22aac12c3e Add support for multiple paths to Join-Path
Multiple child paths can be specified via the new positional parameter -AdditionalChildPath.
2016-08-31 13:48:31 -07:00
Sergei Vorobev f12c936803 Merge pull request #2106 from jsoref/spelling-debug
spelling: debug

- Fix spelling in debug asserts and tracing
- Fix telemetry event name for PackageManagement
2016-08-30 15:45:46 -07:00
Josh Soref 2f980faac5 spelling: debug, tracer, ... 2016-08-29 18:06:24 +00:00
Josh Soref 94a3d3b0b8 spelling: comments in src/Microsoft.PowerShell.Commands.Management/commands 2016-08-28 06:15:04 +00:00
Josh Soref eb3fd7ae6c Spelling comments (#2066)
* spelling: comments in src/Microsoft.Management.Infrastructure.CimCmdlets

* spelling: comments in src/Microsoft.PackageManagement.ArchiverProviders

* spelling: comments in src/Microsoft.PackageManagement.CoreProviders

* spelling: comments in src/Microsoft.PackageManagement.MetaProvider.PowerShell

* spelling: comments in src/Microsoft.PackageManagement.MsiProvider

* spelling: comments in src/Microsoft.PackageManagement.MsuProvider

* spelling: comments in src/Microsoft.PackageManagement.NuGetProvider

* spelling: comments in src/Microsoft.PackageManagement.PackageSourceListProvider

* spelling: comments in src/Microsoft.PackageManagement

* spelling: comments in src/Microsoft.PowerShell.Activities

* spelling: comments in src/Microsoft.PowerShell.Commands.Diagnostics

* spelling: comments in src/Microsoft.PowerShell.Commands.Management

* spelling: comments in src/Microsoft.PowerShell.Commands.Utility

* spelling: comments in src/Microsoft.PowerShell.ConsoleHost

* spelling: comments in src/Microsoft.PowerShell.Core.Activities

* spelling: comments in src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext

* spelling: comments in src/Microsoft.PowerShell.CoreCLR.Eventing

* spelling: comments in src/Microsoft.PowerShell.Diagnostics.Activities

* spelling: comments in src/Microsoft.PowerShell.GraphicalHost

* spelling: comments in src/Microsoft.PowerShell.LocalAccounts

* spelling: comments in src/Microsoft.PowerShell.Management.Activities

* spelling: comments in src/Microsoft.PowerShell.PSReadLine

* spelling: comments in src/Microsoft.PowerShell.PackageManagement

* spelling: comments in src/Microsoft.PowerShell.ScheduledJob

* spelling: comments in src/Microsoft.PowerShell.Security.Activities

* spelling: comments in src/Microsoft.PowerShell.Security

* spelling: comments in src/Microsoft.PowerShell.Utility.Activities

* spelling: comments in src/Microsoft.PowerShell.Workflow.ServiceCore

* spelling: comments in src/Microsoft.WSMan.Management.Activities

* spelling: comments in src/Modules

* spelling: comments in src/Schemas

* spelling: comments in src/libpsl-native

* spelling: comments in src/powershell-native

* spelling: comments in build.psm1

* spelling: comments in src/System.Management.Automation/CoreCLR

* spelling: comments in src/System.Management.Automation/DscSupport

* spelling: comments in src/System.Management.Automation/cimSupport

* spelling: comments in src/System.Management.Automation/commands

* spelling: comments in src/System.Management.Automation/engine/Modules
2016-08-26 13:46:03 -07:00
June Blender e1f3494356 Add missing OutputType attribute. (#2052)
* Add missing OutputType attribute.

* Adding OutputType attribute with accurate output types, including PSObject for PSCustomObject (using Property parameter
2016-08-24 13:52:44 -07:00
xiaoyinl f538eeb416 Use HTTPS links for go.microsoft.com
I replace all occurrences of http://go.microsoft.com with https://go.microsoft.com in text files.
2016-08-23 21:21:31 -04:00
Adam Driscoll c829d9e915 Adding debugType portable to project.json. (#1959)
* Adding debugType portable to project.json.

* Move debugType.

* Update project.json

* Update project.json

* Update project.json

* Update project.json

* Update project.json

* Update project.json

* Update project.json

* Update project.json

* Moving debugType into correct places. Removing from non-core builds.

* Added missed files.

* Fixing project.json debugType placement.
2016-08-23 10:38:25 -07:00
Damir Ainullin 93e788d0b6 Replace & for && in condition (#1996) 2016-08-21 14:56:12 -07:00
PowerShell Team c1ee6c9d6d Refactoring - replace always null expressions with null 2016-08-03 12:14:28 -07:00
PowerShell Team c3ce30e34a Refactoring - use is operator instead of GetType() where possible 2016-08-03 12:14:28 -07:00
PowerShell Team 22d2273ce4 Refactoring - use ?? in more places 2016-08-03 12:14:28 -07:00
PowerShell Team 85d6e9f022 Refactoring - adjust modifiers declaration order 2016-08-03 12:14:28 -07:00
PowerShell Team ae8d2ed794 Refactor - convert to auto-property
Mostly using R# to automatically refactor, with some manual
fixups where it wouldn't work automatically (e.g. xml comments
on fields) or some it seemed to miss.

Some minor code reformatting was also done on properties near
other stuff I was manually inspecting.
2016-08-03 12:14:28 -07:00
PowerShell Team bc4901bd59 Remove unused using statements 2016-08-03 12:06:06 -07:00
Jason Shirk (POWERSHELL) 38ab0f4d73 update csproj references 2016-08-03 12:06:06 -07:00
Jason Shirk (POWERSHELL) 75eab56e21 csproj fixes
- add some missing references
- fix assembly name so InternalsVisibleTo works
2016-08-02 10:50:51 -07:00
PowerShell Team 403ae3f53f Initial run of code formatter
I (Jason Shirk) ran https://github.com/dotnet/codeformatter with the default rules, basically:

    codeformatter /nocopyright "/c:DEBUG,UNIX,CORECLR" @files.rsp

This caused a few problems building, which were fixed up manually.

Notable changes:

`this.` is removed unless needed to disambiguate.
private instance fields are renamed to have a `_` prefix.
private static fields are renamed to have a `s_` prefix.

I left some projects alone (like PackageManagement) and also left some generated code alone.
2016-08-01 15:57:03 -07:00
Sergei Vorobev 06252836ea Make 'cd' go to the HOME directory 2016-07-27 18:43:19 -07:00
Jason Shirk (POWERSHELL) 673dd2c355 Change preprocessor macro LINUX to UNIX 2016-07-22 10:49:45 -07:00
Andrew Schwartzmeyer 790a07222e Disable some XML documentation warnings
Some projects have more warnings than I can fix.
2016-07-18 19:07:32 -07:00
Andrew Schwartzmeyer b6f26ad7cc Enable XML documentation generation
This is enabled for PowerShell projects, but not PackageManagment,
WSMan, Cim, or MMI.
2016-07-18 18:40:42 -07:00
Sergei Vorobev 58de8914b1 Downgrade Microsoft.WSMan.Management dependency so we can use the one from sources 2016-07-14 13:46:29 -07:00
Andrew Schwartzmeyer 2abe461992 Refactor to use GetUserFromPid 2016-07-13 15:46:25 -07:00
Andrew Schwartzmeyer e6d3cbcce0 Implement Get-Process -IncludeUserName for Linux
So much plumbing. The correct way to identify the owner of a process on
Linux is to get the owner of the /proc/<PID> file. However, .NET Core
has no API to get this information, thus it had to be plumbed through to
the native library.
2016-07-13 15:46:25 -07:00
Dongbo Wang 15fbd76df8 Exclude the unneeded gen/*.cs files from the build for each target framework 2016-07-07 09:32:21 -07:00
Dongbo Wang c502b31509 Exclude the TimeZone/Computer/FileCatalog cmdlets for Linux. They use windows specific Win32 APIs 2016-07-06 13:04:51 -07:00
Dongbo Wang b4641986a2 Update project.json files to exclude certain .resx files for each target framework 2016-07-06 13:04:31 -07:00
PowerShell Team 49fea9dac9 Add missing files for OPS [SD:717473] 2016-07-06 13:03:56 -07:00
Dongbo Wang b4089414de Add back missing files to OPS -- map.json/project.json udpates 2016-07-05 16:18:24 -07:00