Open angelsix opened 7 years ago
The issue you have in VS 2017 for publishing an ASP .Net Core website giving the error "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 2 item(s) can now be fixed.
Edit C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets
Line 99 the command needs DestinationFiles changing to:
DestinationFiles="@(_ResolvedFileToPublishPreserveNewest -> '$(PublishDir)%(RelativePath)')"
And the line 127 command needs:
DestinationFiles="@(_ResolvedFileToPublishAlways -> '$(PublishDir)%(RelativePath)')"
Notice the subtle difference. The first is PreserveNewest, the second is Always.
Once edit restart VS and publishing will work
cc @vijayrkn @srivatsn
The issue you have in VS 2017 for publishing an ASP .Net Core website giving the error "DestinationFiles" refers to 1 item(s), and "SourceFiles" refers to 2 item(s) can now be fixed.
Edit C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Publish.targets
Line 99 the command needs DestinationFiles changing to:
DestinationFiles="@(_ResolvedFileToPublishPreserveNewest -> '$(PublishDir)%(RelativePath)')"
And the line 127 command needs:
DestinationFiles="@(_ResolvedFileToPublishAlways -> '$(PublishDir)%(RelativePath)')"
Notice the subtle difference. The first is PreserveNewest, the second is Always.
Once edit restart VS and publishing will work