This is crazy, but I can’t seem to get all my views/content/scripts published when I publish the site. This seems to happen, I believe, when the view or content is not directly referenced by my project, but used by another assembly in my project. So I might have:
- ExternalAssembly.dll referenced (it gets published)
- I’ll need ExternalLogin.cshtml in my main project, under my views folder
- ExternalLogin.cshtml doesn’t get published
Right now I have a script that copies everything in the Views folder and dumps it to where I want it deployed, but VS should do this for me. What am I doing wrong?
So your views files are in another project or folder outside your current project? Normally the files have to exist in the web site project, in it’s views folder, not externally, and the build action should be set to
Contentand not to copy to the output folder. But there are some workarounds: