I'm playing around with using the new .csproj file format.
I want my project to build to:
C:\Development\Source\DotNet\bin\x64\Debug\
But it seems to be implicitly adding to the path and building it at:
C:\Development\Source\DotNet\bin\x64\Debug\net46
Is there a way to prevent it from doing that?
My project is:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<Platforms>x64</Platforms>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutputPath>C:\Development\Source\DotNet\bin\x64\Debug\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="AssetManagement_Gen">
<HintPath>..\..\Development\Source\DotNet\bin\x64\Debug\AssetManagement_Gen.dll</HintPath>
</Reference>
<Reference Include="EXPLink">
<HintPath>..\..\Development\Source\DotNet\bin\x64\Debug\EXPLink.dll</HintPath>
</Reference>
<Reference Include="IvaraCommon">
<HintPath>..\..\Development\Source\DotNet\bin\x64\Debug\IvaraCommon.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>..\..\Development\Source\DotNet\bin\x64\Debug\NLog.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>
If I open it in visual studio it also shows up with the "net46" appended to the output path.
For my posterity, the combination of <OutputPath>
and <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
lets you get a completely custom path.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net46</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Platforms>x64</Platforms>
<ApplicationIcon />
<OutputType>Exe</OutputType>
<StartupObject />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutputPath>..\..\..\bin\$(Platform)\$(Configuration)</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutputPath>..\..\..\bin\$(Platform)\$(Configuration)</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="AssetManagement_Gen">
<HintPath>$(OutDir)\AssetManagement_Gen.dll</HintPath>
</Reference>
<Reference Include="EXPLink">
<HintPath>$(OutDir)\EXPLink.dll</HintPath>
</Reference>
<Reference Include="IvaraCommon">
<HintPath>$(OutDir)\IvaraCommon.dll</HintPath>
</Reference>
<Reference Include="NLog">
<HintPath>$(OutDir)\NLog.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>