在构建时将DLL提取到不同的路径 [英] Extracting DLL to a different path when build

查看:96
本文介绍了在构建时将DLL提取到不同的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我试图找出是否有可能将另一个项目的DLL副本保存到另一个路径?



为了说清楚:我有一个类库项目,当我在发布模式下构建项目时,我有一个保存在 Bin \Release下的DLL 文件夹。

Ex路径:C:\ Users \username \Documents\Visual Studio 2012 \Projects\ProjectName \bin \ Release



我想找出我构建项目的时候我希望它将DLL放在不同的路径中。让我们说以下两个路径中的DLL:

- C:\Users\username \Documents\Visual Studio 2012 \Projects \ ProjectName \ bin \ Release

- C:\ Users\username \Programs\DLLS \



这可能吗?如果是这样,你可以给我一个链接,解释如何做到这一点?在此先感谢。



= EDIT =



我现在已经检查过了项目的属性。在Build Events下我有一个地方Post build event command line:我有以下代码:

if / I$(ConfigurationName)==ReleaseEazfuscator.NET。 exe$(TargetPath) - msbuild-project-path$(ProjectPath) - msbuild-project-configuration$(ConfigurationName) - msbuild-project-platform$(PlatformName) - msbuild-解决方案路径$(SolutionPath) - n --newline-flush -v 3.3



我使用Eazfuscator.Net进行混淆我觉得它手动添加此代码。好像我需要添加一条新路径,我想我需要使用Post-Build事件命令行。也许在命令行添加路径?如果这是正确的方法:

- 我可以添加另一行代码而不会弄乱混淆行吗?或者我是否必须更改我写的已存在的行?

Hello all,

I am trying to find out is it possible to having a another copy of the DLL of the project saved into another path?

To make it clear: I have a class library project and when I build the project in Release mode, I have a DLL saved under the Bin\Release folder.
Ex path: "C:\Users\username\Documents\Visual Studio 2012\Projects\ProjectName\bin\Release"

I am looking to find out when I build the project I want it to place DLL in a different path as well. Let's say a DLL in both following paths:
- "C:\Users\username\Documents\Visual Studio 2012\Projects\ProjectName\bin\Release"
- "C:\Users\username\Programs\DLLS\"

Is this possible? If so can you give me a link where it explains how to do it? Thanks in advance.

=EDIT=

I have now checked the project's properties. Under Build Events I have a place "Post build event command line": I have the following code:
if /I "$(ConfigurationName)" == "Release" Eazfuscator.NET.exe "$(TargetPath)" --msbuild-project-path "$(ProjectPath)" --msbuild-project-configuration "$(ConfigurationName)" --msbuild-project-platform "$(PlatformName)" --msbuild-solution-path "$(SolutionPath)" -n --newline-flush -v 3.3

I am using Eazfuscator.Net for obfuscation I think it manually added this code. Seems like if I need to add a new path I think I need to use Post-Build event command line. Maybe adding the path here by a command line? If this the right way:
- Can I add another line of code without messing the obfuscation line or do I have to change the already existing line which I wrote?

推荐答案

(ConfigurationName)==发布Eazfuscator.NET.exe
(ConfigurationName)" == "Release" Eazfuscator.NET.exe "


(TargetPath) - msbuild-project-path
(TargetPath)" --msbuild-project-path "


(ProjectPath) - msbuild-project-configuration
(ProjectPath)" --msbuild-project-configuration "


这篇关于在构建时将DLL提取到不同的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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