是否可以从 nuget powershell 设置项目的输出路径属性? [英] Is it possible to set project's Output Path property from nuget powershell?

查看:68
本文介绍了是否可以从 nuget powershell 设置项目的输出路径属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 nuget powershell 控制台设置 Visual Studio 项目属性输出路径".怎么可能做到?

I would like to set Visual Studio project property "Output Path" from nuget powershell console. How could it be done?

我找到了 一篇博文,描述了如何设置一些项目属性,但不包括输出路径.

I have found a blog post describing how to set some project properties, but Output Path is not included.

此外,输出路径属性取决于当前的构建配置(调试/发布).如何为任何配置(当时未激活)设置输出路径?

Furthermore, the Output Path property depends on current build configuration (Debug/Release). How can be the Output Path set for any configuration (not active at the time)?

推荐答案

你想设置 (Get-Project).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value 为例:

(Get-Project).ConfigurationManager.ActiveConfiguration.Properties.Item("OutputPath").Value = "bin\NewDebugPath"

这篇关于是否可以从 nuget powershell 设置项目的输出路径属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆