How to create an embedded resource in a website project?

How to create an embedded resource in a website project?

In a web application project, I can change the "build action" through the file properties window. There is no property window in the website project. I noticed that in a web application project, the .csproj file changes when the build action of the file changes. Of course, there is no .csproj file in the website project.

Can I create an embedded resource in a website project?

At the same time, we changed the project to a web application project. But I'm still interested.

+3
source share
2 answers

You cannot add an embedded resource because website designs are not precompiled. There is no built-in dll library for embedding a resource.

+2
source

You can still get the properties window in the website project - do you mean that you want to mark an element in your website project that will be included for deployment? If this happens, set the Build Action property for the selected file in your Content solution.

An embedded resource is an option, but is intended for elements that you want to embed in a compiled DLL that matches your App_Code. Then you will need to load the resource from your assembly.

0
source

Source: https://habr.com/ru/post/952762/


All Articles