Building Xenko from source with VS2015/17?


Hey guys,

I’ve been trying to build Xenko from source for the last couple of days in the hope of integrating it into a WPF application.
However… I’ve not managed to build it at all.

Did any of you manage to build it from source? (I’ve been looking around but could not find anything relate-able) :slight_smile:

Compilation of GIT code

There is already a thread on building form source. Search build form Source and see if that helps


Also have you looked at I don’t think you still need VS2013 though.


Yeah, I’ve already pretty much looked at everything in the git, starting to even start to fix the dependencies by hand and stuffs. For those that I could add reference to in my project (CppNet for example in sources/common/deps/CppNet is not wanting to hear anything although needed for the Shaders module)

Which is why I ended up asking if anybody ever did it so far, since I could not find much about it.


If this is the thread you were referencing to, you will see by yourself that there is nothing helpful regarding this build issue, it does not seem like it has been resolved either.

For information. I’m trying to build from 1.10 release tag. I will try from the head revision of 1.9 now.


In the current state of publicly available sources, there might be some errors or warning in some test projects but you probably don’t need them. What you need is just to build the “20-XenkoRuntime”.


Thanks for your answer.

Unfortunately, 20-XenkoRuntime will not build since sources\common\shaders\SiliconStudio.Shaders\SiliconStudio.Shaders.csproj [Debug|Any CPU] fails to build as it cannot find the CppNet namespace and I cannot add a reference to any of the CppNet.dll located in source/common/deps/CppNet to the above-mentionned project.

It then makes Shaders.Parser, Shaders.Compiler fail (obviously), but then also makes Graphics, Games, Input and Engine to fail as well.

If you wish to reproduce, you could probably just grab the up to the commit with the hash: edd831dfb06c040873f4a9a5dc05b9ea3437fe63 and try to build it straightaway with VS2015.

I hope this provides a little bit more informations and can help progressing through this situation! :slight_smile:


Did you make sure you have all prerequisites installed? Like Autodesk’s FBX SDK for instance? I don’t have issue to build the runtime from the public sources.

Also you need git LFS otherwise some binaries in the deps folders won’t be downloaded.


Hm. The Autodesk FBX SDK is the only one I am missing. I guess that I will take a look at that (currently we share something like an ADSL connection at work, so downloading anything takes ages and is to avoid).

I will let you know if that helps. Thank you :slight_smile:


So I downloaded the Autodesk SDK, which removed the error regarding FBX stuffs but it does not change that the Xenko.Shaders module cannot find CppNet’s reference sadly.

2>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly ‘CppNet.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
2>C:\GitRepos\xenko\sources\common\shaders\SiliconStudio.Shaders\Parser\PreProcessor.cs(7,7,7,13): error CS0246: The type or namespace name ‘CppNet’ could not be found (are you missing a using directive or an assembly reference?)
2>C:\GitRepos\xenko\sources\common\shaders\SiliconStudio.Shaders\Parser\PreProcessor.cs(94,39,94,45): error CS0246: The type or namespace name ‘CppNet’ could not be found (are you missing a using directive or an assembly reference?)
2>C:\GitRepos\xenko\sources\common\shaders\SiliconStudio.Shaders\Parser\PreProcessor.cs(96,46,96,52): error CS0246: The type or namespace name ‘Source’ could not be found (are you missing a using directive or an assembly reference?)
2>C:\GitRepos\xenko\sources\common\shaders\SiliconStudio.Shaders\Parser\PreProcessor.cs(96,34,96,45): error CS0115: ‘PreProcessor.ErrorListener.handleError(Source, int, int, string)’: no suitable method found to override

As far as I know, I have git LFS as well.


Can you run the following command in a git shell: git lfs env and tell us what are your git and git LFS version?
What is the size of the CppNet.dll file?


Git LFS: 1.5.5 (Github; windows amd64; go 1.7.4; git c2dcd6f5)
Git version

The CppNet.dll in the CppNet folder is 1KB, as are the ones in the sub-folders.
(Now that you mention it, it sounds a lot like corrupted files. But git considers them as correct it seems)


You probably clone the repository incorrectly: it basically means that git LFS is not activated on your clone. Did you follow the instructions from this page:
To properly clone you needed to do git lfs clone

On your current repository clone, try running git lfs pull.

Note: your git LFS version is a bit old (although it should still work). If the above commands don’t solve your issue, try upgrading to git LFS 2.0.


Sorry for the long reply, since it’s a bank holiday weekend.

I’m looking that up at home and one thing I definitely do not remember is the post-cloning part of “downloading deps”. So my guess is that I only have the “temp” files that were meant to probably be used as references. Or something like that.

I can’t remember how I cloned the repo, but I may have downloaded the .zip and just extracted it and then pulled from it. Or whatever…

It’s still getting all of the samples and deps etc, so I will let you know how that went once all of this is done. But it looks like this is definitely the issue!

Thanks for your time (and in helping me find that I’m just stupid! :smile: )


So I can confirm you that I got it to compile here (especially for Vulkan, my main interest here). So it works and I’m just having a completely messed up LFS repo on my work-machine.

Thanks for you help again!


You’re welcome. Honestly I was afraid it was a more serious issue.


That was the first time I was really making use of git LFS. Sorry.

My apologies that I had you worried, but everything is fine!! (on master branch. I did not try the 1.10 yet. :slight_smile: )


Hi Hayaweh,

i am glad to hear that anyone could build the souce completetly.

I tried several times and eventually gave up.

My last attempt ended with the problem that the command

git lfs clone

gave me the error message of having no access authority althoug i was loged in.

I will try again …


You should try to use HTTPS rather than SSH :slight_smile:
It will most likely be faster and bring a lot less issues!

Let me know if this helps.

EDIT: @bettina4you The new git clone command would be

git lfs clone

The git for 2.0 and more seem to be located here: Xenko Git


Just a feedback for the community.

The build process has been improved very much with the actual version 2.0

Pleas remark: I did this all without having installed the xenko game engine so to say the editor with the runtimes !!

My try was to setup from ground up.

  1. Download with git lfs clone
    works perfectly

  2. Download an install of the fbx sdk is also no problem

  3. setting the environment variable

  4. build the engine
    a. with VS2015 worked but has a lot of reference errors
    b. with download and fresh install of VS2017 community: woked references are ok

You have to know that some of the many project are shown as not loaded or can not be found, =>they are not neccesary so fas as i can see so they can be neglected.

  1. build the samples
    a. with VS2015 all references are missing problem
    b. with vs2017 worked.

With some sample projects there is the error that i must be compiled with the “alow unsafe code” option but check field in the project properties is ghosted.

Fix: open the coressponding *.csproj file in a editorl search for the entry and set it to true by hand.( just override in the editor )

Some Samples are working but give runtime error because of missing internet connection.
This i could resolve but a simple continue in Debug mode does continue the programm an it works.

all in all a big improvement !!

=> => => But i still have a big question to the normal build process of the samples.

Somewhere in the build / compile process there is the command to execute an external programm
to build or compile the assets in the package or something similar.

In c++ i can see all command that happen when comiling a solution. But with c# i cannot find the action command for theese additional tasks in the build process. it just happens.

Can someone give me an advice how the build process of the samples is managed ??