Skip to content

Instantly share code, notes, and snippets.

💭
On paternity leave

Sayed Ibrahim Hashimi sayedihashimi

Block or report user

Report or block sayedihashimi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sayedihashimi
sayedihashimi / extract-interface.gif
Last active Nov 8, 2018
Some sample Quick Fix actions available in Visual Studio for Mac
@sayedihashimi
sayedihashimi / limit-nuget.md
Last active Jul 6, 2018
how to limit nuget packages and versions to specific ones
View limit-nuget.md

Question: How can I ensure that all projects only use a specific set of nuget packages and versions? I'm using VS2017.

The way that I would handle this is to add a (directory.build.targets)[https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build#directorybuildprops-and-directorybuildtargets] to help in this scenario.

The idea is that you will add an msbuild .targets file in the source root named directory.build.targets. In that file you can inject a target to be run before the build starts. For example,

@sayedihashimi
sayedihashimi / how-to-publish-to-multiple-iis.md
Last active Jun 25, 2018
How to publish a web project to multiple IIS sites
View how-to-publish-to-multiple-iis.md

Scenario:

  • I have a web project that I want to publish to multiple IIS sites
  • Publish in VS should publish to devs local IIS server (MSDeploy)
  • Publish from CI/CLI should publish to remote env (MSDeploy)
  • CI/CLI and VS publish should be the same
  • Building the solution takes ~3 min and should only be performed once
  • Config files need to be transformed based on the dest env

Question:

How can I accomplish this?

@sayedihashimi
sayedihashimi / dotnet-new-templates.txt
Last active Jul 24, 2017
Templates availabe on nuget.org for dotnet new
View dotnet-new-templates.txt
--- template report ---
Name DownloadCount Percent overall
---- ------------- ---------------
Microsoft.AspNetCore.SpaTemplates 44876 65.4 %
Microsoft.DotNet.Web.Spa.ProjectTemplates 6253 9.1 %
libyear 1860 2.7 %
Boilerplate.Templates 1600 2.3 %
IdentityServer4.Templates 1136 1.7 %
Amazon.Lambda.Templates 1122 1.6 %
@sayedihashimi
sayedihashimi / dotnet-new-ux.ps1
Last active Mar 1, 2018
dotnet new user interaction
View dotnet-new-ux.ps1
[cmdletbinding()]
param()
# to run this script:
# (new-object Net.WebClient).DownloadString("https://gist.githubusercontent.com/sayedihashimi/899ed1a47953ea6a45f60220687cfdd6/raw/b3ad6ab230b5c4a9cf5b39d3142fc7b36df8c54f/run-dotnetnew-ux.ps1") | iex
function StartDefault{
[cmdletbinding()]
param()
process{
View machine-setup.ps1
[cmdletbinding()]
param()
$global:machinesetupconfig = @{
MachineSetupConfigFolder = (Join-Path $env:temp 'SayedHaMachineSetup')
MachineSetupAppsFolder = (Join-Path $env:temp 'SayedHaMachineSetup\apps')
BaseChocoPackages = @(
'boxstarter',
'boxstarter.winconfig'
'git.install',
@sayedihashimi
sayedihashimi / download-tablebases
Created Sep 18, 2016
Download Nalimov table bases (3/4/5)
View download-tablebases
[cmdletbinding()]
param()
function DownloadTablebases{
[cmdletbinding()]
param(
$baseUrl = 'http://www.chesskit.com/download/nalimov',
$allFilename = 'all.txt',
$downloadRoot = ($pwd)
)
@sayedihashimi
sayedihashimi / template-deps.md
Last active May 7, 2016
Template dependencies
View template-deps.md
View dotnet-new-ideas.md

Thoughts on command line project creation

Note: what you'll find below are just some ideas. I'm writing these down so that I can share it at https://github.com/dotnet/cli/issues/2052 with the goal to change how we are approaching templates. I'm not directly woring in this area. However, I am responsible for ASP.NET template content in Visual Studio and yo aspnet.

With dotnew new we are interested in enabling an experience for users to create new projects from the command line. Creating projects from the command line is not a new concept, it's been around for a while especially on the web development side. One example of a successful command line project generator is yeoman. Yeoman is a super popular tool for developers, and if dotnet new is as successful as yeoman, IMO, that would be a really wonderful thing. To enable a meaningful discussion on dotnet new let's start by taking a look at a typical user experience when using yeoman to create a new project. Below are typic

View comments.md

In summary, WebDeploy (the marketing term) includes MSDeploy binaries, MSBuild extensions (*.targets files), Visual Studio extensions and the Web Deployment Agent Service.

The targets are not really a part of Web Deploy but instead of the Visual Studio Web Projects which are implemented in MSBuild and then invoke MSDeploy

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild /t:Package

You're using an old copy of msbuild.exe but for your scenarios it's likely OK.

FYI the deploy.cmd file has some bugs and in some scenarios doesn't work well. I'd only use that as a starting point or for basic scenarios

You can’t perform that action at this time.