This article contains some infamous problems that can occur when developing RESTar applications, and how to solve them:
1 2 3 4 A locally deployed strong-named assembly was detected. Assembly: DocumentFormat.OpenXml, Version=126.96.36.199, Culture=neutral, PublicKeyToken=8fb06cb64d019a17\. Consider excluding this file by adding a "weaver.ignore" file to your project. (ScErrWeaverFailedStrongNameAsm (SCERR2143)) (Double-click here for additional help)
What is this?
This error is almost always related to the application’s
weaver.ignore file. The Starcounter Weaver cannot deal with strong-named assemblies, abd we therefore need to include them in the application’s
Add the following assemblies to the application’s
weaver.ignore file, or create a new text file called
weaver.ignore in your project output folder with the content from the link.
1 2 3 4 The weaver failed to resolve a reference to an assembly. Referenced assembly: DocumentFormat.OpenXml, Version=188.8.131.52, Culture=neutral, PublicKeyToken=8fb06cb64d019a17\. Probable referrer: ClosedXML.dll (in C:\Users\Sebastian\source\repos\CatFact\CatFact\bin\Debug). (ScErrWeaverFailedResolveReference (SCERR2147)) (Double-click here for additional help)
What is this?
As far as we have found out, this can be caused by three things:
- A missing
weaver.ignorefile, or the problematic assembly not being included in it.
- A missing assembly mapping from the project’s
- A missing assembly reference or broken NuGet package.
- Try adding the problematic assembly, in this case
DocumentFormat.OpenXmlto the application’s
weaver.ignorefile, and make sure that the
weaver.ignorefile is included in the project output.
- Add an
app.configmapping for the assembly, mapping the referenced assembly version, in this case
184.108.40.206to the version of the actual DLL file included in the output folder.
- If there is no DLL with the given name in the output folder, try reinstalling the NuGet packages and make sure that the assembly is copied to the output folder on build. Then repeat these steps.