Perhaps I'm missing a setting here...seems like I am, but I cant see it!!
I have a deployment package, which works except...it deletes everything in the site that I am deploying to.
I have a web application beneath the site that I am deploying and I dont want that to be touched.
That has its own deployment package.
Any ideas?
Thx
Related
I made some updates to my ASP.NET MVC website, including a change to this ViewModel. It works 100% fine running IIS Express in Visual Studio after a build in Release. However, after publishing... it is not updating this specific ViewModel for whatever reason.
That property is 100% there. I have no doubt this should be working. Something is going on with either the publish or the IIS server itself. I think it is the publish, because I have been deploying the last build .zip file and it works fine. Only the recent publishes with this new update are acting up. It's driving me crazy.
Is there anything I can do to make sure this is publishing fresh or building fresh?
EDIT: I was able to manually copy my project's .dll file to my web server and it worked. Why would the publish not update my .dll file? I am publishing to a fresh .zip file each time.
If you change only the views, CSS, javascript, you could xcopy command to only the modified files but if you change the source code you need to recompile the application and redeploy it.if you change your source code you only need to xcopy your particular dll. No need to redeploy whole application unless you didn't split your application in multiple logical layers.
You can refer the below link for more detail:
how to make changes on a deployed Asp.net MVC website
This may be a basic question, but I've searched for a little while and couldn't find anything specific to this.
I bought a domain and created the web app in Azure for hosting, and set up the DNS so that it's linked to the Azure Web App. Using Visual Studio 15, I opened the website via the FTP connection settings found in Azure, and was able to create files, edit the html, css, etc. Going forward, I wanted to use Web Deploy with Visual Studio to push new builds of the code up to the web site. I downloaded the publish profile from Azure, and imported it into a new visual studio project. I also copied all the previous files over(it wasn't alot). I got the correct Web Deploy settings and successfully published the solution to the Web App in Azure. However, it never updates the code with my new changes. When I look at the site in Firebug it still has the same files/code that it had when I edited it via FTP.
Any idea what I'm doing wrong?
I followed your steps and everything published perfectly for me. Did you try to simply refresh the file list to make sure Visual Studio is seeing all your files? Are they included in your project?
Also, when you go to publish, on the 4th step labeled preview, try to hit "start preview" and see if it detects any changes.
Also, could you tell me a bit more about your project? Is it a website project folder, mvc solution, etc?
You could try to clean the website to make sure your new files are getting deployed.
Clean Windows Azure Website
I am deploying asp.net web site via Octopus deploy. In TFS build definition I specified PowerShell script which pack and push Nuget package. Everything working working well except one thing: bin folder is not included in Nuget package.
When I tried to manually packing my web site into Nuget package I noticed that bin folder is included.
I supposed that something happened in TFS build process and bin folder is lost. But I cannot figure out how to solve this.
Any advice?
It sounds like you are trying to build a Website rather than a Web Application. Websites are only supported for legacy and don't get any love in the tooling. You can:
1) manually create your website layout for packaging with a post-build PowerShell script.
2) upgrade from a Website to a Web Application project and feel the love.
To upgrade you can create a new Web Application project in VS and delete all the specifics, like aspx files or other overwrites. Then drop the left over files on top of the Website, and open it in your solution. You will have two entries, one for site and one for app. Fix up the web app errors and build...
I am having some problems deploying an app I created to IIS on Amazon AWS. I have basically taken a sabbatical from development and haven't deployed an app in over a year.
The app has been transferred across fine and runs to the point of causing errors and displaying that frameworks are missing etc. I solved this in the past by:
Changing what version of .NET was being used on the server
Including all DLLs when the programme actually transferred (not what it does by default)
For the life of me, I cannot remember how to include all DLLs when deploying the programme so those can be relied on instead of the system's frameworks. Can someone please remind me?
You can do Right Click on Project and select Add Deployable Dependencies from the context menu
As of MVC4, all necessary assemblies to run an MVC application are
automatically added to the bin directory, and any MVC4 application is
bin-deployable (means you can run it in a server without explicitly
installing MVC) . For this reason, the Include Deployable Assemblies
dialog has been removed from Visual Studio 2012
More here: https://stackoverflow.com/a/10441585/1241400
Are you by any chance talking about Bin Deploying MVC? It's kind of a pain to do, considering you need to remember to make sure those dependencies are in your bin folder any time you either move the application around, put it on a new server, etc.
What errors is your displaying? I think you'd probably be better off resolving those, if possible. Windows has gotten much friendlier with installing updates in the past few years.
Whenever I publish my MVC web application in VS 2010 via the One-click publish feature (I'm not doing any web.config transforms or anything fancy - yet!). The next time I come to build the app I get the following error:
It is an error to use a section registered as allowDefinition='MachineToApplication'
beyond application level. This error can be caused by a virtual directory not being
configured as an application in IIS. in ...MyWebApp\obj\release\package\packagetmp
\web.config
A new copy of the web.config file is indeed created by VS2010 below the ...MyWebApp\obj\ folder so I deleted the whole obj folder and I was then able to build again.
But I shouldn't have to do that each time I publish - I must have something configured incorrectly - can anyone help please.
Thanks.
This is unfortunately a known issue with Publishing a web application to the file system. This still affects the release version (RTM) of Visual Studio 2010. It's not limited to the Beta or RC versions.
This problem "bit" me also, and I too was having to manually delete the Debug and Release folders inside the obj folder within my web site solution folder.
The real answer for an automated "workaround" can be found in this answer to the other Stack Overflow question:
Why do I randomly get a “error to use section registered as allowDefinition='MachineToApplication'” when building an MVC project?
In a nutshell, you need to delete the web.config files from either the Debug or Release folders (or both!), and that's achieved with a pre-build command (configured in the Build Events tab of the Project Properties page of your solution):
del "$(ProjectDir)\obj\Debug\Package\PackageTmp\web.config"
del "$(ProjectDir)\obj\Release\Package\PackageTmp\web.config"
Personally, I delete the entire obj folder since all those files are re-created with each build anyway.
I have just found a work around for this that has worked for me, open the .csproj for your web project and change the node under the Project\PropertyGroup node to this:
from this:
<MvcBuildViews>true</MvcBuildViews>
to this:
<MvcBuildViews>false</MvcBuildViews>
This has worked for me, hopefully it will work for you also.