简体   繁体   English

VS2015-仅将项目dll复制到输出文件夹

[英]Vs2015 - Copy only the project dll to output folder

Just a quick question, is there away in vs2015 to only output the compiled project dll to the output directory? 只是一个简单的问题,vs2015中是否只有将编译后的项目dll输出到输出目录?

For example, my project is called TestProject and it reference's EntityFramework dll's and MVVM Light dlls . 例如,我的项目称为TestProject ,它引用EntityFramework dll和MVVM Light dlls When I compile I only want to see TestProject.dll in the output folder, and no i am not talking about embedding the other dll's into the project dll. 编译时,我只想在输出文件夹中看到TestProject.dll ,没有,我不是在谈论将其他dll嵌入到项目dll中。

EDIT: Tried this in the Post-Build. 编辑:在后构建中对此进行了尝试。 Build is ok but no change on the files. 可以构建,但文件没有任何更改。

PowerShell.exe -Command "&{Remove-Item "$(OutDir)*" -Exclude '$(TargetFileName)'}"

Setting the Post-Build event command line like so does what I need. 设置Post-Build事件命令行就像我需要的那样。

attrib +r "$(TargetPath)"
del /q "$(TargetDir)"
attrib -r "$(TargetPath)"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM