Visual Studio Code Linux Reference for Dummies?

Premise:
I just installed a new Ubuntu (and I’m still vague on Linux) and installed VS Code and .Net Core and followed instructions for setting up monogame. (before I used Monodevelop on old ubuntu)
I believe I finally have a proper install of everything. I setup a project but it says it can’t find references(assemblies I guess). I searched for how to add references in VS Code and no luck (other than windows versions which seem to be different). I also tried searching for the dll’s manually. I can’t even seem to figure out where monogame exists on the drive. I seen mention of a CLI thing but yet to find out what that is or is for. I’ve also seen Rider mentioned but was hoping to just stick to VS code.

Any ideas, references, or tutorials - or even guesses - at what I could try to get a monogame example to work with VS code on Linux? (I guess my main problem so far is to figure out how to get references to work)

Ok so in the csproj file, I thought this wasn’t enough:

 <ItemGroup>
    <MonoGameContentReference Include="Content\Content.mgcb" />
  </ItemGroup>
  <ItemGroup>
    <TrimmerRootAssembly Include="Microsoft.Xna.Framework.Content.ContentTypeReader" Visible="false" />
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.0.1641" />
    <PackageReference Include="MonoGame.Content.Builder.Task" Version="3.8.0.1641" />
  </ItemGroup>

So I thought there must be some other “add reference” thing I’m supposed to do in the IDE (since it kept complaining).
However, I foolishly didn’t try to build the code thinking it wouldn’t work anyway.
Apparently after a first build the issue cleared itself up. ;p

I did find a lot of confusion and ubuntu related issues in initially setting everything up for Linux. Maybe I should do a troubleshooter tutorial for Linux in the future for Linux/VS-code noobs like me. ;p

Hi,

I wrote one start guide for macos some time ago on my linkedin profile.

It’s in portuguese but I think that would be easy to translate and I think that is very similar to linux.

Best regards,

1 Like

Ah - thanks very much. This helps clarify my understanding of what needs to be done. Interesting that it’s almost exactly the same method. Ah - muito obrigado. Isso ajuda a esclarecer meu entendimento sobre o que precisa ser feito. Interessante que é quase exatamente o mesmo método.

1 Like

Now I’m getting VS Code & Linux a lot better. Only issues I had:

  1. fx wouldn’t build - I guess there’s some way to make it build them with wine or something?
    Solution:
    Copied the xnb’s for the “fx” stuff from the windows version. All other content builds were good.
  2. Language resources didn’t work at first. I just had to change the folder name it was trying to use.

chicken_game_screenshot1

Now it works. I realize now that right clicking on the proj file provides a lot of build and nuget options - and adding some extensions helps too. :smile: