• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Is there a C# equivalent of war file as in Java?

 
Ranch Hand
Posts: 2949
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java has. war file.  Is there a C# equivalent of war file as in Java?

Thanks
 
Saloon Keeper
Posts: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure if it has single-file deployment, but web development for C# is what ASP.NET is all about.
 
Saloon Keeper
Posts: 15728
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, you're asking about a feature that has nothing to do with the language. C# is just what's inside the .cs files. Java is just what's inside the .java files.

How you deploy a web application depends on the web server you deploy it to. Most if not all web servers for Java applications support WAR files, but a web server might just as well expect the application in a completely different format.

For IIS, which is the most commonly used web application server for ASP.NET applications, you can bundle your web application as a .deploy.cmd file using WebDeploy. This bundle is really just a script that puts the files of your application in the right places and configures some settings. All of this can also be done by hand in IIS.
 
Rancher
Posts: 119
8
Mac Mac OS X Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Web Apps have a concept of "Publish". On a web project, you right click and say "Publish". It then gives several methods of publishing the web app. The war equivalent is to just zip up the deploy folder. It puts the content and the binaries in the right spot, relative to the deploy folder. One of the goals in .NET web publishing is to have an XCOPY deploy. (Where you just copy all the files into a folder without running installers). If you zip up this folder into a zip archive, this is equivalent to a WAR. If you use a build agent, they usually have the deploy artifacts as a zip.

The "Publish" menu option will also let you push the deployment to any number of services (FTP, IIS, Azure, etc). If you have a web project, and say "Publish", it will also build any dependent projects. It is equivalent to "Build and Publish".  

 
Saloon Keeper
Posts: 28319
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that .Net was supposed to support something they called an "assembly", although I last worked with .Net - and windows-native apps - in 2007. On WinCE.

C# is typically going to produce straight executables or DLLs. For complex apps, you'd generally deploy them with the Windows Installer, and for all I know they keep their assorted components in a ZIP file, although the installer then deploys them all over the filesystem (potentially).

The popularity of the JAR/WAR/CAR/EAR... (ZIP-based) format for deployables in Java is because Java runs in a Java Virtual Machine and the ZIP format allows the entire set of code and resources to be dumped in as a monolithic unit. C#, on the other hand, deploys straight to the OS (Windows), and complex C# apps can result in files being splattered all over the filesystem. So they're not really equivalent.
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic