הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
Question
Tuesday, February 18, 2020 11:15 PM
I am getting the following errors when I build my VB 2017 project;
Error BC31549 Cannot embed interop types from assembly 'Microsoft.VisualBasic.PowerPacks, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it is missing the 'System.Runtime.InteropServices.GuidAttribute' attribute.
Error BC31553 Cannot embed interop types from assembly 'Microsoft.VisualBasic.PowerPacks, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' because it is missing either the 'System.Runtime.InteropServices.ImportedFromTypeLibAttribute' attribute or the 'System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute' attribute.
I have the Copy Local property set to false and the Embed property set to True in my References, I was hoping I could embed the PowerPacks.dll in my build to avoid having to copy it with deployment, is there a solution?
All replies (2)
Wednesday, February 19, 2020 1:52 AM
Is this the first time this has happened? Is it an old or new project? Have you tried to create a new project and use the PowerPack and get the same error?
Bottom line is the best method is to copy the DLL files to the app path rather then embed them as they were not designed to work that way.
Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
NuGet BaseConnectionLibrary for database connections.
Wednesday, February 19, 2020 11:12 PM
This project was actually created in VS2015, compiled as an .exe with Inno with only the .exe and a .txt file included. The build went flawless and to package deployed fine. It wasn't until I upgraded to VS2017 that the build failed to compile with the .dll included.
I could deploy the build with the .dll as part of the package, but doesn't that make the Embed feature useless?