Linking files using PreserveNewest
When linking dll's using PreserveNewest like this
<Content Include="..\packages\Microsoft.SqlServer.Types.11.0.1\nativeBinaries\x64\msvcr100.dll">
<Link>SqlServerTypes\x64\msvcr100.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
I get build errors:
The item "App.config" in item list "ScFilesToTransform" does not define a value for metadata "Link". In order to use this metadata, either qualify it by specifying %(ScFilesToTransform.Link), or ensure that all items in this list define a value for this metadata.
SlowCheetahRepro
C:\Users\jonas\source\repos\SlowCheetahRepro\packages\Microsoft.VisualStudio.SlowCheetah.3.2.20\build\Microsoft.VisualStudio.SlowCheetah.targets
74
When changing from PreserveNewest to Always my project compiles without errors.
Is this by design or a bug?
I'm also seeing the same issue using an XSD file.
<None Include="schema.xsd">
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
When I switch to copy always, this error goes away. However I then get:
error MSB3030: Could not copy the file "obj\x86\Debug\MyApp.exe" because it was not found.
If you are using SlowCheetah - try to uninstall and reinstall it using Visual Studio's "Extensions" menu
If you are using SlowCheetah - try to uninstall and reinstall it using Visual Studio's "Extensions" menu
I seem to have this problem whenever I do a fresh clone of a project that has SlowCheetah. Uninstall/Reinstall definitely works. I tried to minimize the impact and found this also works:
Tools > Extensions > Manage Extensions, select SlowCheetah. Click Disable. Click Enable. Restart VS.
I had to change my App.Debug.config file to copy always and then the issue went away. I only knew to do that because of another comment on this thread. I think the error message needs to be improved to make the solution more clear.