Skip to content

Write generated AssemblyAttributes file to intermediate output path#5101

Merged
tmat merged 3 commits intodotnet:masterfrom
tmat:FixAssemblyAttributesPath
Feb 12, 2020
Merged

Write generated AssemblyAttributes file to intermediate output path#5101
tmat merged 3 commits intodotnet:masterfrom
tmat:FixAssemblyAttributesPath

Conversation

@tmat
Copy link
Copy Markdown
Member

@tmat tmat commented Feb 3, 2020

Fixes #1479 as suggested in the issue description.

@tmat
Copy link
Copy Markdown
Member Author

tmat commented Feb 3, 2020

@rainersigwald PTAL

@rainersigwald
Copy link
Copy Markdown
Member

Can you explain why the old file location is a problem after dotnet/roslyn#39136?

The test is failing on Mac and Linux with

/home/vsts/work/1/s/artifacts/bin/Microsoft.Build.Tasks.UnitTests/Debug/netcoreapp2.1/Microsoft.Common.CurrentVersion.targets(1177,5):  error MSB3644: The reference assemblies for .NETFramework,Version=v4.0 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

I'm ok with conditionalizing the test to run only on Windows with a comment that it depends on .NET 4 targeting.

@tmat
Copy link
Copy Markdown
Member Author

tmat commented Feb 3, 2020

Can you explain why the old file location is a problem after dotnet/roslyn#39136?

Since the AssemblyAttributes file does not contain source for any method bodies it used to be not included in the document table in the PDB. With dotnet/roslyn#39136 the file is included in the PDB, which leads to more issues. For example, a deterministic build won't normalize random paths outside of the repo root, path to %temp% directory leaks the user name, etc.

@tmat tmat force-pushed the FixAssemblyAttributesPath branch from 1576128 to 0a740bf Compare February 3, 2020 21:43
@tmat
Copy link
Copy Markdown
Member Author

tmat commented Feb 4, 2020

@rainersigwald The test now runs on Windows only.

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

Successfully merging this pull request may close these issues.

Target framework attribute file should be written to IntermediateOutputPath

2 participants