What files do what in a release in MVC with visual studio - asp.net

If i release(publish) a mvc project to a folder. Lets say I make a change to _layout later in my solution and publish again, what files do i need to update on the ftp? bin or (_layout in views folder)?
When do I need to update stuff in View or bin?

bin folder contains your dlls, you project dll let's say project.dll is subject to update when you compile your server side code.
Otherwise it is enough update only relevant view file.
You can publish one invidual file thus update it to ftp

Related

Just publish modified controllers, models and some parts of a ASP.NET MVC project

If I change my views (.cshtml) or styles (.css) or scripts (.js) in my MVC projects then I can publish it easily by right click on it and select Publish FILE_NAME
If I changed some controllers files or BLL classes or infrastructure classes,
Which files should be published? which DLLs?
Of course added references must be published but what are another?
Should I publish all the DLL files in the bin folder or just some?
Is there an easy way to VS detect modified files and publish theme by a command or...?
Edit1
I use FTP method to direct publish and upload our site to the server.
My Publish Preview Step Snapshot:
What is the name of DLL files that contains the compiled information of controllers, BLL classes and...?
I just published the MVC5Bootstrap-3-1-1-Less.dll and it worked!
So if we uploaded a website and then want only publish the new modified controllers or classes of the MVC web application (here: MVC5) to the server, we should upload the following files:
MVC5Bootstrap-3-1-1-Less.dll after build
Added references to the bin folder after build
Here is a image of how publish DLLs of bin folder from Visual Studio:
The publish wizard on the project (right click on project > Publish...) should automatically determine which files have changed and need to be updated, and show you what files will be updated.
After clicking Start Preview:

Publish Project to Web Server, Include folders/files in Local Bin

I have a Visual Studio 2013 Web Project with Umbraco and UCommerce imported into the project and a site built out.
The issue is that uCommerce adds a folder called uCommerce in the build directory with all of it's dependency dll's and Publish doesn't include it in the destination.
Is there a way I can set the project file to include all contents in the Bin folder for the publish?
You need to include the uCommerce-stuff as Content in your project. To do this, either
Go through each and every file in the uCommerce folder and add it to your project using "Add -> Existing item...", or, if that's way too many files,
Include the uCommerce folder via a wildcard. You will need to edit your project file manually for this. This SO question has the details (make sure to check out the highest-ranked answer, not just the accepted answer).

Where is the compiled dll for a Website project

One query regarding a Web-Site project in Visual Studio -
I did following steps -
Created a WebSite using VS 2010
Added a custom class in App_Code folder and consumed it in default.aspx
Run the application and I can see the result
Any changes made in server code are reflected on the browser without doing any recompile (website feature)
So, when dynamic recompilation takes place for a web-site, somewhere .net run-time will be storing the compiled dll, isn't it?
Can anyone please guide where I can find the dll being generated during dynamic build are stored? (I just want to know this out of curiosity :-))
Thank you!
P.S. I also did a 'Publish Website' and I can see a bunch of compiled dlls in the publish folder. So, my Question is only regarding dynamic build.
The dynamic created files for your web site are stored on
c:\WINDOWS\Microsoft.NET\Framework\version\Temporary ASP.NET Files\
You can change this directory on the web.config. The asp.net check if any file change on your site and if can find any changes is start the recompile. Also many parameters of the recompile can change on web.config.
How to change this directory
<compilation tempDirectory="" ...>
and this is the rest of the compile options: http://msdn.microsoft.com/en-us/library/s10awwz0(VS.100).aspx
You may find the name & location of Code Gen Directory via property of HttpRuntime.CodegenDir programatically.

TFS 2005 version control DLLs in the bin folder?

I noticed that the DLLs in the bin folder for asp.net websites do not seem to be getting saved. When I goto a new computer and get latest I am missing the DLLs.
What is the correct way to fix this ? Should I create a seperate folder to contains all DLLs ? And then can I somehow tell my bin references to goto that folder to get the DLLs?
If you are using third party dlls, you should absolutley consider putting them into TFS...
If those dll comes from another project from the same solution, you should not put them into TFS.
If you use a base class library in multiple solution, I would consider using the build functionality that TFS offers. You can access your latest build from a network share (add this share as a trusted source) or directly access those dll files from TFS source control.
EDIT: you can always go back in time in tfs without having to save whats compiled....
You do not want to check your compiled .dlls in with your source control. If you have other dlls that are not directly compiled by your application then you should create a library folder in your directory structure that contains then, and check that folder in.

What ASP.NET MVC project files should I not add to Subversion

this is likely a naive question, but I want to do this right the first time.
I have a MVC solution which has the following:
Data project - C#
Services project - C#
MVC Web Project - ASP.NET MVC
Test Project
Currently, I am using the MVC2 source as a means to debug my own code. I do not plan on checking that in, but I realize once I go back to the MVC2 DLL, my solution will change.
I'm pretty sure I just shouldn't check in stuff that changes with each build: the bin folder on the Web project, for example.
Is there a list of what not to commit to source control? :)
Exclude the bin folder. Also be on the look out for .user or .suo files. Those file store your own settings and will change from user to user so it shouldn't be in source control.
If you're using a database stored in the App_Data folder, be sure to ignore that as well (the database file, not the App_Data folder).
Generally, I exclude the bin and obj folders of every project from source control. I can't remember needing to do anything else.
do you use ankhsvn?
i think ankhsvn automatically exclueds directories which are not needed in subversion
cheers

Resources