Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdb reference in generated dll/exe not using PathMap rules #1196

Open
danhol86 opened this issue Jul 28, 2023 · 4 comments
Open

Pdb reference in generated dll/exe not using PathMap rules #1196

danhol86 opened this issue Jul 28, 2023 · 4 comments

Comments

@danhol86
Copy link

danhol86 commented Jul 28, 2023

I have the following properties set in my csproj file.

<PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net45</TargetFramework> <PathMap>$(MSBuildThisFileDirectory)=C:\MyNewPath</PathMap> <DebugType>full</DebugType> </PropertyGroup>

When the project builds, the exe file has a reference to the PDB file, but uses the new PathMap instead of the actual location of PDB during build.

However when I install any Fody plugin such as PropertyChanged, this PathMap no longer is being used and the exe/dll uses the actual location of the PDB instead of what is defined in PathMap.

Also, this only happens on .NET Framework projects.

Issue Repo - https://github.com/danhol86/FodyPdbIssue

I have 2 test projects setup in above repo. Both exactly the same, except one has PropertyChanged plugin.

The only way I could get this to work how I wanted, was to set the PdbPath manually in the csproj. However this removed the link to the PDB completely and stops debugging working.

Thanks

@SimonCropp
Copy link
Member

can u submit a failing unit test as a pull request?

@danhol86
Copy link
Author

can u submit a failing unit test as a pull request?

Done

@tom-englert
Copy link
Member

That's a very special use case - did not see any project using something else than embedded pdb's in the past years.
Is that really something we want to support?

@DeclanFrampton
Copy link

I also experience the same issue with one of my projects when in collab to ensure a true deterministic. Happens on Full also. Which is what I would prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants