Web Setup project not including some content files from ASP.NET MVC project - asp.net

I am making a WEB SETUP for my ASP.NET application. Below is my folder structure for content folder.
I have added a WEB SETUP project and have included the 'Primary output from Web' and 'Content files from Web'.
But when i right click on the 'Content files from Web' and select the 'Output' option I see the following
only my .svg font is added, the rest 4 files (.eot, .ttf, .woff and .otf) are not added. Even when I run the installer and after the setup is complete I still do not see these 4 files in the Content/font-awesome/font folder.
What should I do to add these to the installer as well ?

Some font related files under your Content folder are probably not specified as "Content" files. You have to make Visual Studio understand that they are Content files. Content files are eventually copied to the compiled output directory when you execute your setup.exe file.
Just select your intended file(s) (using Ctrl-click if there are multiple files), right click choose Properties and from the Properties window, in front of "Build Action" choose "Content" option.
Now when you will Build and run your Setup.exe file, these files would be copied to the output directory.

Related

ASP.NET exclude folder from publishing , but keep files on server

I have an old ASP.NET website. need to exclude folder from publishing , but keep that folder on server.
Folder: img contains many images marked as "content"
Publish method: FTP
In setting I have "Delete all existing file prior to publish" UNCHECKED, yet files are still being when publish.
For Visual Studio go to the Solution Explorer, right-click on the file you do not want to copy and then click on properties. Set the "Copy to Output Directory" to "Do not copy."

mvc which files are needed for deployment?

I've been working with webforms and recently started to work with mvc. With webforms, when we use to push to the qa/prod server, we alway copied over the files. leaving behind the .cs files, so just the .aspx, bin folder, along with associated js/css files would go.
with mvc, if we are copying the directory over from our pc (where we develop), what files are needed, do we need the .cshtml files for example? I just want to avoid having to push all the files if they are not needed.
They are definitely not all required. What you are going to want to do is setup a way to publish, this ranges from doing a "bin deploy" to feeding in ftp settings and using a "single click deploy" approach.
What it all boils down to though is this. You will need
A bin folder with every relevant .dll
A content folder with relevant images and css files
A script folder with relevant .js scripts
A views folder with nested folders for views with relevant .cshtml files
A .webconfig file in the views folder and also one at the very root
The packages.xml file at the very root
The global.asax file with markup pointing to the application starting in global.asax.cs
What this excludes is every single .cs file. These will all be composed into your projects .dll. So if you are developing FunWebApp, then all your c# will be rolled into FunWebApp.dll in your bin folder.
Use the Visual studio "Publish" option available on your UI Project. This will generates all the required files you neeeds includes, bin folder, Views folder(which will have the .cshtml files),Content folder,Script folder, Config file(web.config) etc.
Right click on your project and select "Publish". You will be shown a wizard where you can define what kind of publish you want. You have different options like FTP, File system etc.
You will not see the Controllers folder / Other class files because code inside that folder is compiled to your assembly which is in the Bin folder

How can I view/set build option in file properties

I feel like asking a dumb question, but I just do not see the options I need in Visual Studio 2010 File Properties. The only options I see are: File Name, and Full Path. What I need to set is: Build Action, and Copy To Output Directory.
Question update:
I just found out that File Properties shows the Advanced options for files in class libraries, but not for files from the actual web site. But how do I set the mentioned options to the resource file App_GlobalResources/Contact.resx , which by default does not appear in the published version of the web project?
From ASP.NET Precompilation Overview
Resources (.resx) files:
For .resx files in the App_GlobalResources folders, generates an
assembly or assemblies and a culture structure. For .resx files in the
App_LocalResources folders, copies files as is to the
App_LocalResources folder of the output location.
Assemblies are put in the Bin folder

Reading in existing file in Flex 4.6

Alright, I'm really new to flex. I have a data file on my computer that I need my flex mobile app to read from. Is it possible to put this file in a certain location on my computer so that the app will see it when I'm testing(ex-can i put it in a folder that is linked to the applicationstoragedirectory directory)? Thanks
You can just drop it in the source folder, it will automatically be copied into the bin-debug folder (there are a few choice exceptions that you can find in the window->preferences->Flash Builder->File Exclusions) Everything that is copied into the bin-debug would also be packaged into an air or airi file and ultimately deployed next to the bytecode/executable just like it is in the bin-debug in the builder.
You can also make another folder, say "resources" then in the project properties in the flex build path go to source path tab and click add folder button and type "resources". Then it will treat that and the src folder the same.

How to get ASP.NET website precompilation to exclude a certain folder

The several different environments (e.g. live, demo etc) of my web app are differentiated by config settings in a folder called EnvironmentConfiguration. Whenever I update one of the sites, I delete the EnvironmentConfiguration folder from the precompiled site before copying the website files over (i.e. in order that the EnvironmentConfiguration folder in the deployment location is not replaced).
Just to save mistakes, is there a way I can get Visual Studio not to produce the EnvironmentConfiguration folder when it precompiles the site for me?
You could try a couple of things.
1) Right click on the folder in the solution and select exclude from Project.
2) Look at each of the files in the folder and set the BuildAction property to 'None' rather than 'Content'

Resources