我有一个第三方应用程序,可以通过.cs代码创建一个dll文件。
I have a third-party application that creates a dll file out my .cs code.
在我的.cs代码中,我引用了一个文件。
In my .cs code I reference a file.
我如何编译dll或.cs使其包含.jpg文件以及代码?
How do I compile the dll or .cs to include the .jpg file along with the code?
我为第三方应用程序提供的选项不允许我导出.jpg
The options I have for the third-party application does not allow me to export the .jpg
导入过程仅查看.cs和关联的.dll。
The import process only looks at the .cs and the associated .dll.
一旦第三方应用程序在导出过程中使用可视化的stuido或其他东西创建了dll,是否可以将文件添加到dll中?
Is there a way to add the file to the dll once the third-party application has created the dll in the export process with visual stuido or something?
推荐答案是的,这是可能的。如果文件被dll中的代码使用,则需要通过属性>>构建操作>>嵌入资源设置将文件嵌入文件中。
Yes this is possible. If the file is used by your code in the dll then the file needs to be embedded thorugh the Properties >> Build Action >> Embedded Resource setting:
您必须编辑.csproj并将代表您文件的节点更改为:
You have to edit the .csproj and change the node that represents your file to:
<EmbeddedResource Include="Resources\yourEmbeddedResource.json" />来源:
Source:
更多推荐
如何将.jpg包含到dll中?
发布评论