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

Change to Protobuild project #35

Closed
ghost opened this issue Jun 6, 2017 · 4 comments
Closed

Change to Protobuild project #35

ghost opened this issue Jun 6, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Jun 6, 2017

Hello ✋
What do you think about change the project to use Protobuild to generate the project files?

Protobuild offers some facilities and better organization for the project and is really easy to use.
🤙

@Genbox
Copy link
Owner

Genbox commented Jun 7, 2017

I'll take a look at it in the weekend and see what it has to offer.

@Genbox
Copy link
Owner

Genbox commented Jun 17, 2017

Looks interesting - I'm not entirely sure how to build the definition file as I have many projects depending on each other etc.

I would be happy if someone with experience in Protobuild could sketch up a solution and contribute it.

@dsaf
Copy link

dsaf commented Aug 6, 2017

Maybe the project owner @hach-que can help?

@hach-que
Copy link

hach-que commented Aug 7, 2017

Sure, what do you need?

Referencing another Protobuild definition or a GAC reference

Just add it to the references section like this:

<?xml version="1.0" encoding="utf-8"?>
<Project Name="ProjectA" Path="ProjectA" Type="Library">
  <Properties />
  <References>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="ProjectB" />
  </References>

Referencing DLLs in your repo, native DLLs or custom .csproj files

First you need to declare an external project definition (see http://protobuild.readthedocs.io/en/latest/external_projects.html for information on how these are structured and what you can do with them). Then you'd reference the external project just as you would any other Protobuild definition:

<?xml version="1.0" encoding="utf-8"?>
<Project Name="ProjectA" Path="ProjectA" Type="Library">
  <Properties />
  <References>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="ExternalProject" />
  </References>

Referencing NuGet packages:

First add the package to your module by running:

Protobuild.exe --add NameOfNuGetPackage@SpecificVersion

then reference the NuGet package:

<?xml version="1.0" encoding="utf-8"?>
<Project Name="ProjectA" Path="ProjectA" Type="Library">
  <Properties />
  <References>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="SomeNuGetPackage" />
  </References>

Referencing a Git repository

If you want to reference another Git repository that's using Protobuild (like MonoGame), you first add the Git repository as a package e.g.:

Protobuild.exe --add https-git://github.com/MonoGame/MonoGame@develop

then reference the specific projects in the package you want to pull in:

<?xml version="1.0" encoding="utf-8"?>
<Project Name="ProjectA" Path="ProjectA" Type="Library">
  <Properties />
  <References>
    <Reference Include="System" />
    <Reference Include="System.Core" />
    <Reference Include="MonoGame.Framework" />
  </References>

@Genbox Genbox closed this as completed Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants