Li Haoyi
Li Haoyi

Reputation: 15802

Creating a C# Portable Class Library using command line csc.exe?

I have not found any information on how to do this, or even if it's possible at all.

http://msdn.microsoft.com/en-us/library/e13syb43

does not mention anything about building a portable class library, and

http://msdn.microsoft.com/en-us/library/gg597391.aspx

does not mention anything about a command line interface.

Has anyone else tried to do this and found a solution/found it to be impossible?

Upvotes: 0

Views: 1177

Answers (3)

David Kean
David Kean

Reputation: 5772

Building portable libraries via the command-line is possible, you just need to pass the correct framework references. These determine what platforms you will support.

First, is the reason you want to do this via the command-line because you don't have Visual Studio Pro? If so, it gets a little tricky.

Upvotes: 1

GrayFox374
GrayFox374

Reputation: 1782

http://msdn.microsoft.com/en-us/library/gg597391.aspx will take you which supporting assemblies can go into your dll, or where it can be deployed.

http://videojugpages.com/pages/610-Microsoft-Visual-C-Express-Setup This link will show you how to create your dlls at the command line. This is pretty straightforward, and the general dll is no different from the portable type, except in where it can be deployed and on what it can depend. Hope this helps.

Upvotes: 0

Alexei Levenkov
Alexei Levenkov

Reputation: 100527

Normally you would build csproj with MSBuild from command line instead of manually calling csc.exe.

On other hand the project seems to be set of assemblies - you should be able to give correct set of references (may also need to disable default libraries) via csc command line and build by hand.

Upvotes: 0

Related Questions