dotnet / dotnet/ResXResourceManager

Issues when .sln is located in subdirectory

Open
#431 2 comments 0 reactions 0 assignees View on GitHub
Feature request Up for grabs
Dominant language
C#
Stars
1.5k
Forks
251
Avg merge
1d 1h
Merged PRs (30d)
1

Description

VisualStudio extension is not behaving as expected when solution .sln file is not located in a parent folder with respect to project files *.csproj:

- in Main window, resources names in left panel list are composed only with resx file name instead of path to resx (e.g. _myname_ instead of _Model\test\myname_)
- when making a snapshot, if two resources are named the same but are in different folder, only the first resource is evaluated.

To reproduce, create solution composed as following:
/root/a/mysolution.sln
including:
/root/b/project1.csproj
/root//b/project2.csproj

The sln will contain code similar to:
`Project("{3F2504E0-4F89-11D3-9A0C-0305E82C3301}) = "Project1", "..\Project1.csproj", "{3F2504E0-4F89-11D3-9A0C-0305E82C3301}"`
where the important part is the ..\ going to parent folder.

When running ResXManager in Standalone application and specifying root directory in Browse dialog, everything works as expected. Is there any way to achieve the same when working with Visualstudio extension? e.g. explicitly setting to work in root folder.

To be more specific, I guess that the issue is with ProjectFile.GetRelativePath failing to resolve relative path between solution and project and thus creating a UniqueProjectName which isn't actually unique. Being this assumption not true creates issues next.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.