Skip to content

Instantly share code, notes, and snippets.

@jstangroome
Created July 11, 2012 04:27
Show Gist options
  • Save jstangroome/3087991 to your computer and use it in GitHub Desktop.
Save jstangroome/3087991 to your computer and use it in GitHub Desktop.
MSBuild snippet to disable the default DLL output of a C# class library project
<Project>
<!-- the usual stuff -->
<!-- BEGIN disable default compile and copy binary behaviour -->
<Target Name="CoreCompile" />
<PropertyGroup>
<SkipCopyBuildProduct>true</SkipCopyBuildProduct>
</PropertyGroup>
<!-- END disable default compile and copy binary behaviour -->
</Project>
@brinko99
Copy link

For a Core project you might want to add the following to prevent the .deps.json file from being created:
<GenerateDependencyFile>False</GenerateDependencyFile>

@LaurenceMee
Copy link

LaurenceMee commented May 7, 2021

<GenerateDependencyFile>False%lt;/GenerateDependencyFile> does nothing.

@sommmen
Copy link

sommmen commented Jun 4, 2021

Note you may also want to turn of debug symbols to also stop generation of a .pdb file.

EDIT: and if you're doing that, use the following code, both need these values:

    <DebugSymbols>false</DebugSymbols>
    <DebugType>none</DebugType>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment