slow-cheetah icon indicating copy to clipboard operation
slow-cheetah copied to clipboard

Linking files using PreserveNewest

Open jnyrup opened this issue 6 years ago • 4 comments

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?

SlowCheetahRepro.zip log.txt errors.txt

jnyrup avatar May 27 '19 10:05 jnyrup

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.

agpreynolds avatar Jun 07 '19 11:06 agpreynolds

If you are using SlowCheetah - try to uninstall and reinstall it using Visual Studio's "Extensions" menu

havitoosh avatar Oct 07 '19 08:10 havitoosh

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.

ColinNg avatar Nov 26 '19 21:11 ColinNg

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.

randyburden avatar Jan 30 '20 20:01 randyburden