Is it possible to build a different output for the same TargetFramework in Visual Studio?

Viewed 37

I am trying to build two dlls using the same TargetFramework. I am using MSBuildSdkExtras to be able to have multiple TargetFramework <TargetFrameworks>Xamarin.iOS10;MonoAndroid10.0</TargetFrameworks> and conditional compilations for the source files, e.g. <ItemGroup Condition=" $(TargetFramework.StartsWith('MonoAndroid')) ">.

However I want to be able to generate two different .dlls for MonoAndroid, with different source files, and can't see how to do this without replicating the .csproj file, along with a common .csproj for common source code.

Is there a simpler way?

1 Answers

You can add a new, user defined configuration type (in addition to Debug and Release). Use the configuration manager for this (easiest from the dropdown menu in the toolbar, where it says Debug or Release). Select the last entry to add new configurations. The downside is that maintaining this extra configuration may be cumbersome.

Dropdown

Related