Elliot Blackburn
Elliot Blackburn

Reputation: 4164

Compiling a number of .cs files

I'm a little bit stuck. I've just checked out an open source project from google code for something and it's a nice little C# code base.

However there's no solution file or anything. I'm not really sure how to compile it from here on as I've always worked within a solution.

I can't seem to find a solution online and was just wondering if someone could tell me how to compile a number of .cs files together to run, or how to create a solution from them.

Upvotes: 0

Views: 96

Answers (3)

MHOOS
MHOOS

Reputation: 5306

Create an empty solution and add those files to an empty project [Need to figure out project type though].

Upvotes: 1

pmcoltrane
pmcoltrane

Reputation: 3112

  1. Create a new project. You will need to decide whether it should be a class library, console application, etc. depending on what the open source project is supposed to be.

  2. Right-click on the project and select Add -> New Item.

  3. From the file dialog, select all of the .cs files you wish to compile.

  4. If the project is not a class library, then right-click on the project and select Properties. Go to the Application tab and specify which class contains the startup object.

  5. Build the project and see if it works.

  6. Contact the project maintainers and ask them to include a proper project file. Offer to send your .csproj file if it works.

It's also possible to compile manually on the command-line with the C# compiler, but this would be more difficult.

Upvotes: 1

Ishtiaq
Ishtiaq

Reputation: 1058

If you project have .csproj file then create empty solution and add this project to the solution using .csproj file.
If you have'nt .csproj file then you have to figure out the the type of the project and then add these file to the project to make the solution.

Upvotes: 0

Related Questions