DLL error at Publishing nopcommerce 3.80 fresh code - publish

I've download nopCommerce 3.80 fresh code from github and publishing it from Visual Studio 2017 framework and I'm getting DLL related error.
Here are error messages.
------ Build started: Project: Nop.Services, Configuration: Release Any CPU
SGEN : error : Could not load file or assembly ..\nopCommerce_3.80_Source\packages\EPPlus.4.1.0\lib\net40\EPPlus.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
Build started: Project: Nop.Web.Framework, Configuration: Release Any CPU
CSC : error CS0006: Metadata file '..\nopCommerce_3.80_Source\Libraries\Nop.Services\bin\Release\Nop.Services.dll' could not be found
------ Build started: Project: Nop.Web, Configuration: Release Any CPU
CSC : error CS0006: Metadata file '..\nopCommerce_3.80_Source\Presentation\Nop.Web.Framework\bin\Release\Nop.Web.Framework.dll' could not be found
4>------ Skipped Publish: Project Nop.Web, Configuration: Release Any CPU ------**
Solution is successfully building in debug and build mode.
What can be wrong with DLL at publish time?

I get the solution by unblocking the error dll file by right click of that dll in their properties option.

Related

SSRS 2016: Report Delivery Extension to send report email via MicrosoftGraph&AzureIdentity, but error in assembly version of Microsoft.Identity.Client

Microsoft announced the expiration of Basic Authentication in Exchange Online except STMP AUTH, but no guarantee on using it for long term. So, I decide to start the change with our Reports delivery in SSRS 2016 which mainly via SMTP email right now.
After reading many sources, I found that SSRS has Report Delivery Extension which we can build assembly to customize new Delivery Method, and from here I can send the Report Email through Microsoft Graph & Azure Identity.
Link of delivery extension
In the Project, I added Nuget Package of:
Microsoft Graph package version 4.47
Azure Identity version 1.8
the VS automatically add other dependencies to project and I can build the project successfully without any Warnings or Error
However, deploying the assembly to SSRS, after the subscription runs, I got the error in the log as following:
notification!WindowsService_0!59ac!11/18/2022-16:42:08:: i INFO: Notification 27e69a92-12b9-4ab8-984f-d5910af77de7 completed. Success: True, Status: Error: Could not load file or assembly 'Microsoft.Identity.Client, Version=4.46.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I check carefully the dependency of other assembly in nuget website, but nothing indicates that I'm using wrong version. The Microsoft.Identity.Client.dll file is copied to Bin folder of ReportServer.
I tried to update the Microsoft.Identity.Client.dll file with version 4.46.0 in nuget (ignore the dependencies), but another assembly version mismatch comes up:
notification!WindowsService_0!4d94!11/17/2022-23:59:03:: i INFO: Notification b82bb214-3880-4f80-857b-cdf42cde8ff0 completed. Success: True, Status: Error: Could not load file or assembly 'System.Diagnostics.DiagnosticSource, Version=4.0.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
And now, I could not find the System.Diagnostics.DiagnosticSource.dll with version 4.0.4.
I can only find version 4.0.0 or 4.3 above.
Now I'm stuck here.
Does anyone have experience on this?
How can I bypass this dependency check?
I even try to downgrade version of Azure.Identity version to lower one, but still stop at the System.Diagnostics version 4.0.4
Then I create a Console Application which I just send a test email with all latest version of assembly Azure.Identity and Microsoft.Graph on the same server (same .Net Framework 4.7.2 and same firewall configuration). It can be sent sucessfully.
I'm in doubt that SSRS 2016 has any assembly confliction which point to lower version of those assemblies.
I have the exact same problem, but with building an add-on for Act! for Windows. My code works outside Act! in a standalone .NET 4.7.2 app, but I get the exact same conflict as described above when loaded within Act!. That said, Act! itself doesn't even use Microsoft.Identity.Client (that dll is not part of it)

build error: error building at STEP "RUN /usr/libexec/s2i/assemble"

I have faced this error with OpenShift:
error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": error while running runtime: exit status 1
This is the log:
Using SDK: 3.1.111
---> Restoring application dependencies...
Restore completed in 4.45 sec for /opt/app-root/src/PMCModel/PMCModel.csproj.
Restore completed in 13.92 sec for /opt/app-root/src/PMCBackEnd/PMCBackEnd.csproj.
---> Publishing application...
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
/opt/rh/rh-dotnet31/root/usr/lib64/dotnet/sdk/3.1.111/Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/opt/app-root/src/SharedModule/SharedModule.csproj]
/opt/rh/rh-dotnet31/root/usr/lib64/dotnet/sdk/3.1.111/Microsoft.Common.CurrentVersion.targets(1175,5): error MSB3644: The reference assemblies for .NETFramework,Version=v4.8 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks [/opt/app-root/src/PMCModel/PMCModel.csproj]
error: build error: error building at STEP "RUN /usr/libexec/s2i/assemble": error while running runtime: exit status 1

Error while building project with ExportSWC plugin in FlashDevelop

I am making a ActionScript library which is a Flex 4 project for my Adobe AIR Native Extension in FlashDevelop. When I build the project its successful, but when I try to build the project with ExportSWC plugin to get .swc file I get the following message:
Prebuilding config C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml...
Configuration writen to: C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml
Running Process:
"C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\compc.exe" -load-config+="C:\Users\Osama Mohammed\Documents\AndroidSIPManager\obj\AndroidSIPManager.flex.compc.xml"
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
Building AsDoc
AsDoc temp output: C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe
Start AsDoc: C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\asdoc.exe
-lenient=true -keep-xml=true -skip-xsl=true -output "C:\Users\Osama Mohammed\AppData\Local\Temp\7827039c-c329-4b6d-acb7-447146a5f4fe" -source-path "c:\users\osama mohammed\documents\androidsipmanager\src" -doc-classes com.innovative.androidsipmanager.AndroidSIPManager com.innovative.androidsipmanager.Main -exclude-dependencies=true -target-player=10.1
Following is the error:
Error loading: C:\Program Files\Java\jdk1.7.0_25\jre\bin\server\jvm.dll
AsDoc complete (6)
Build failed (6).
Please help me in solving this error.
I had to remove Java 64 bit & install Java 32 bit. Now it is working.

Error : Multilingual App Toolkit build completed with errors

I have a working project and it was working quite fine.
All of a sudden I am not able to build my Windows Phone project.
1>------ Build started: Project: win-ladenzeile, Configuration: Debug Any CPU ------
1> Multilingual App Toolkit build started.
1>C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets(9,5): error : The file exists.
1>C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets(9,5): error :
1>C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets(9,5): error : Update XLIFF build failed.
1>C:\Program Files (x86)\MSBuild\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets(9,5): error : Multilingual App Toolkit build completed with errors.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
I tried the following:
Disable and re-enable the Multilingual App Toolkit.
Repair the Multilingual App Toolkit.
Reinstall the Multilingual App Toolkit
git reset head --hard
Restart PC couple of times.
I am really confused and can't believe the Visual Studio suddenly started acting weird.
Any help is highly appreciated.
EDIT - (After 18 hours)
I am quite sure this has to do with the Multilingual App Toolkit.
I disabled it in the .csproj file
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets" Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\Multilingual App Toolkit\Microsoft.Multilingual.WindowsPhone.targets')" Label="MultilingualAppToolkitForWindowsPhone" />
Also disabled "Enable Code Analysis on Build" as I was getting some errors about Code Analysis.
I hope the next version of the toolkit will fix this bug.
You will see this when you hit the max number of temp files on your system. See: http://msdn.microsoft.com/query/dev11.query?appId=Dev11IDEF1&l=EN-US&k=k(System.IO.Path.GetTempFileName);k(GetTempFileName);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.5);k(DevLang-csharp)&rd=true
The Multilingual App Toolkit also uses this API and if you are already close to the limit, it can trigger the error.
To resolve this issues, please be sure to clean your %temp% folder to get unblocked.
Had this problem today and it seemed to be because the xlf files used by the Multiligual App Toolkit were not checked out of source control.
The actual problem appears to be the fact that the files are readonly on disk.

Monodevelop 2.8.6 on windows

I hope someone can answer this as its driving me crazy. I have installed Monodevelop on windows XP. The version being 2.8.6.5. I set the default/active runtime as Microsoft .Net and set my projects to target .net 4.0 via project settings BUILD-->General->Target framework.
When I debug it from the application output window it loads XSP 2.0 and tries to the old .Net 2 DLL's ie from the .Net 2 GAC - C:\windows\assembly instead of the .Net 4 GAC.
when I debug setting Mono as the active runtime it works ok.
I get the error, which is understandable given the fact the build is targeting .Net 4 yet its looking at the wrong runtime:
Could not load file or assembly 'TestWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.BadImageFormatException: Could not load file or assembly 'TestWeb' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Here is the output from the Output window:
Loaded Module 'C:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
Started Thread 1872
Loaded Module 'C:\Program Files\MonoDevelop\bin\xsp2.exe'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\MonoDevelop.Xsp\2.8.0.0__0738eb9f132ed756\MonoDevelop.Xsp.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
Loaded Module 'C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
many thanks
Simon.