1

I have been using apache ant to compile my java programs for quite a while, the problem now is that we have to learn to program in the .Net Framework. I have been struggling with the building process of my csproj in ms build. The requirement we have was to create a build file of a program using only the VisualStudio Command Prompt and notepad++ to create the proj file.

Is there any task in msbuild where i can package my files similar to java jar? I searched within the MsBuild task reference but haven't found anything yet. Any help would be appreciated, thanks!

Dude Bro
  • 1,152
  • 1
  • 10
  • 13
Jer Yango
  • 582
  • 2
  • 8
  • 22
  • 1
    A csproj is a type of msbuild file. You can pass it to on the command line msbuild.exe, it will create a .net assembly (usually a .dll or exe). Msbuild is found C:\WINDOWS\Microsoft.NET\Framework\msbuild.exe your.csproj /t:Build – James Woolfenden Jul 17 '13 at 07:56

1 Answers1

0

A JAR file allows Java runtimes to efficiently deploy a set of classes and their associated resources. The elements in a JAR file can be compressed, which, together with the ability to download an entire application in a single request, makes downloading a JAR file much more convenient than separately downloading the many uncompressed files which would form a single Java Application.

When you build a Dotnet application, you usually get a set of files (one .exe and multiple dlls as the simple scenario). These files being "zipped into one common file" ... that concept does not exist in DotNet. (except for Silverlight, but that's a different story...that's a "xap" file I believe).

Most people use a Msbuild Task to package their files together. I use something like this:

MSBuild and creating ZIP files

to zip up my "binaries" on 1 zip file, and zip up my config files in a separate zip file.

That's a "poor man's" method...but it works.

So there is not a direct apples to apples comparison.

..........

That's the simple explanation.

When .dlls reside in the GAC, that's a different ball game.

EDIT::::::::

Here is an example of an extender library to zip files using MSBuild.

How do I zip a folder in MSBuild?

Here is 2 of the most common extension libraries

http://msbuildtasks.tigris.org/

and

http://msbuildextensionpack.codeplex.com/

Community
  • 1
  • 1
granadaCoder
  • 26,328
  • 10
  • 113
  • 146