0

I am migrating some csproj files from the old style to the new SDK style for an old solution.After migrating, I found some lic files appearing within the projects, which were not seen in the solution explorer before. Take one project for instance:

cuttering lic files found in project

When I inspect the properties of the file, it looks like this: properties of a lic file

My question is: why do they appear in the solution explorer after migrating the csproj file? Is there a way to "hide" them so that the solution explorer doesn't look so cluttered?

tmsh
  • 71
  • 1
  • 9
  • These seem to be license files for that Mindscape library your're using. You could try adding a `` to that project's csproj, however I'm not entirely sure whether this breaks some license validation stuff of the library. As to why these files are included: the new csproj format includes most stuff by default, so the project file isn't cluttered with explicit includes. – Lennart Aug 08 '23 at 06:36
  • Please feel free to let know if you have any question. – wenbingeng-MSFT Aug 10 '23 at 02:52

1 Answers1

0

This is because your original wpf program contains various third-party components, and each component has a corresponding license file in the bin folder, but you may omit the bin folder during the migration process, resulting in .lic The file appears in solution explorer. This is the .lic file you see.

Since you didn't provide the format of your csproj file migration, if you make sure it's correct right click on the .lic file and click properties, then set Copy to output directory to Copy Always. Finally rebuild the project.

wenbingeng-MSFT
  • 1,546
  • 1
  • 1
  • 8
  • I am sorry, but what do you mean by "providing the format of your csproj file migration"? Can you please give an example/elaborate so I can add further information? – tmsh Aug 10 '23 at 14:32
  • @tmsh This refers to your csproj file. Setting copy to output directory to always copy doesn't solve your issue? – wenbingeng-MSFT Aug 11 '23 at 01:23
  • unfortunately, setting copy to output directory to "always copy" didn't solve this problem. @wenbingeng-msft – tmsh Aug 16 '23 at 14:33
  • @tmsh Can you share your CSPROJ file format? – wenbingeng-MSFT Aug 17 '23 at 08:40