stefanlenselink / ResXFileCodeGeneratorEx

A VS2022 port of the ResXFileCodeGeneratorEx extension
Other
6 stars 4 forks source link

Project is not building in Visual Studio 2022 #4

Open karanveer1986 opened 2 years ago

karanveer1986 commented 2 years ago

Hello,

I get error while building this project in Visual Studio 2022 Community Edition:

Severity    Code    Description Project File    Line    Suppression State
Error       CreatePkgDef : error : ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeModule.GetTypes()
   at System.Reflection.Assembly.GetTypes()
   at Microsoft.VisualStudio.Tools.CreatePkgDef.ProcessAssembly(String fileName, Hive hive, PkgDefContext context, Boolean register, RegistrationMode mode)
   at Microsoft.VisualStudio.Tools.CreatePkgDef.DoCreatePkgDef(InputArguments inputArguments)
   at Microsoft.VisualStudio.Tools.CreatePkgDef.Main(String[] arguments)
Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Could not load file or assembly 'Microsoft.VisualStudio.Shell.Interop, Version=7.1.40304.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.    ResXFileCodeGeneratorEx         

Severity    Code    Description Project File    Line    Suppression State
Error       The "ResolveComReference" task returned false but did not log an error. ResXFileCodeGeneratorExPackage  

I created a stackoverflow link as well for more details: https://stackoverflow.com/questions/71173512/visual-studio-2022-solution-not-building

Could you please fix this?
Morek commented 1 year ago

For me to build the project i entered the References end deleted the reference that was missing: microsoft.visualstudio.commandbars. Than you have to go to ResXFileCodeGeneratorExPackage project properties and to last tab: VSIX there you have to uncheck the field "Deploy VSIX content to experimental instance for debugging". Thanks to this it compiled and I could install it as in the instructions. But still i stuck because when i try to run this custom tool with name "ResXFileCodeGeneratorEx" I get an error that tool was not found. Maybe someone will know why? It is in installed extensions but still doesn't work.

1944GPW commented 1 year ago

I had no problem building it with VS2022CE and installed ok but have the same problem as above in that the tool is not run when attempting to invoke. The resx's property is set to ResXFileCodeGeneratorEx and the tool's [CodeRegistration...] attributes seem to be ok too. Is there a reg file that needs to set some reg keys (which I presume would be done in the vsix install anyway?).