


My Excel is 64-bit, so that’s the version I want to build and run. NET Framework you need something more explicit. See more here NuGet: references to assemblies in runtimes folder not added - Stack Overflow The mechanism SharpProj uses to copy the right bitness version of SharpProj.dll to the output (using a runtimes directory in the NuGet package) only works under. I’ll try to poke some more if I get a chance.

Maybe because you are using a nfig or something with the project file.

One would have to dig a bit to understand how the build decides which one to use, and whether the project file has to change. I see that the SharpProj.Core package has both 32-bit and 64-bit files. Then your add-in also won’t work on 64-bit Excel with this SharpProj.dll. It might be that on your new machine (or in the new version of ExcelDnaDoc), ExcelDnaDoc is running as a 64-bit process, then can’t load the 32-bit SharpProj.dll. I’m guessing the SharpProj.dll that ends up in the output directory is a 32-bit library. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project. This mismatch may cause runtime failures. The system cannot find the file specified.Īt (RuntimeAssembly assembly, ObjectHandleOnStack retTypes)Īt ()Īt _Displa圜lass3_0.b_0(ExternalLibrary library)Īt _17`2.MoveNext()Īt `1.MoveNext()Īt `2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualit圜omparer`1 comparer)Īt `3.GetEnumerator()Īt `2.MoveNext()Īt `1.ctor(IEnumerable`1 source)Īt `1.d_1.MoveNext()Īt .d_13.MoveNext()Īt _32f74dfa1e1d4378b308c557cac602b4.Execute()Īt .(ExecuteContext context, TextWriter reader)Īt (ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)Īt _Displa圜lass16_0.b_0(TextWriter writer)Īt (Action`1 withWriter)Īt `1.Publish()Īt (String dnaPath, String helpSubfolder, Boolean excludeHidden, Boolean skipCompile, Boolean runAsync)Īt (String args)ġ> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\(2202,5): warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "SharpProj, Version=8.2001.106.0, Culture=neutral, PublicKeyToken=3a930e679d9a0873, processorArchitecture=x86", "x86". Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'SharpProj, Version=8.2001.106.0, Culture=neutral, PublicKeyToken=3a930e679d9a0873' or one of its dependencies.
