madskristensen / VsixSynchronizer

A Visual Studio extension
Other
16 stars 10 forks source link

Does not work with shared project #18

Open nvmkpk opened 1 year ago

nvmkpk commented 1 year ago

Describe the bug This code file does not get generated when using a shared project (.shproj) for sharing code between Visual Studio 2019 and 2022 and the .vsct file is in the shared project.

To Reproduce Steps to reproduce the behavior:

  1. Create two menu extension projects, one for VS2019 and another for VS2022.
  2. Create a shared project (with extension .shproj)
  3. Move all code and .vsct files to the shared project
  4. Right click on the .vsct file and click on Synchronize To Code File
  5. Notice that the above step does nothing.
  6. Manually change the `.projitems' file to what the above menu item does
  7. Build the project and notice that the build fails due to missing generated .cs file for the .vsct file.

Expected behavior The .cs file gets generated and build succeeds

tonyhallett commented 11 months ago

The vsct should be a shared file and not in the shared project. See 6. https://learn.microsoft.com/en-us/visualstudio/extensibility/migration/update-visual-studio-extension?view=vs-2022 Then the VsixSynchronizer works.