Repository navigation
Make publish work for desktop projects - #240
Conversation
11a4f79 to
1a0b10e
Compare
| </_ResolvedFileToPublish> | ||
| </ItemGroup> | ||
|
|
||
| <RemoveDuplicates Inputs="@(_ResolvedFileToPublish)"> |
There was a problem hiding this comment.
I'm not sure this is correct for a few reasons. From MSDN https://msdn.microsoft.com/en-us/library/ms164300.aspx:
This task is case insensitive and does not compare item metadata when determining duplicates.
- 'case insensitive' on a case sensitive file system may be a problem.
- 'does not compare item metadata' - What happens when there are multiple files with different "RelativePath" metadata? Does the first win?
Why is this needed at all? Who is adding the same file multiple times? Is it ResolvedAssembliesToPublish?
There was a problem hiding this comment.
OK, I'll get to the root of it and remove the de-duping here. I'll leave the Path.GetFullPath normalizing because that was a red herring that cost me a bunch of time.
There was a problem hiding this comment.
Fixed. We no longer use RemoveDuplicates blindly across everything.
4302036 to
85d350e
Compare
- Normalize paths to publish and deal with copy-local overlap - Always generate deps file if PreserveCompilationContext=true
85d350e to
6d8db37
Compare
|
@eerhardt The duplication was caused by lock file assemblies being copylocal by default on desktop. There was a collision between adding the copylocal assemblies to resolve list and what we discover in ResolvePublishAssemblies. We now handle just those two overlapping with a simple Exclude (thanks for the suggestion offiline) and ResolvePublishAssemblies wins. |
|
|
…ng-directory Set default run working directory to project directory.
This is where we're hoping to land,, but it's still different from the embedded desktop file used in project.json builds. We should decide today with the MVC folks if we're going to match the old behavior or stick with the new approach, which is more consistent across platforms. I'll follow up with a separate change once we make a final decision on this.
Fix #111
Fix #119
This is a workaround for an issue where we were trying to copy the same file passed twice in Copy Task SourceFiles to one DestinationFile. I think it's fine to be defensive because it's really easy to end up with duplicates in the half dozen or so different items that can end up in this list.
With that said, I think I finally found the root cause of the duplication just now so I could likely get away with fixing only that and reverting the normalization and deduping. My preference, however. would be to keep the deduping regardless.
@eerhardt @dotnet/project-system