m2i7c9k
Posts: 3
Joined: Sat Aug 15, 2020 6:28 pm

Import Visual Studio Project Exception calling

Sat Aug 15, 2020 7:07 pm

Hi Guys,

I'm new for Advanced Installer, be gentle to me, please :) I have VSTO Add-in Word Document (2019 Off.Pro) and Visual Studio 2019 (1.6.7.532.28833).
I'd like to create the setup for my project, I tried (step by step: https://www.advancedinstaller.com/user- ... addin.html)
but I stuck on step 5.
https://uloz.to/file/awXBDwyYYOK7/err-advinst-png.
with error: Exception calling ".ctor" with "1" arguments(s):"Could not load file or assembly'System.Runtime.CompilerService.Unsafe, Version=4.0.1.1,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependecies. The system cannot find the file specified".

So a tried another way files from loc. on hdd), it worked, but after opening my doc-level customization showed err. "the manifest may not be valid or the file could not be opened"....

Uf, is it horror. app for 500$ and doesn't work? I used OneClick install and everything went well.
I missed something, or I did something wrong?

Please is there some step by step latest guide for VSTO Office 2019 and VS 2019?

Thanks a lot

Mick

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Wed Aug 19, 2020 3:00 pm

Hello Mick and welcome to Advanced Installer forums,

Unfortunately, I can not say for sure why this happens.

In order for me to further investigate this, could you please forward me your VS solution (SLN file) and all of the project files it includes (only the project definition files without the source code files)? You can send these files by e-mail at support at advancedinstaller dot com.

Looking forward to hearing from you!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

stephend3g
Posts: 1
Joined: Wed Sep 02, 2020 7:06 pm

Re: Import Visual Studio Project Exception calling

Wed Sep 02, 2020 7:09 pm

Hi Caitlin,

I am also getting this error. It started occurring when I upgraded from Advanced Installer 17.2 to 17.4. Is it possible that 17.4 broke importing VSTO projects?

davidjpp
Posts: 4
Joined: Mon Nov 19, 2018 4:59 pm
Contact:  Website Twitter

Re: Import Visual Studio Project Exception calling

Thu Sep 03, 2020 11:24 am

I have just tried this with a Visio VSTO add-in in VS 2019, since it is supposed to be supported since AI 17.3. Unfortunately, I am getting the same error as the previous users....
David J Parker,
Microsoft MVP (Visio)
blog.bvisual.net

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Import Visual Studio Project Exception calling

Thu Sep 03, 2020 11:43 am

Hi,

During our investigation we found that it is caused by the latest Visual Studio (16.7) update. We tried to implement a fix by ourselves, but it seems that the only option we have is to submit this to Microsoft and ask them for a fix.

In the meantime, can you register the assemblies below to the GAC and see if it works for you?
gacutil -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Runtime.CompilerServices.Unsafe.dll"
gacutil -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Numerics.Vectors.dll"

This workaround worked for us. Please let us know if it helped you, too.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

qwertyess
Posts: 3
Joined: Wed Sep 09, 2020 6:54 pm

Re: Import Visual Studio Project Exception calling

Wed Sep 09, 2020 7:03 pm

Hello;
Unfortunately did not work for me, even when I create new project.

Code: Select all

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools>gacutil -i "C:\Program Files\dotnet\sdk\5.0.100-preview.8.20417.9\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Runtime.CompilerServices.Unsafe.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools>gacutil -i "C:\Program Files\dotnet\sdk\5.0.100-preview.8.20417.9\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Numerics.Vectors.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache
Microsoft Visual Studio Enterprise 2019 Preview Version 16.8.0 Preview 2.1
Windows 10 64bit

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Fri Sep 18, 2020 2:37 pm

Hello and welcome to our forums,

Are you getting the exact same error as the users above?
Exception calling ".ctor" with "1" arguments(s):"Could not load file or assembly'System.Runtime.CompilerService.Unsafe, Version=4.0.1.1,Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependecies. The system cannot find the file specified".
If that is the case, could you please give me some more details about your scenario? I have tried reproducing it, but unfortunately I was not able to do so.

My colleague Eusebiu who investigated this issue more in depth was off for this week, therefore I am trying to continue this thread on his behalf.

If possible, could you please forward me your VS solution (SLN file) and all of the project files it includes (only the project definition files without the source code files)? You can send these files by e-mail at support at advancedinstaller dot com.

If you do not get the same error as above, could you please let me know which error message you are encountering?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

qwertyess
Posts: 3
Joined: Wed Sep 09, 2020 6:54 pm

Re: Import Visual Studio Project Exception calling

Fri Sep 18, 2020 2:59 pm

yes the exact same error
Image

As I mentioned before I get the error even with new VS project.
AdvancedInstallerTest.rar
(30.43KiB)Downloaded 1032 times

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: Import Visual Studio Project Exception calling

Tue Sep 22, 2020 10:41 am

Hi,

Can you please download .NET Core 3.1.401, then install it, perform the registration of those two files again and see if it works?

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

qwertyess
Posts: 3
Joined: Wed Sep 09, 2020 6:54 pm

Re: Import Visual Studio Project Exception calling

Tue Sep 22, 2020 1:21 pm

It works great.
Thank you so much

Code: Select all

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools>gacutil /f -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Runtime.CompilerServices.Unsafe.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools>gacutil /f -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Numerics.Vectors.dll"
Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Assembly successfully added to the cache

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Wed Sep 23, 2020 8:07 pm

Hello,

Thank you for your followup on this.

We are glad everything is working as expected now!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

chris
Posts: 1
Joined: Thu Oct 15, 2020 6:06 pm

Re: Import Visual Studio Project Exception calling

Thu Oct 15, 2020 6:15 pm

I have been struggling with the same problem for a while now and finally found a solution. More like a workaround.. I hope this may help others.

Instead of choosing from "Templates", i have selected "Generic Installer Project". From there i have added necessary project files and dll files into it and was able export an installer. I have no idea why i am getting an error from "Templates > Visual Studio Application". I never had that problem with previous versions.

Note: You must import every DLL file under "References". To find the right path of it, simply right click on the dll and select properties. You will see the path in the properties window.

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Thu Oct 15, 2020 6:32 pm

Hello Chris and welcome to our forums,

Thank you for sharing your solution with us.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

talha8018
Posts: 1
Joined: Fri Oct 23, 2020 6:33 am

Re: Import Visual Studio Project Exception calling

Fri Oct 23, 2020 6:40 am

Hello,
I am new here I'm also getting this error on my latest advanced installer.
I am using visual studio 2019 as I also download and install following recommendation
Eusebiu wrote:
Tue Sep 22, 2020 10:41 am
Hi,

Can you please download .NET Core 3.1.401, then install it, perform the registration of those two files again and see if it works?

Best regards,
Eusebiu
Attachments
Capture.PNG
Capture.PNG (24.52KiB)Viewed 31138 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Fri Oct 23, 2020 12:06 pm

Hello and welcome to our forums,

Please note that my colleague also mentioned about registering those two DLLs.
In the meantime, can you register the assemblies below to the GAC and see if it works for you?
gacutil -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Runtime.CompilerServices.Unsafe.dll"
gacutil -i "C:\Program Files\dotnet\sdk\3.1.401\Sdks\Microsoft.NET.Sdk.WindowsDesktop\tools\net472\System.Numerics.Vectors.dll"
Could you please follow the above steps and let me know if everything works as expected?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”