如何禁用在调试模式下嵌入的Costura.Fody资源? [英] How to disable Costura.Fody resources embedding in Debug mode?
本文介绍了如何禁用在调试模式下嵌入的Costura.Fody资源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Costura.Fody将所有dll嵌入到我的应用程序程序集中.
I'm using Costura.Fody to embed all dlls into my application assembly.
有什么方法可以在调试"构建模式下禁用Costura.Fody?如何使Costura.Fody仅在发布或自定义构建配置中工作?
Is there any way to disable Costura.Fody in Debug build mode? How to make Costura.Fody to work only in Release or custom build configuration?
推荐答案
一种解决方案可能是检查您的.csproj
文件并向与Fody相关的行中添加条件.像这样:
One solution might be to check your .csproj
file and add a condition to the Fody-related lines. Something like this:
<Content Include="FodyWeavers.xml" Condition=" '$(Configuration)' == 'Release' " />
<Import Project="..\..\packages\Fody.1.29.4\build\dotnet\Fody.targets" Condition="Exists('..\..\packages\Fody.1.29.4\build\dotnet\Fody.targets') And '$(Configuration)' == 'Release' " />
当然,这主要是针对不希望在某些构建环境中运行任何Fody扩展的简单用例.
Of course, this is mainly for simple use cases where you don't want any Fody extension to run in certain build environments.
这篇关于如何禁用在调试模式下嵌入的Costura.Fody资源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文