Skip to content

Instantly share code, notes, and snippets.

View sayedihashimi's full-sized avatar

Sayed Ibrahim Hashimi sayedihashimi

View GitHub Profile
@sayedihashimi
sayedihashimi / dotnet-new-ux.ps1
Last active March 1, 2018 12:24
dotnet new user interaction
[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{
@sayedihashimi
sayedihashimi / machine-setup.ps1
Last active November 15, 2016 22:42
temp files
[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 September 18, 2016 18:43
Download Nalimov table bases (3/4/5)
[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 22:41
Template dependencies
@sayedihashimi
sayedihashimi / dotnet-new-ideas.md
Last active April 7, 2016 10:53
Ideas for dotnet-new

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

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

<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Project" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>Aurelia ES2016 for ASP.NET Core</Name>
<Description>This will create an Aurelia ES2016 project, built on top of ASP.NET Core.</Description>
<DefaultName>AureliaES2016vNext</DefaultName>
<ProjectType>CSharp</ProjectType>
<ProjectSubType>Web</ProjectSubType>
<SortOrder>1000</SortOrder>
<CreateNewFolder>true</CreateNewFolder>
<RequiredFrameworkVersion>4.5</RequiredFrameworkVersion>
@sayedihashimi
sayedihashimi / test.ps1
Created February 17, 2016 22:27
ps sample
[cmdletbinding()]
param(
[Parameter(Position=0)]
$branch = 'master'
)
'Branch [{0}]' -f $branch | Write-Output
@sayedihashimi
sayedihashimi / sample.ps1
Created February 10, 2016 07:25
pecan waffle ideas
# OPTION 1
$itemTemplate = new-itemtemplate 'aspnet5-empty' 'ASP.NET 5 empty project' -properties @{
DefaultProjectName = 'MyEmptyProject'
LicenseUrl = 'https://raw.githubusercontent.com/ligershark/pecan-waffle/master/LICENSE'
ProjectUrl = 'https://github.com/ligershark/pecan-waffle'
GitUrl = 'https://github.com/ligershark/pecan-waffle.git'
GitBranch = 'master'
BeforeInstall = { 'before install' | Write-Host -ForegroundColor Cyan}
AfterInstall = { 'after install' | Write-Host -ForegroundColor Cyan}
@sayedihashimi
sayedihashimi / profile.pubxml
Created January 26, 2016 21:47
Shows how to override publishUrl with Configuration
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>