Home > Net >  How to avoid Visual Studio outputs assemblies in Target Framework Name directories?
How to avoid Visual Studio outputs assemblies in Target Framework Name directories?

Time:11-20

We have some netstandard2.0 assemblies. When compiling they are generated within the directory .\bin\Debug\netstandard2.0 (netstandard2.0 dir name is the TFN the Target Framework Name). However only .\bin\Debug is specified in Project Properties. And we'd like to generate those assemblies within .\bin\Debug to get all our assemblies with the same directory.

We developed a Post-Build event to copy back our assemblies and their json/pdb files within .\bin\Debug and then delete the dir .\bin\Debug\netstandard2.0. However this is not a good solution because the FastUpToDate tool used during incremental compilation does'nt find .\bin\Debug\netstandard2.0\ProjectName.pdb and thus our netstandard2.0 projects are always rebuilt even when they are up-to-date.

CodePudding user response:

Set AppendTargetFrameworkToOutputPath to false in your projects.

<PropertyGroup>
  <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
  • Related