Skip to content

Instantly share code, notes, and snippets.

@TrabacchinLuigi
Forked from attilah/X.Y.Z.Sources.csproj
Last active November 26, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TrabacchinLuigi/7cb33e71a6a62a722d62fa45b837ab3b to your computer and use it in GitHub Desktop.
Save TrabacchinLuigi/7cb33e71a6a62a722d62fa45b837ab3b to your computer and use it in GitHub Desktop.
X.Y.Z.Sources nuget package
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Compile" />
<Target Name="CopyFilesToOutputDirectory" />
</Project>
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<PackageId>XYZ</PackageId>
<AssemblyTitle></AssemblyTitle>
<AssemblyName></AssemblyName>
<RootNamespace></RootNamespace>
<Version>1.1.7</Version>
<Configurations>Source;Debug;Release</Configurations>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Source'">
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<NoBuild>true</NoBuild>
<NoWarn>CS8021</NoWarn>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<PackageId>$(PackageId).Sources</PackageId>
</PropertyGroup>
<ItemGroup Condition="'$(Configuration)'=='Source'">
<Compile Include="**\*.cs" Exclude="obj\**">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\cs\netstandard2.0\$(PackageId)\%(Identity)</PackagePath>
</Compile>
<EmbeddedResource Update="@(EmbeddedResource)">
<Pack>true</Pack>
<PackagePath>$(ContentTargetFolders)\any\any\$(PackageId)\%(RecursiveDir)\</PackagePath>
</EmbeddedResource>
<PackageReference Remove="@(PackageReference)" />
</ItemGroup>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<Import Project=".\DisableSourceUnwanted.targets" Condition="'$(Configuration)'=='Source'" />
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment