如何设置我的.exe程序的位置,以便Visual Studio在其后不添加net7.0-windows?

huangapple go评论64阅读模式
英文:

How do I set location of my .exe program so that visual studio do not add net7.0-windows after that?

问题

在框架中,如果我将我的程序设置为运行在

C:\Users\Dropbox\arbitrage2

然而,在我升级到net7.0后,我的程序运行在

C:\Users\Dropbox\arbitrage2\net7.0-windows

Visual Studio自己添加了这个。

如果我只想让它运行在C:\Users\Dropbox\arbitrage2

我应该怎么做?

英文:

In framework, if I set my program to run on

C:\Users\Dropbox\arbitrage2

However, after I upgrade to net7.0 my program is run on

C:\Users\Dropbox\arbitrage2\net7.0-windows

Visual studio add that itself.

What about if I just want it to be run on C:\Users\Dropbox\arbitrage2

What should I do?

答案1

得分: 2

查看来自 Microsoft 的此主题:
https://learn.microsoft.com/en-us/visualstudio/ide/how-to-change-the-build-output-directory?view=vs-2022

其中提到:
一些项目默认会将框架和运行时包含在构建路径中。要更改此设置,请在“解决方案资源管理器”中右键单击项目节点,选择“编辑项目文件”,然后添加以下内容:

<PropertyGroup>
  <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
  <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
</PropertyGroup>
英文:

have a look to this topic from Microsoft :
https://learn.microsoft.com/en-us/visualstudio/ide/how-to-change-the-build-output-directory?view=vs-2022

it mention :
Some projects will by default include framework and runtime in the build path. To change this, right-click the project node in Solution Explorer, select Edit Project File, and add the following:

&lt;PropertyGroup&gt;
  &lt;AppendTargetFrameworkToOutputPath&gt;false&lt;/AppendTargetFrameworkToOutputPath&gt;
  &lt;AppendRuntimeIdentifierToOutputPath&gt;false&lt;/AppendRuntimeIdentifierToOutputPath&gt;
&lt;/PropertyGroup&gt;

huangapple
  • 本文由 发表于 2023年3月9日 17:22:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75682601.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定