[英]how to get image from another project in the same solution with Src asp.net core?
I've two project in the same solution.我在同一个解决方案中有两个项目。 I am trying to pick up an image from folder in project1 to project 2 in cshtml file.
我正在尝试从 project1 中的文件夹中提取图像到 cshtml 文件中的项目 2。 Any idea how to do this?
知道怎么做吗?
Jlidi,吉丽迪,
If you are trying to reference an image from another project you won't be able to directly reference any source outside your current project, you will need to import the image from the other project into your existing.如果您尝试从另一个项目中引用图像,您将无法直接引用当前项目之外的任何源,您需要将图像从另一个项目导入到您现有的项目中。
Unless this has to be separate I would just recommend making a copy of the image and placing it in both projects, you can perform an import on the image from an existing project but it will essentially just create a copy in your (RESX) Resource file in your existing project.除非这必须分开,否则我只建议制作图像的副本并将其放置在两个项目中,您可以从现有项目中对图像执行导入,但它实际上只会在您的 (RESX) 资源文件中创建一个副本在您现有的项目中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.