Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples for C# #741

Merged
merged 3 commits into from
Jul 10, 2018
Merged

Add examples for C# #741

merged 3 commits into from
Jul 10, 2018

Conversation

acco32
Copy link
Contributor

@acco32 acco32 commented Jul 4, 2018

No description provided.

To reference a particular folder on linux, you can either: explicitly set the **LD_LIBRARY_PATH**; or create a new configuration file with the path of the library folder in `/etc/ld.so.conf.d/` and then run `sudo ldconfig`. The former will set the path on a system level so that you don't have to use the environment.

### MacOS
To reference a particular folder on linux, you can explicitly set the **DYLD_FALLBACK_LIBRARY_PATH**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to use DYLD_LIBRARY_PATH it seems the fallback one doesn't play well with homebrew and security.

src: boxen/puppet-java#37

@Mizux
Copy link
Collaborator

Mizux commented Jul 4, 2018

@acco32 Just a question, we already have examples in examples/csharp and examples/fsharp in this case why don't using git mv ?

@Mizux Mizux self-assigned this Jul 4, 2018
@Mizux Mizux added Feature Request Missing Feature/Wrapper Lang: .NET .Net wrapper issue labels Jul 4, 2018
@Mizux Mizux added this to the v6.8 milestone Jul 4, 2018
@acco32
Copy link
Contributor Author

acco32 commented Jul 4, 2018

We can. I want to create projects referencing net core (Both C# and F#) as well as organize the folder a bit better (i.e.: add remove examples as necessary with some better instructions)

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "examples", "csharp\examples.csproj", "{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csharp", "csharp\csharp.csproj", "{0899C5EB-2AD1-49C1-9AB3-735E5B81BF56}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "examples", "fsharp\fsharp.fsproj", "{B0E80F2F-BDB3-4688-8E27-5678173DC28C}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's call it "fsharp"


## CSharp
## CSharp/FSharp project examples

By default all the examples are compiled in a console applicaiton with the startup object being the **Classname.Main** so that when compiled the entrypoint will be known.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

application

@Mizux
Copy link
Collaborator

Mizux commented Jul 6, 2018

Two questions:
Did you remove some examples or just move them ?

Why did you put them in csharp-netfx do we rely on netframework ? I believe we only use netstandard2 and netcore2 ?

Sorry for this dumb questions

@acco32
Copy link
Contributor Author

acco32 commented Jul 6, 2018

I moved them. The library itself is made in netstandard2.0. We don't rely on the framework any more but I left them in to show an example of compiling with the framework if that is all you have.

netcore right now does not allow you to compile single source files. For instance the F# examples use the library with a netstandard reference yet they are compiled with mono. The other examples reference the netstandard library but are built with netcore.

Just showing all possibilities. However we should probably put in some recommendation to use netcore for application development.

@Mizux
Copy link
Collaborator

Mizux commented Jul 6, 2018

if OK, let's merge it as it.

@Mizux Mizux merged commit 10b3d54 into google:master Jul 10, 2018
@acco32 acco32 deleted the dotnet-examples branch July 21, 2018 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Lang: .NET .Net wrapper issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants