Standard: Output path in .NET Standard 2.0 csproj file is not granted.

Created on 26 Sep 2017  路  5Comments  路  Source: dotnet/standard

I tried to set the output file in the csproj file to binDebug. After I save the project file, the UI still shows binDebugnetstandard2.0, but the project file does have the line:
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<OutputPath>bin\Debug\</OutputPath>
</PropertyGroup>

The compiler does not grant this line either. The assembly is still stored in binDebugnetstandard2.0.

Most helpful comment

See above. I had missed quotes, so github didn't display the text.

All 5 comments

cc @nguerrera and @dsplaisted

You need to set <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> to prevent the TFM from being appended to your OutputPath, but that may cause multiple build artifacts to stomp on each other.

I'm sorry. Which parameter do I need to set to false?

The .NET SDK automatically appends the target framework and (if present) the runtime identifier to the output path. This can be disabled with the AppendTargetFrameworkToOutputPath and AppendRuntimeIdentifierToOutputPath properties.

Visual Studio doesn't currently understand this well. Here is a bug tracking that: https://github.com/dotnet/project-system/issues/2177

See above. I had missed quotes, so github didn't display the text.

This should be addressed now, so closing.

Was this page helpful?
0 / 5 - 0 ratings