How do I set `OutputPath` in a Visual Studio 2017 project (new .csproj file format) without the target framework cluttering the resolved path?

aksu :

Setting OutputPath in the new Visual Studio 2017 project format automatically adds the target framework in the path. For example, if I have these set in the project file:

<TargetFramework>net462</TargetFramework>
<OutputPath>/build/debug/<OutputPath>

The actual output folder will resolve to /build/debug/net462/, not /build/debug/ like in the older versions. How do I solve this without workarounds like moving things around with post build actions?

aksu :

The solution is to use AppendTargetFrameworkToOutputPath https://www.tabsoverspaces.com/233608-stopping-msbuild-appending-targetframework-to-outputpath/

<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How do I change the Target Framework on a Visual Studio Modeling Project?

How to get Visual Studio 2017 to compile TypeScript on build in class library project (new .net core style .csproj)

When I create an asp.net project in visual studio community 2017 no .csproj file is created

Visual Studio Project Template Support for new csproj format

Unable to set startup project in Visual Studio 2022 with a .csproj file

Visual Studio 2017 RC How to specify Publishing Options in the csproj file

Visual Studio 2017 and the new .csproj InternalsVisibleTo

How to get IntermediateOutputPath from Visual Studio extension and new csproj format

Visual Studio 2017 csproj core file exclusion

How do I log Visual Studio 2017 build output to a file?

Visual Studio 2017 - New Project - .NET chooser (Framework/Core) is disabled

How do you run unit tests for a specific target framework in Visual Studio 2017/2019?

How do I run a C++ file "by itself" in a Visual Studio project without the influence of other files?

How to change VS 2017 RC .csproj project's target framework (from core to classic)?

How to compile a C++ File without making a project in Visual Studio 2017?

How do I add a new C file in Visual Studio 2013

How do I reference the npm packages in _Layout that I installed in my Visual Studio 2017 project?

How to specify ASP.NET Core target framework imports in .csproj file (instead of project.json)?

How do I set the search path for systemd-resolved?

How do you create a .NET program using the new CSPROJ format in VS2017 (Or VS2019)

How to set working directory for Visual Studio 2017 RC CMake Project

How do I create a WCF Service Library project in Visual Studio 2017?

How do I pass args while debugging a node.js project in Visual Studio 2017?

How do I debug .NET 4.6 framework source code in Visual Studio 2017?

How do I get Visual Studio 2017 Evaluation to recognize .NET Framework 4.6.2 installed?

How do I get Visual Studio 2013 to allow me to target .NET Framework 4.5.2?

Can't edit .csproj file in visual studio 2017 solution explorer

How do I reate an SDK style project for a .net framework 4.7.2 project in using visual studio?

How do I find and use new syntax highlighting themes in Visual Studio 2017

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    pump.io port in URL

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    flutter: dropdown item programmatically unselect problem

  14. 14

    How to use merge windows unallocated space into Ubuntu using GParted?

  15. 15

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  16. 16

    Nuget add packages gives access denied errors

  17. 17

    Svchost high CPU from Microsoft.BingWeather app errors

  18. 18

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  19. 19

    12.04.3--- Dconf Editor won't show com>canonical>unity option

  20. 20

    Any way to remove trailing whitespace *FOR EDITED* lines in Eclipse [for Java]?

  21. 21

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

HotTag

Archive