如何创建一个网站项目嵌入的资源?创建一个、项目、资源、网站

2023-09-04 13:39:33 作者:迷徒

如何创建一个网站项目嵌入的资源?

How to create an embedded resource in a Web Site project?

在Web应用程序项目,我可以改变的生成操作,通过一个文件的属性窗口。在一个网站项目没有属性窗口。我注意到,在一个Web应用程序项目,当您更改某个文件的生成操作中的.csproj文件被更改。在一个网站项目有当然没有.csproj的文件。

In a web application project I can change the 'build action' through the properties window of a file. In an Web Site project there is no properties window. I noticed, in a web application project, the .csproj file is changed when you change the build action of a file. In a Web site project there is no .csproj file of course.

是否有可能在一个网站项目创建一个嵌入式的资源?

Is it possible to create an embedded resource in an Web Site project?

在mainwhile,我们改变了项目到Web应用程序项目。但我还是好奇。

In mainwhile, we changed the project to a web application project. But I'm still curious..

推荐答案

您不能添加嵌入的资源,因为网站项目并不pre-编译。没有生成的DLL中嵌入资源。

You can't add an embedded resource, because web site projects are not pre-compiled. There is no generated dll to embed the resource in.