synek317
synek317

Reputation: 819

MonoDevelop - reference with absolute path

Is it possible to add reference to c# project in MonoDevelop with absolute path?

It worked when I manually edited HintPath in csproj, but whenever the csproj is saved by MonoDevelop, it reverts back to relative path. It is too easy to miss such change and commit it so I'm looking for a solution that would say to MonoDevelop "please do not make it relative, never".

Solution for linux and mac os would be sufficient. I use MonoDevelop v. 5.10

Upvotes: 0

Views: 520

Answers (1)

Sven-Michael Stübe
Sven-Michael Stübe

Reputation: 14750

You could store the absolute path in a variable

  • Open you .csproj file
  • Add <MyAbsolutePath>/Users/foo/bar</MyAbsolutePath> into <PropertyGroup>...<PropertyGroup>
  • change the path of your item to <Compile Include="$(MyAbsolutePath)/MyFile.cs"> or change the hintpath or use it where ever you need the absolute path.

Upvotes: 1

Related Questions