Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, July 25, 2017 3:49 PM
I'm having a problem with imported type. After upgrading to VS2017 I'm getting this warning.
Warning CS0436 The type 'EnPIResources' in 'C:\Users\Gia\Source\Repos\EnPI\AMO.EnPI-5.0\AMO.EnPI.AddIn\.\AMO.EnPI.Utilities\EnPIResources.Designer.cs' conflicts with the imported type 'EnPIResources' in 'AMO.EnPI.AddIn.Utilities, Version=1.0.6415.21029, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'C:\Users\Gia\Source\Repos\EnPI\AMO.EnPI-5.0\AMO.EnPI.AddIn\.\AMO.EnPI.Utilities\EnPIResources.Designer.cs'.
Here is an error when is application running:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AMO.<g class="gr_ gr_93 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="93" id="93">EnPI</g>.AddIn.EnPIResources.resources" was correctly embedded or linked into assembly "AMO.<g class="gr_ gr_94 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="94" id="94">EnPI</g>.AddIn.Utilities" at compile time, or that all the satellite assemblies required are loadable and fully signed.
How can I fix this problem?
All replies (6)
Tuesday, July 25, 2017 5:12 PM ✅Answered | 1 vote
The warning you're getting is an indication that you have a referencing issue. In your designer file you're referencing what appears to be a locally defined resource in your project. But that is conflicting with the 1.0 version of the Utilities assembly that also has this resource. The compiler is letting you know it is opting for the local copy. To resolve this warning you should either remove the local resource and get it from Utilities or rename the local resource so it does not collide with the version in Utilities.
The error at runtime is because the designer-associated file is unable to find the resource you referenced. This leads me to believe you don't actually have the local resource anymore. Since the runtime cannot find the resource it fails. Resolving the warning may resolve this error automatically. If it doesn't then you need to confirm that the resource you're trying to load actually exists. If it is coming from the Utilities assembly then make sure the resource file is in the path being searched.
Michael Taylor
http://www.michaeltaylorp3.net
Tuesday, July 25, 2017 5:43 PM ✅Answered | 1 vote
You may be building an Excel addin but it is still a compiler error. Fix the compiler error and see if your runtime issue goes away. If you opt to use the Utilities assembly resource then be aware that the assembly has to be deployed as part of your addin to Excel otherwise the runtime call will fail. If you use the embedded resource in your addin then there should be no additional assemblies needed.
Tuesday, July 25, 2017 5:51 PM ✅Answered
Changing namespace in Utility resource file fixed my problem. Thank you for a good explanation.
Tuesday, July 25, 2017 4:31 PM
I'm having a problem with imported type. After upgrading to VS2017 I'm getting this warning.
Warning CS0436 The type 'EnPIResources' in 'C:\Users\Gia\Source\Repos\EnPI\AMO.EnPI-5.0\AMO.EnPI.AddIn\.\AMO.EnPI.Utilities\EnPIResources.Designer.cs' conflicts with the imported type 'EnPIResources' in 'AMO.EnPI.AddIn.Utilities, Version=1.0.6415.21029, Culture=neutral, PublicKeyToken=null'. Using the type defined in 'C:\Users\Gia\Source\Repos\EnPI\AMO.EnPI-5.0\AMO.EnPI.AddIn\.\AMO.EnPI.Utilities\EnPIResources.Designer.cs'.
Here is an error when is application running:
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "AMO.<g class="gr_ gr_93 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="93" id="93">EnPI</g>.AddIn.EnPIResources.resources" was correctly embedded or linked into assembly "AMO.<g class="gr_ gr_94 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="94" id="94">EnPI</g>.AddIn.Utilities" at compile time, or that all the satellite assemblies required are loadable and fully signed.
How can I fix this problem?
Is this a Chrome problem only as to why this post has junk in it?
Tuesday, July 25, 2017 5:22 PM
It is Windows excel error.
Thursday, August 10, 2017 10:18 AM
Hi pooh098,
If the issue has been solved , I hope you could mark the reply as answer because this will help others looking for the same or similar issues down the road.
Thanks a lot,
Best Regards,
feih_7
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].