There’s no command line tool on Windows like Grep on Linux to search for a specific text in all files recursively. But there’s a simple alternative.
Bash
grep -r "peter" *
PowerShell
ls * -r | sls "peter"
There’s no command line tool on Windows like Grep on Linux to search for a specific text in all files recursively. But there’s a simple alternative.
Bash
grep -r "peter" *
PowerShell
ls * -r | sls "peter"
Did you know the Lazy class in the System namespace?
This little useful helper was introduced with .NET 4. You can use it to lazy initialize properties.
The ResolvePackagePath()-method gets called if the value is needed the first time.
The property IsValueCreated lets you check if the value is already initialized.
Many companies use a http proxy with authentication. Since TFS 2017 the agents are based on .NET Core to be cross-platform. The new agents are unable to obtain the proxy settings from the operating system (Internet Explorer settings).
I’ve found this solution to set a http proxy for the VSTS agents.
Example: http://proxy.contoso.org:8080
[Environment]::SetEnvironmentVariable("VSTS_HTTP_PROXY_USERNAME", "proxyuser", "User") [Environment]::SetEnvironmentVariable("VSTS_HTTP_PROXY_PASSWORD", "proxypassword", "User")
See also the documentation on GitHub.
In the app.config/web.config you can use the configuration section <system.net> <mailSettings> <smtp> to configure how to deliver e-mails which are sent using the MailMessage and SmtpClient classes in your program.
In development environment you usually don’t want the e-mails to be delivered. Today I’ve found a awesome configuration option, which enables that all outgoing e-mails go to an local folder or file share as eml files.