Compiling error: Can't copy stdole.dll into bin folder

Compiling error: Can't copy stdole.dll into bin folder

wowrs1608
Advocate Advocate
683 Views
4 Replies
Message 1 of 5

Compiling error: Can't copy stdole.dll into bin folder

wowrs1608
Advocate
Advocate

Hi,

 

I am trying to compile an old vb.net code. I got a compiling error saying MS shared file stdole.dll can't be copied into Inventor 2013\bin folder. I am now using 2022\bin.

Which type file in the vb.net project files I could change the folder to 2022?

And I saw there is already a stdole.dll file under bin folder. Why it still ask to copy into one?

 

Thanks for help.

 

Regards.

 

Pete

 

0 Likes
Accepted solutions (1)
684 Views
4 Replies
Replies (4)
Message 2 of 5

jatindevaiya08
Contributor
Contributor

As I understand there is no need to copy stdole.dll file in compilation. Change Embed Interop Types to True. For me it's work fine with this.

Regards,
Jatin Devaiya

If a response answers your question, please use ACCEPT SOLUTION to assist other users later.


Also be generous with Likes! Thank you and enjoy!
Message 3 of 5

wowrs1608
Advocate
Advocate

Thanks. Now the error is from a Call to mt.exe.

 

Maybe I need to change The vsvars32 to 64 bit version? I tried to run mt.exe inside a folder in a DOS window , It can't find mt.exe.

 

mt.jpg

0 Likes
Message 4 of 5

jatindevaiya08
Contributor
Contributor
Accepted solution

@wowrs1608  If it's in Post-built event then you can remove that and add below code. and remove anything in Pre-Built event.

REM - Set up the environment.
call "%VS150COMNTOOLS%\VsDevCmd"

REM - Embed the manifest into the dll.
mt.exe -manifest "$(ProjectDir)$(TargetName).X.manifest" -outputresource:"$(TargetPath)";#2
REM - Copy the .addin file and the ButtonResources folder into the result folder.
XCopy "$(ProjectDir)Autodesk.$(TargetName).Inventor.addin" "$(TargetDir)" /y
XCopy "$(ProjectDir)ButtonResources" "$(TargetDir)ButtonResources" /y /r /i /s /f

REM - Delete the pdb file because it doesn't need to be delivered.
DEL "$(TargetDir)$(TargetName).pdb"

REM - Delete the existing add-in folder.
rmdir /q /s "C:\ProgramData\Autodesk\Inventor Addins\$(TargetName)"

REM - Copy the folder to the Inventor Addins folder so Inventor will see it and run it.
XCopy "$(TargetDir)*" "%appdata%\Autodesk\ApplicationPlugins\$(TargetName)\" /y /r /i /s /f



Accept this as a solution.

Regards,
Jatin Devaiya

If a response answers your question, please use ACCEPT SOLUTION to assist other users later.


Also be generous with Likes! Thank you and enjoy!
0 Likes
Message 5 of 5

wowrs1608
Advocate
Advocate

After adding the path of mt.exe into Window's Path, now I can build again.

 

Thank you very much.

0 Likes