Publish Project to Web Server, Include folders/files in Local Bin - asp.net

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).

Related

What files do what in a release in MVC with visual studio

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

Referenced Project Different Output folder

I have a web site project with three referenced project. The question is really simple. For the refereneced project (say Project A and Project B referenced from Web Site Project). All I want to do is to reference it in the Web Project but I don't want it to copy to the 'Bin' folder of the web site project. I want it to copy to a folder that I define. Is there a way to do that? Many thanks.
I'm pretty sure you cannot change the ouput path if you build the referenced project. You can change the properties of the reference in the node references by right-clicking => properties, there is a property called copy local which will prevent the copy in the /bin folder. This means you will always reference whatever version of the dll is being pointed at in the Path property

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.

How can I exclude a folder from a .NET installer for a website?

We have an installer for a website of ours which works great, I exclude the web.config and a few other files when creating the installer. However I can't seem to exclude a folder. Is this possible?
I've created the installer using the .NET built in Web Setup Project found in the visual studio group Other project types > Setup and Deployment within the new project dialog. This only has the option of including groups of output and excluding files via the filter.
What technology are you using to generate your installer?
Edit after additional info in the question: OK, I haven't worked with the built in Web Setup Project, but I did use a regular setup project once. You control the output of each project that's included in the setup by setting the Build Action property of each content file. Set it to None to exclude a file.
There isn't a Build Action property for a folder, so you'll have to set it for all the files within a folder. If a folder doesn't have any content files, then it shouldn't be included in your setup project.
The only way I found to exclude entire folders and any files within sub-directories was to modify the deployment project which fed into my Installer. Check out the following for information removing folders pre-build:
http://www.meadow.se/wordpress/?p=137
And this for post-build:
http://blogs.msdn.com/webdevtools/archive/2008/10/05/exclude-files-and-folders-from-wdp-output.aspx

Web Deployment Project builds files that are no longer part of the project

This is the error I get:
Error 101 Could not load type
'control'. /Test.vbproj/x.ascx 1 1
WebDeployProject
This is a left over file that was part of the project last week, but one of the developers deleted it from the project. I have to manually delete the file in order to get the WDP to build. Is there a way to tell the WDP to ignore the files that are not part of the project or to see that these files are not part of the project and delete them?
You'll need to use your source control tools to find and remove local files that aren't under source control.
For instance, if you're using TFS, do the following:
Open Source Control Explorer (View -> Other Windows -> Source Control Explorer)
Right-click on the path in TFS that corresponds to your local working copy and select Compare
Use your TFS path as Source Path and your local working copy as Target Path
Under View Options, select "Show items that exist only in target path"
You've now got a list of all the files that exist in your local working copy but aren't in source control. For each file, either delete your local copy or add it to source control.
It could have something do to with the type of web project is it.
If it's a web site, then the compiler will attempt to compile every file in the folder. However, if it's a Web Application Project, then it will only compile those that you've specifically added as part of the project.
If you have recently deleted/removed a file from your project then you need go to Project > "Show all files" and all removed files will apear in your solution explorer. You can delete the file, /x.ascx and rebuild your WDP.
It has nothing to do with the type of Web project: http://amiraryani.wordpress.com/2008/11/06/web-deployment-project-aspparse-could-not-load-type/.
A Web Site itself considers files under its root directory as part of the site.
A Web Application Project itself allows you to customize build actions, etc. on a per-file basis.
A Web Deployment Project, however, will try to include files under the root directory (a la a Web Site), even if the WDP is associated with a WAP. That's why it doesn't matter which kind of Web project it is.
EDIT: To clarify, it would matter what type of Web project you are using if you were trying to Build, Debug, or Publish that project itself instead of using a WDP.

Resources