My web application has two build configurations, Dev and Prod. There is a custom build step that will copy some extra config files to the bin folder, and the files are different depending on the build configuration.
This all works well when I do a build, but when I Publish to a FileSystem, these files are not copied over from my bin folder to the publish destination path. Any ideas how to get around this?
Are you setting the "Copy Local" property to true?
When you publish to the local file system, this will copy the files locally.
Related
I saw an upload folder inside the AdminServer - but it seems that it doesn't recognize or re-deploy the new sets of JARs files even after recycling.
The upload folder is where weblogic stores uploaded files (with an ant deploy task or uploaded with the console). But it also references them in the domain/config/config.xml file. That's why it does not automatically deploy them (weblogic does not scan this folder).
What you want to use is the domain/autodeploy folder (which is only scanned by weblogic in development mode).
I am publish my website application . I am storing all my data in XML files in App_Data folder and in some other folder too.
The steps i follow are
1) Publish using visual studio 2010 asp.net c#.
2) Then copy my all file from "\Debug\PackageTemp" and paste in "C:\inetpub\wwwroot"
The files in wwwroot are being used my inetmgr and my system now acts as a server.
Am i doing it right ?
One More Question .
If i publish and follow the steps as mentioned above ,then for second time all my data (in XML file)get reseted.
So i wrote a batch file which will keep all my data files in backup and after deploy my website i vl copy my backup files in respectively folder ..but i dont know when to call my batch file .Is there anyway to call these batch file while i am doing my deployment ..
OR
there is any feature provided by microsoft visual studio to keep backup and automatically copy these files or not to modify some files
Once you Publish your solution, try selecting the Publish Method as "File System". Then point the target location to any folder on your system/network and click on the Publish button in the dialog.
Just copy all those files and directories that are created in that location, to either your FTP folder in case of a Web Deployment or to a local/network folder and configure a website from IIS.
I've got a basic ASP.NET Web Application with the following publish settings:
Publish to File System.
Delete all existing files prior to publish - Ticked
Precompile during publishing - Unticked
Exclude files from the App_Data folder - Ticked
While the publish does work as expected, it seems to publish quite a bit of extra baggage.
\bin
Web.config
Web.Debug.config
Web.Release.config
WebServer.dll
\Properties
AssemblyInfo.cs
\PublishProfiles
Release.pubxml
MyWebForm.aspx
MyWebForm.aspx.cs
MyWebForm.aspx.designer.cs
Web.config
Web.Debug.config
Web.Release.config
WebServer.csproj
WebServer.csproj.user
Out of all this, I'm able to remove everything but the following:
\bin
WebServer.dll
MyWebForm.aspx
MyWebForm.aspx.cs
MyWebForm.aspx.designer.cs
Web.config
So, my question is two-fold:
Firstly, why does the publish option, publish various things such as *.csproj files, or the *.config files in the bin directory etc. as the site appears to function perfectly well without this baggage. What is the purpose of these files being made public?
Secondly, is there a way to configure the publish operation to just publish the minimum required files for the project?
I'm not sure as to the reason behind the publish option is publishing the unrequired files, but it seems there is a very easy way to stop it. In the properties of the project under the option "Package/Publish Web" there is a group "Items to deploy", where I am able to select "Only the files required to run the project".
I am working in ecommerce website using NopCommerce2.2. I hosted the website by copying the complete source code in the wwwroot of the dotnet panel. It was working fine. But the size was huge. It was around 700MB. So I published the Nop.Web and its Administration. The site was working fine in the localhost(i.e local server) using IIS7. But when I copied the contents directly to the wwwroot in the global server,it was redirecting to the error page errorpage.htm?aspxerrorpath=/ instead of the site. Can anyone suggest a solution?
Copy your website (all folders and content) from your development computer to an application folder on your remote hosting computer (server).
Make sure the bin folder, on your remote hosting computer, contains the same dll files as on your development computer.
Copy Your Data
If your application contains data or a database. For instance an SQL Server Compact database (a .sdf file in App_Data folder), consider the following:
Do you want to publish your test data to the remote server?
Most likely not.
If you have test data on your development computer, it may overwrite production data on your remote hosting computer.
If you have to copy an SQL database (.sdf file), perhaps you should delete everything in the database, and then copy the empty .sdf file from your development computer to the server.
THAT'S IT. GOOD LUCK !
You need to follow the following steps as I mentioned
For Publishing the NopCommerce Application website below is the step:
Step : 1 - Publish the Nop.Web project.
Step : 2 - Publish the Nop.Admin project.
Go to the publish folder where your publish created
Step : 3 - Cut all dll from the Administration and Paste all dll to bin folder which in main bin folder for whole project.
Step : 4 - Copy two things from your source project and in App_Data folder Settings.txt and InstalledPlugins.txt which is not published in your publish file so paste this two files in your publish folder in App_Data. (You need to change the connection string in Setting.txt as per your database host).
Step : 5 - Now you need to copy whole plugins folder from your source folder (but remember this plugins folder you need to copy from the Presentation folder not from the main source where the solution file are there.).
Step : 6 - Now your publish have been ready.(now you can deploy on hosting server)
TFS generates a publish directory under the build agent working directory:
Z:\TFSBuilds\1\box\CT\Binaries\\_PublishedWebsites
I am supposing that this is where TFS is automatically publishing the site. How can I use it for auto publishing of sites... as Should we refer our IIS website to this directory. What is the purpose of it?
Firstly, the working directory is as the name says, a "working" directory. That is where the build agent downloads the source, perform compiles etc. It also clears the working directory whenever you run the build again so you risk grabbing unfinished artifacts when you try to retrieve from the working directory.
TFS defines a "drop folder" that it will copy the final artifacts to, once the build completes. You can define the drop folder for a build by editing it's build definition:
Right click on the build and choose 'edit build definition.
Select the 'Build Defaults' section.
Tick 'This build copies output files to a drop folder'
Enter an UNC path for the build agent to copy artifacts to (make sure the Build Agent has access to that UNC path!)
Secondly, in regard to _PublishedWebsites. The build agent will create a _PublishedWebsites folder for each Web project it builds as part of its build artifacts (so if you tell it to build a solution with 2 web projects, it'll create [Project name A]\_PublishedWebsites and [Project Name B]\_PublishedWebsites). Inside each _PublishedWebsites folder are the contents to be dropped into an IIS application, same as what you would get by right clicking on a web project and selecting 'Publish'. I normally add a last step in the build workflow to copy the contents of this _PublishedWebsites folder to my desired IIS directory.
This link tells you how to add the copy workflow: TFS 2010: Copy _PublishedWebsites to test server
And here's more on drop folders: http://msdn.microsoft.com/en-us/library/bb778394.aspx