question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Builds failing due to missing assembly references

See original GitHub issue

Bug description I’m trying to migrate over to using GameCI and I’m having an issue with builds failing due to missing assembly references from .dlls included in packages or included in the Assets folder. When building the project with the Unity editor it builds and works, the same when using a build script in a bat file and running that on a new clone of the repo.

The error is:

error CS0246: The type or namespace name 'Steamworks' could not be found (are you missing a using directive or an assembly reference?)

How to reproduce

  • Import packages with dlls
"com.unity.netcode.gameobjects": "1.0.0-pre.6",
"com.community.netcode.transport.facepunch": "https://github.com/Unity-Technologies/multiplayer-community-contributions.git?path=/Transports/com.community.netcode.transport.facepunch"
  • Run unity-builder action

I have created a public repo demonstrating this. Repo: https://github.com/ottah/ReproSteamworks Github action logs: https://github.com/ottah/ReproSteamworks/runs/5741999396#step:3:7393

There is also a build.bat that has the script I ran locally to test as well.

Expected behavior Projects with plugins build.

Additional details

Any help on this would be appreciated. It could be the that Facepunch transport package is bundling their .dll’s incorrectly, but since it is working in my existing build scripts I can’t seem to figure out what is wrong.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pippinmolecommented, Aug 20, 2022

I see this is specific to Steamworks. Assuming you are using Facepunch.Steamworks, instead of using the DLLs provided in the ‘Releases’ section of the github repository, use the source files. If you use Steamworks inside an asmdef, create an asmdef inside the Facepunch.Steamworks folder and reference this asmdef in the asmdef that uses this assembly.

If you have any issues let me know 😃

1reaction
ottahcommented, Apr 20, 2022

@webbertakken I gave up trying to fix it, we’re just going to stick with our current CI/CD pipeline. I’ve made the repo public again if you want to check it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio refuses to build project due to missing assembly ...
I faced a similar issue: the compiler complained about a missing assembly reference, even if it was in the csproj file.
Read more >
Build Agent problems - missing assembly references - MSDN
It is only when a build is queued and the launch is directed at the build agent do the builds actually fail. Again,...
Read more >
Missing Assembly References in Test Studio Project
SOLUTION · 1. Open your test project in Visual Studio. · 2. Go to Solution Explorer. · 3. Expand the project and open...
Read more >
Visual Studio IDE does not recognize project references but ...
This is an indication that your design-time build is failing, this is causing the language service to not get the data that it...
Read more >
CI Build on Docker missing assembly references that work in ...
However, when I'm building on CI docker VM, the build fails with missing assembly error, such as this one: Assets/Scripts/StorySpecific/7/ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found