Project file cannot specify more than one ApplicationDefinition element.
Here's the projectfile:
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>false</UseWindowsForms>
<!-- Set to false if not needed -->
<UserSecretsId>d94128a5-5451-4db6-8f2a-22edfcc31b3c</UserSecretsId>
<RootNamespace>ListenUp</RootNamespace>
<AssemblyName>ListenUp</AssemblyName>
<SignAssembly>false</SignAssembly>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\TypeWriter\typewriterupgraded\typewriterupgraded.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="25394.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
<Resource Include="TheWeeknd-_Blinding_Lights.png" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>true</DesignTimeSharedInput>
<AutoGen>true</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>
2 Replies
delete <ApplicationDefinition Include="..." />
it is included by default
Wasn't the fix