Our shop is testing out Visual Studio 2012 so that we're ready to use it once it drops, and I've been tasked with running it through the paces to make sure everything will work as needed. So far I have only found one issue, and that is deploying our solution with our web.config transforms so that I can then transfer it to the servers for use in on our development network. We've set up different configs (release, staging, development) as needed and they all work in VS2010, but when I try to find the place to deploy the package as I normally do I can't find anywhere to do it in the IDE.
I've found a ton of articles online about publishing to a server or using FTP but in our environment that isn't possible, we have to build it on our machine and then transfer it sneakernet style (not ideal but required) to the servers ourselves. I can't seem to find how to do this though. Does anyone know how to do this?
This may not be what you are looking for, but can't you right click on the root folder in solution explorer and select publish website? (I would have made this simply as a comment, but I don't have enough rep to do that.)
Related
I have developed a responsive asp.net website using Visual Studio 2015 Community by choosing the default ASP.NET Forms template . On my local computer, the website runs perfectly fine, but when I uploaded all the files of the website to the internet server, I found that I am not able to upload three files with .exe extension namely "csc.exe","vbc.exe" and "VBCSCompiler.exe" under the path "/Bin/roslyn". I raised a ticket to my hosting provider net4india and they are saying that they don't allow .exe files to be uploaded on server as they may be potential viruses. I had earlier developed this website on Visual Studio 2010 and was working perfectly fine on the hosting server also , but I wanted to make it responsive and I don't know how to use bootstrap, so I had choosen the template for ready-made coding, but now this is a big problem. I have googled a lot on this issue, but not found anything even near to what I am facing , even on stackoverflow. How can I resolve this issue ? Is any work-around possible for this like converting the .exe to .dll files or anything like that ? Please help.
You can deploy even without Roslyn with no change in code. Open NuGet Package Manager window and uninstall Microsoft.CodeDom.Providers.DotNetCompilerPlatform package and rebuild & republish. This will solve your purpose. Basically this will not generate any csc.exe, vbc.exe files inside bin folder.
No hosting provider will allow you to run exe files. If you really want that, you should go for (virtual) dedicated server.
I made the mistake of changing a subroutine in a project and publishing it. Now I want to revert back to the older subroutine. Is it possible to find the older project and retrieve the older subroutine?
Team Foundation Server can do this for you. You can now be set up without any hassle on your developement machine. The integration in the VS Team Explorer is seamless. Very easy to handle. See this guide for working with source control projects
https://msdn.microsoft.com/en-us/library/ms181384.aspx
Even easier and not so much overhead on your machine: sign up for Visual Studio Online (free for a 5 user team). The cloud source control is set up in minutes. If you are not against saving your data in the cloud give it a try.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
The alternatives (SVN, GIT) are also very good (consider reading about the difference of central and decentral source control) but need a little more knowledge and a good workflow.
If you happen to have lost changes before installing version control there's nothing you can do in visual studio. You can try a restore on file level (the option would be previous versions in the windows explorer)
as source code is plain text. There`s a "previous version" mechanism of windows explorer! Just go to the properties of your project folder
Note: previous version / shadow copying must have been enabled before or else the tab will be blank.
No, it is not possible unless you have stored your code in source control. It sounds like you have not yet done this, so I suggest using this is a (harsh) lesson and make the next move the one to install some kind of SCM.
You can signup for a free version of TFS online from microsoft the will integrate directly into Visual Studio. That will allow you to instantly check in changes and view the history of files and in this case, get a previous version of a file.
https://www.visualstudio.com/en-us/products/what-is-visual-studio-online-vs.aspx
I have many projects that I want to build using TFS Build. I have no problems with Windows Forms and WebForms PROJECTS.
But when I try to use TFS Build to build ASP.NET Website (the classic one), I have these problems:
I don't have any options to compile the project with Test Configuration (only Debug or Release).
I can't build an ASP.NET website because it's not a Web Project.
I want to know if there's a way to publish the website's precompiled files to the same shared location where I have my other projects.
I think I might need a bit more detail here, or maybe I'm just clueless :-)
Test configuration - I'm assuming you've set up a Test build configuration? If so, I'm not sure off the top of my head what's going on, but I've seen people forget to create the build configuration.
We've had no problem with our Websites, they get moved to build output or to wherever you specify in the Website properties pages
If you mean you want to use WebDeploy to publish, you're out of luck for the website - only web projects will do that. But do a little team build customization, and you should be able to emulate that.
Not super satisfied with my answer, but hopefully I've pointed you towards something helpful...
I would like to create a patch for my .NET application. The requirements are:
Find the installation directory
Overwrite the old files with the new ones
Restart a windows service
I want to send the updater to the user so that they simply run it and update the application. My original installer is created using Visual Studio Deployment Project.
I did alot if research, and found this:
https://stackoverflow.com/questions/3767/what-is-the-best-choice-for-building-windows-installers
How to Update the installed Window Application (Creating Patches)
http://wyday.com/forum/viewtopic.php?f=1&t=245&p=793&hilit=offline+install#p793
http://www.advancedinstaller.com/user-guide/tutorial-patch.html
I tried created another installer which would just contain the files I need to replace, however I could not find a way to determine the installation directory of my application.
WyBuild seemed like a good solution, however they do not support an offline install and require you to host the update files on the server.
I tried creating a patch using Advanced Installer but it just generates a bunch of build errors that I could not fix.
There are tutorials how to modify the MSI files using Orca or WIX, but that seems alot more complicated than it should be.
I am tempted to roll my own but I am not sure how to go about it, and this seems like such a basic requirement that there's got to be a solution out there already.
If you already use a a VS Setup Project you can deploy the new version of this project and it will upgrade existing installations. Have a look at the setup and upgrade ids. The stop and start of the service can be done by custom actions that can be defined in the project and will be executed i.e. when your setup is committed or rollbacked etc.
I have a C# console application written in Visual Studio 2008.
Usually I just build the application and then copy the files from the 'Release' folder but this time trying to do it 'properly' by publishing the application.
I went through the 'Publish Wizard' and end up with a 'Setup.exe' file in the specified folder. When running this setup file on another computer the install fails and indicates via a error message that:
Cannot download the application. The Application is missing required files...
When I select the 'details' button the error log shows that the program was trying to download files from the last version directory (ie 1_0_0_4).
What am I doing wrong? (aside from being tired...)
Show I de-activate the version auto-incrementing?
Unless you have a valid reason to do so, I would abandon the publishing and just go back to the XCopy installation. (And by Valid, I mean something other than someone told you that it's the "proper" way to do it.) I base this advice on the following arguments:
We used ClickOnce for all our WinForms apps for a while, but eventually it got to be more trouble than it was worth. For one thing, you need to deal with the security certificates. We had issues when we replaced a server with a new one with a different name, then we had issues when we replaced our development machines, etc.
You said this is a console application. ClickOnce publication seems to be overkill for a simple console application unless there are third party dependencies that you need to include in your install.
Don't get me wrong, I liked using ClickOnce for the ease of putting updates out there, and we use it still when it's the best option. However, in your situation, it looks to me like XCopy deployment should be sufficient for a simple console application.
Not knowing what you choose in the wizard, web or CD, the setup.exe file needs to be able to reference it's installation files. If using the CD method, you will notice in the output directory you revision directories, e.g. 1_0_0_4, where each revision of your app is kept. I agree with #David_Stratton, and unless you really need to use one-click publishing, don't. Just use xcopy (robocopy), zipfiles, etc. It will greatly reduce your stress levels down the road.
Everything David Stratton has stated is correct. ClickOnce is overkill for what you're trying to do, and publishing through Visual Studio has always given me headaches.
I might recommend taking a look at NSIS if you're looking for generating an installer for others. It's relatively simple to generate full installers that merely grab files from your /Release/ directory, with plenty of sample code for getting an installer working quickly. Once you have your working script, making your installers are as simple as a right-click and clicking compile.