Skip to content

Instantly share code, notes, and snippets.

✌️
Greetings

Piotr Czech Xeinaemm

✌️
Greetings
View GitHub Profile
View .gitconfig
[diff]
tool = vsdiffmerge
[merge]
tool = vsdiffmerge
[mergetool "vscode"]
cmd = code --wait $MERGED
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[difftool]
prompt = true
View Directory.Build.props
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Jarvis.All" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>
View project.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>
</Project>
View Sdk.targets
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="RemoveRuntimeNode" AssemblyFile="$([MSBuild]::ValueOrDefault('$(XeinaemmSdkPath)', '$(MSBuildThisFileDirectory)..\lib\netstandard2.0\Xeinaemm.Sdk.dll'))" />
<Target Name="RemoveConfigRuntimeNode" BeforeTargets="ResolveAssemblyReferences" Condition="Exists('$(MSBuildProjectDirectory)\Web.config')">
<RemoveRuntimeNode ConfigFilePath="$(MSBuildProjectDirectory)\Web.config" />
</Target>
</Project>
View RemoveRuntimeNode.cs
using System.IO;
using System.Linq;
using System.Xml.Linq;
using Microsoft.Build.Utilities;
public class RemoveRuntimeNode : Task
{
public string ConfigFilePath { get; set; }
public override bool Execute()
View example10.txt
project.csproj
lib
$(TargetFramework)
project.dll
Sdk
Sdk.props
Sdk.targets
*.cs
View Example9.props
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.0.52" />
View Directory.Build.targets
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="PackNugets" AfterTargets="AfterBuild">
<Exec Command="dotnet pack &quot;$(MSBuildProjectDirectory)&quot; --no-build -o C:\NugetSource -c $(Configuration)"/>
</Target>
</Project>
View Directory.Build.props
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="ConfigFiles">
<StyleCopFile Condition=" '$(StyleCopFile)' == '' ">$([MSBuild]::GetPathOfFileAbove('stylecop.json', $(MSBuildProjectDirectory)))</StyleCopFile>
</PropertyGroup>
<ItemGroup Label="ConfigFiles">
<None Condition="Exists('$(StyleCopFile)')" Include="$(StyleCopFile)" Visible="false" />
</ItemGroup>
View example8.props
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
You can’t perform that action at this time.