将DLL和.exe合并到一个文件中时出现问题。
我尝试使用本教程,但不知道应在哪里添加此代码:
<Target Name="AfterResolveReferences">
<ItemGroup>
<EmbeddedResource Include="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.Extension)' == '.dll'">
<LogicalName>%(ReferenceCopyLocalPaths.DestinationSubDirectory)%(ReferenceCopyLocalPaths.Filename)%(ReferenceCopyLocalPaths.Extension)</LogicalName>
</EmbeddedResource>
</ItemGroup>
</Target>
谢谢!
在大多数(全部?)C#项目文件(.csproj
)中,底部附近都有一行:
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
博客文章说您应该在项目文件的这一行之后插入新行。您将需要使用文本编辑器来执行此操作:无法使用Visual Studio UI更改项目文件的该部分。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句