-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Some transformations on @(ReferencePath) result in mangled references #2165
Comments
You can work around the bug by setting the property <CompileUsingReferenceAssemblies>false</CompileUsingReferenceAssemblies> which avoids transforming |
Thanks for reporting this @KirillOsenkov and @ToddGrun. FYI @dsplaisted -- the task that hit this for them was StrongNamer. Filed dsplaisted/strongnamer#14 in the hopes that anyone who sees it will find it there. |
KirillOsenkov
added a commit
to KirillOsenkov/monodevelop
that referenced
this issue
Jun 2, 2017
MSBuild 15.3 will be briefly broken, see details here: dotnet/msbuild#2165 It is not yet public and will be fixed soon, but we're already starting to hit the problem as we upgrade. To temporarily work around this until everybody upgrades the MSBuild that fixes the issue this is a simple workaround with no other side effects.
fyi @jcouv -- I'll also want to fix this in 15.3 p3. |
KirillOsenkov
added a commit
to mono/monodevelop
that referenced
this issue
Jun 2, 2017
MSBuild 15.3 will be briefly broken, see details here: dotnet/msbuild#2165 It is not yet public and will be fixed soon, but we're already starting to hit the problem as we upgrade. To temporarily work around this until everybody upgrades the MSBuild that fixes the issue this is a simple workaround with no other side effects.
rainersigwald
added a commit
that referenced
this issue
Jun 5, 2017
Fixes #2165 by never putting a reference to metadata in the ReferenceAssembly field in the first place, so it's never there to get emplaced in a new item escaped and mangle things downstream.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some builds fail with an error like
when building using VS 15.3 preview 2 builds (which are not yet public).
This ItemReferenceGroup sets a default value for the
ReferenceAssembly
metadata ofReferencePath
items to%(FullPath)
. The engine evaluates that as a literal string, but it can be successfully read through by item transformations likeFindReferenceAssembliesForReferences
's@(ReferencePath->'%(ReferenceAssembly)')
, because the evaluator recurses--it sees that literal, interprets it as a metadata reference, and reads theFullPath
metadata.However, not all transformations perform that recursion. An
ITask
implementation that usesreturn new TaskItem(oldItem)
, for example, evidently escapes the metadatum string, and when it is expanded it turns into a literal%(FullPath)
instead of the value of theFullPath
metadatum.FindReferenceAssembliesForReferences
then populatesReferencePathWithRefAssemblies
with a list of items whose identity is%(FullPath)
, which isn't valid and confuses the compiler, producing the error above.This is a regression introduced by e3a3d69 when implementing #1986.
The text was updated successfully, but these errors were encountered: