# Referencing FemDesign.Core from GitHub

**URL:** https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411
**Category:** C#
**Created:** [20 November 2024 15:42 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411 "2024-11-20T15:42:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![MarcoPelle](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/marcopelle/32/6_2.png) [@MarcoPelle](https://femdesign.discourse.group/u/MarcoPelle)
#### Post date: [20 November 2024 15:42 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411/1 "2024-11-20T15:42:56Z")

</div>

**how to use the development branch**

1. Navitgate to [GitHub - strusoft/femdesign-api: FEM-Design API](https://github.com/strusoft/femdesign-api)

2. Click on `Code` and `Open with GitHub Desktop`  

3. Open the .sln file with Visual Studio  

4. you can now choose a different branch(master is always the latest. The development branch follow the number of the milestone. The current one is 23.9.0)  

5. You can then reference this repository in your program so that you can get the WIP features 🙂

Theoretically, the same procedure can be done with a **FORK**.  
[https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)

If you manage to work in this way, you will be able to also create `pull request` and we would consider merging them in our repository 🙂

---

<div class="post-metadata">

### Author: ![KPN](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/kpn/32/379_2.png) [@KPN](https://femdesign.discourse.group/u/KPN)
#### Post date: [23 November 2024 09:06 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411/2 "2024-11-23T09:06:43Z")

</div>

I am currently using master.  
I can change to 23.9.0 dev but then I need to remake .csproj

 ![Mater_dev](https://europe1.discourse-cdn.com/flex017/uploads/femdesign_api/original/1X/583ab427d244ff90b0a59f883e4fd1125791c6b7.png)

Can I add something to my local FemDesign.Core?  
Example if I want to try adding a method overload to ConcreteMaterialProperties that changes mass.

In FemDesign.Materials.Material.cs

> ```
> public static Material ConcreteMaterialProperties(Material material, double mass)
> 
> ```

```
    {
        if (material.Concrete != null)
        {
            // deep clone. downstreams objs will have contain changes made in this method, upstream objs will not.
            Material newMaterial = material.DeepClone();

            // downstream and uppstream objs will NOT share guid.
            newMaterial.EntityCreated();

            // set parameters
            newMaterial.Concrete.SetMaterialParameters(mass);
            newMaterial.EntityModified();

            // return
            return newMaterial;
        }
        else
        {
            throw new System.ArgumentException("Material must be concrete!");
        }
    }

```

In FemDesign.Materials.Concrete.cs

> internal void SetMaterialParameters(double mass)  
> {  
> this.Mass = mass;  
> }

As the FemDesign.Core is locked I can’t add my code and test if it works?  
Would be nice before a pull request 🙂

---

<div class="post-metadata">

### Author: ![MarcoPelle](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/marcopelle/32/6_2.png) [@MarcoPelle](https://femdesign.discourse.group/u/MarcoPelle)
#### Post date: [26 November 2024 15:15 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411/3 "2024-11-26T15:15:27Z")

</div>

ehi @KPN

Have a look at the following blog post. I try to explain how to develop/collaborate on a project 🙂  
I hope is clear. If not, let me know and I will modify it with some additional comments.

> **[Fork and contribute to the API | FEM-Design API](https://femdesign-api-docs.onstrusoft.com/blog/20241125/fork-pull-request)**
>
> Fork and clone

---

<div class="post-metadata">

### Author: ![KPN](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/kpn/32/379_2.png) [@KPN](https://femdesign.discourse.group/u/KPN)
#### Post date: [27 November 2024 16:35 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411/4 "2024-11-27T16:35:01Z")

</div>

I read the post and I think it gives a good overview of a lot of the questions I have had 🙂  
Maybe one point could be to recommend commit (save) before switching branch?  
I have manage to lose some work not doing that 😅  
My understanding is that stash dosent includes untracked files that ex. new files are.

---

<div class="post-metadata">

### Author: ![MarcoPelle](https://dub1.discourse-cdn.com/flex017/user_avatar/femdesign.discourse.group/marcopelle/32/6_2.png) [@MarcoPelle](https://femdesign.discourse.group/u/MarcoPelle)
#### Post date: [29 November 2024 08:37 UTC](https://femdesign.discourse.group/t/referencing-femdesign-core-from-github/411/5 "2024-11-29T08:37:49Z")

</div>

> [@KPN](#):
>
> My understanding is that stash dosent includes untracked files that ex. new files are.

In reality, Stash is not deleting. They should still be in the branch where you stash them. Moving back to the branch, should make them reapper.

i.e. from A you move to B and you stash the changes (they will remain in A). If you then move from B to A, you should be able to unstash the changes.

I hope you can find your work again 🙂
