Publish is producing .nuget package instead of a class library + dependencies

916 Views Asked by At

I've created some C# class libraries which are intended to be used as dynamic plugins for a console application. I thought I could use the Publish task in Visual Studio to create a folder containing a Release assembly + dependencies but instead, it is packaging the project assembly into a nuget package!

How do I get a simple output of assemblies + dependencies out of my class library?

Here is my .csproj:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">

    <PropertyGroup>
        <TargetFramework>net5.0</TargetFramework>
        <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
        <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
        <Platforms>AnyCPU</Platforms>
    </PropertyGroup>

    <ItemGroup>
        <ProjectReference Include="..\..\MyService.PluginBase\MyService.PluginBase.csproj">
            <Private>false</Private>
            <ExcludeAssets>runtime</ExcludeAssets>
        </ProjectReference>
    </ItemGroup>
</Project>

My publish settings are as follows:

  • Configuration: Release | Any CPU
  • Target Framework: net5.0
  • Target Runtime: Portable
  • Deployment mode: Framework-dependent
0

There are 0 best solutions below