Import Visual Studio Project Exception calling

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
m2i7c9k
Posts: 3
Joined: Sat Aug 15, 2020 6:28 pm

Import Visual Studio Project Exception calling

Post by m2i7c9k » 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: 3118
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Post by Catalin » 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

Post by stephend3g » 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: 3
Joined: Mon Nov 19, 2018 4:59 pm
Contact:

Re: Import Visual Studio Project Exception calling

Post by davidjpp » 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: 4807
Joined: Wed Nov 14, 2012 2:04 pm

Re: Import Visual Studio Project Exception calling

Post by Eusebiu » 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

Post by qwertyess » 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: 3118
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Post by Catalin » 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

Post by qwertyess » 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.43 KiB) Downloaded 4 times

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

Re: Import Visual Studio Project Exception calling

Post by Eusebiu » 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

Post by qwertyess » 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: 3118
Joined: Wed Jun 13, 2018 7:49 am

Re: Import Visual Studio Project Exception calling

Post by Catalin » 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

Post Reply