Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Need "linked files"-like replacement for project.json #550

Closed
GrabYourPitchforks opened this issue Aug 19, 2014 · 2 comments
Closed

Need "linked files"-like replacement for project.json #550

GrabYourPitchforks opened this issue Aug 19, 2014 · 2 comments

Comments

@GrabYourPitchforks
Copy link
Contributor

Currently .csproj and other msbuild-based project types allow you to link source files that are included in a separate directory. The common scenario for this is that you have a separate src/Common/ folder filled with half a dozen or so .cs files, and individual projects link only the files that are applicable to them. So Project Foo might link A.cs and C.cs, Project Bar might link A.cs and D.cs, and Project Baz might link A.cs and B.cs and D.cs.

We need an equivalent of this in the K build system so that we don't duplicate shared source files among projects.

@davidfowl
Copy link
Member

We already have this. Take a look at the wiki or the EntityFramework or KRuntime itself. It shows how you can so this with either a shared project or linked file equivalent

@GrabYourPitchforks
Copy link
Contributor Author

Thanks for the reference! To other readers, this is the "code" key in project.json. EF for instance uses:

{
  "code": "**\\*.cs;..\\Shared\\*.cs"
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants