Skip to content

Instantly share code, notes, and snippets.

Xavier Decoster xavierdecoster

Block or report user

Report or block xavierdecoster

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
@xavierdecoster
xavierdecoster / .deployment
Last active Dec 7, 2015
Deploying an ASP.NET CoreCLR x64 beta1 application to Azure Websites using Kudu
View .deployment
[config]
command = deploy.cmd
@xavierdecoster
xavierdecoster / CSharpRemoveRegionRewriter.cs
Last active Jul 30, 2019
Roslyn - SyntaxRewriter to remove region directives
View CSharpRemoveRegionRewriter.cs
public class CSharpRemoveRegionRewriter : SyntaxRewriter
{
public CSharpRemoveRegionRewriter()
: base(true)
{
}
public override SyntaxNode VisitRegionDirectiveTrivia(RegionDirectiveTriviaSyntax node)
{
return Syntax.SkippedTokensTrivia();
@xavierdecoster
xavierdecoster / gist:4529586
Created Jan 14, 2013
My way of dealing with TFS Binaries folder... Simply call the following MSBuild task anywhere you want it to be executed :) <DisplayBinariesFolder RootFolder="C:\a\bin"/>
View gist:4529586
<UsingTask TaskName="DisplayBinariesFolder" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<RootFolder ParameterType="System.String" Required="true"/>
</ParameterGroup>
<Task>
<Reference Include="System.Core"/>
<Using Namespace="System"/>
<Using Namespace="System.IO"/>
<Using Namespace="Microsoft.Build.Framework"/>
<Using Namespace="Microsoft.Build.Utilities"/>
View nuget.targets.xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
<ModifiedSolutionDir>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</ModifiedSolutionDir>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">false</RestorePackages>
<!-- Property that enables building a package from a project -->
@xavierdecoster
xavierdecoster / register a myget feed.markdown
Last active Aug 30, 2018
Store MyGet credentials in your roaming user profile NuGet.config
View register a myget feed.markdown

Execute the following script using your MyGet [feedUrl] and MyGet [username] , [password] and [apikey]. Run this from a commandline where you have access to nuget.exe (or set the path to your nuget.exe in a system environment variable).

Store credentials in machine-level nuget.config (non-transferable)

nuget setapikey [apikey] -source [feedUrl]
nuget sources add|update -Name [name] -source [feedUrl] -User [username] -pass [password]
@xavierdecoster
xavierdecoster / nuspec-readme
Created May 6, 2012
Readme file for NuSpec v1.2.0
View nuspec-readme
# NuSpec
Simply run Install-Package NuSpec (once for the solution, doesn't matter which project) to get a set of extra cmdlets available in the NuGet Package Manager Console.
The cmdlets in this package rely on the NuGet "Enable Package Restore" feature, which adds a .nuget folder in the solution directory containing the nuget.exe command line tool and nuget.targets MSBuild file.
Available cmdlets: *Install-NuSpec*, *Enable-PackagePush*
## Creating the package and auto-build
Install-NuSpec <ProjectName> [-EnablePackageBuild]
@xavierdecoster
xavierdecoster / updateAllNuGetPackagesInSolution
Created Mar 22, 2012
Update all packages in a solution from the NuGet Package Manager Console
View updateAllNuGetPackagesInSolution
Get-Project -All | % { Get-Package -ProjectName $_.ProjectName | Update-Package -ProjectName $_.ProjectName}
@xavierdecoster
xavierdecoster / Online NuGet cache
Created Mar 9, 2012
How to quickly create an online NuGet cache
View Online NuGet cache
cd $env:LOCALAPPDATA\NuGet\Cache
get-childitem . *.nupkg | % { nuget push $_ -ApiKey 9cbe3269-0e8d-4f86-a9ce-356309641b40 -Source http://www.myget.org/F/onlinecache/api/v2/package }
You can’t perform that action at this time.