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.

better dll refrence paths

See original GitHub issue

Currently we need to copy reference paths to Dependencies/ folder in order to built this mod. This means that we have duplicated version of each library and sometimes both get loaded by de-cpompilers slowing them down. To add insult to injury the libraries are then copied into the bin folder creating triple version of each library.

One is good enough. It would be better to instruct .csproj to look into the application installation folder first (usingProgramFiles macro) -if that failed then we can look into Dependencies/. The copy local should also be set to false. Something like this:

    <Reference Include="Assembly-CSharp">
      <HintPath>$(ProgramFiles)\Steam\steamapps\common\Cities_Skylines\Cities_Data\Managed\Assembly-CSharp.dll</HintPath>
      <HintPath>~\Library\Application Support\Steam\SteamApps\common\Cities_Skylines\Cities_Data\Managed\Assembly-CSharp.dll</HintPath>
      <HintPath>..\dependencies\Assembly-CSharp.dll</HintPath>
      <Private>False</Private>
    </Reference>

EDIT: this way it also makes the job of first time user developers easier.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kianzarrincommented, Feb 10, 2020

@aubergine10 something like this would be nice (i tested it and it works)

  <PropertyGroup>
    <SteamPath >~/Library/Application Support/Steam/</SteamPath>
    <SteamPath Condition="! Exists ('$(SteamPath)')">$(ProgramFiles)\Steam\</SteamPath> <!-- redundant? -->
    <SteamPath Condition="! Exists ('$(SteamPath)')">$(Registry:HKEY_CURRENT_USER\Software\Valve\Steam@SteamPath)</SteamPath>
    <CSDLLPath>$(SteamPath)\steamapps\common\Cities_Skylines\Cities_Data\Managed</CSDLLPath>
    <CSDLLPath Condition="!  Exists ('$(CSDLLPath)')">..\dependencies</CSDLLPath>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="ICities">
      <HintPath>$(CSDLLPath)\ICities.dll</HintPath>
      <Private>False</Private>
    </Reference>

all other interested mod owners can simply copy paste the code 😃

0reactions
kvakvscommented, Feb 12, 2020

On my screenshot you can see it was installed to F:/ (mechanical drive) and later moved to X:/ (nvme SSD drive)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio: Relative Assembly References Paths
Select "browse" in the add reference dialog, navigate to the folder with your project file, then add the relative path to your DLL....
Read more >
How can you add relative dll reference paths in VS 2010
You have to do some manual labor. Add the references as normal, then open up your .vbproj file and find where the references...
Read more >
Manage references in a project - Visual Studio (Windows)
Learn how to manage references to external components and connected services in a project.
Read more >
How to reference DLLs AT RUNTIME outside of your project
In this video, I show how to reference DLLs in your C# project so that (a) they don't get copied to your output...
Read more >
What's a way to make Visual Studio always have a relative ...
The target setup is found by right-clicking your project, select 'Properties', navigate to 'Reference Paths'. Any path you enter here will ...
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