VSeWSS Deployement cast loader exception:
Do anyone have any ide of solution to this problem.
Error 1 VSeWSS Service Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
Log file written to: C:\Documents and Settings\Default User\Application Data\Microsoft\VSeWSS 1.3\VSeWSS1.3 service.log
2010.01.13 10:31:27 Error
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
I only work with GAC deploys, this is my experience with it:
LoadException means a sequence of:
CopyToLocal is set in an assembly reference, this assembly will be included in the WSP package.
VSeWSS tried to deploy, it retracted the solution (thus removed the reference assemblies from the GAC) but something went bad, but it never saved anywhere that the solution was retracted but an error occured.
You attempt a new deploy, the reflection code in VSeWSS attempts to load the CopyToLocal assemblies in the GAC, they dont exist. LoaderException is thrown.
if you open the GAC, you sometimes SEE the assembly there! IT'S A TRAP :) if you F5 the GAC the assembly will be properly gone.
In case this is what happens, the solution is:
Manually Add the CopyToLocal assemblies to the GAC
restart IIS (or recycle the VSeWSS pool)
profit
a 'Clean Solution' might also help between steps 2 and 3.
Related
I add licensed select.pdf.dll to my SharePoint project. This dll file has added in both the visual studio reference and the package section(Deploy target as 'Global Assembly Cache (GAC)').
I was not able to deploy my solution to my sharepoint development server, with the error message
“Error occurred in deployment step 'Add Solution': Error: Cannot add the specified assembly to the global assembly cache: Select.Pdf.dll.”
I have googled the problem, someone cannot deploy because the .dll they want to deploy already existed in %windir%\assembly folder and the .dll is locked by other process.
VS2015 build error: Cannot add the specified assembly to the global assembly cache
https://devramblings.wordpress.com/2011/03/23/error-cannot-add-the-specified-assembly-to-the-global-assembly-cache/
However, the "Select.Pdf.dll" I want to deploy has never been deployed before, the %windir%\assembly and %windir%\Microsoft.Net\assembly folders do not have same name dll. file in them.
I have tried to restart VS, and reset IIS. the problem still existed.
Is there any way to solve the problem? Thank you.
You need to add the relevant .dep files also. When you add your assembly to the advanced section of the package you can add Class Resources at the bottom of the dialog. In my case I had to add Select.Tools.dep and Select.Html.dep before I could deploy my sharepoint solution.
#Mundi's answer works, only clarification is that for us, only selecting Select.Html.dep was enough. It is to be noted that you have to specify that you want to view all files (not just .dll) when selecting the additional Class Resources.
Alternative solution that worked for development scenario (but not advisable for production) is using appropriate gacutil.exe to your .net version.
I had follow the instruction from the channel 9
https://channel9.msdn.com/Blogs/Seth-Juarez/How-To-Integrate-the-Vungle-SDK-for-Windows-10?ocid=player
and I get the error below:
General metadata correctness
Error Found: The general metadata correctness test detected the following errors:
The assembly VungleSDK in file VungleSDK.winmd has a non-empty manifest resources table. Every Windows Runtime assembly must have an empty manifest resources table.
Impact if not fixed: Windows store doesn't allow apps that don't pass Windows Runtime Metadata Validation.
How to fix: Please ensure that the compiler you are using to generate your Windows Runtime types is up to date with the Windows Runtime specifications.
I does not understand this errors, anyone can help?
I had an error look like the same as the problem with the sdk, but not with the SDK, its in my own project.
The project doesen't contains anything except the project.json and refers a SharedProject which contains only one .cs file.
I get the same error, but I can't find the sollution.
I tryed:
- Add app.manifest (from template)
- Resource Dictionary
- Resource File
Both was empty as the error sais "Windows Runtime assembly must have an empty manifest resources table", so I created some empty one.
I would be happy to know what did you do with the Vungle SDK, what caused the problem and what solved it.
The Vungle winmd file contains same files like my projects winmd...
Here is the answer for my own problem.
Finally I found what caused the problem, by inspecting the .text file in winmd file and locate the file whose content was included in the .text.
Under the winmd project Properties the template generates a .rd.xml ( usually your package name) which is a resource dictionary what sould be removed in my case.
I know it won't help to solve the prolem with the old SDK which were patched earlyer, but if somebody get the error message on package validation and don't know what to do, here is something he can try.
(Just to be clear my problem not connected to the SDK I just get the same error message on validation)
I've added MEF to my web api project using IDependencyExplorer and all works fine.
However, after a few minutes of running, I start to get export not found errors.
When I check the catalog in the debugger, the exports have gone and the assembly that contains the exported type is no longer there.
We aren't removing assemblies from the catalog explicity, so I'm baffled as to why this is happening. Would anyone be able to shed some light on this?
Just figured out what was happening.
I use an aggregate catalog and add the assemblies containing my exports into it.
The first time the web site starts, all required assemblies were loaded in the current app domain, so everything was working fine.
Later on the IIS process was recycling/restarting. When this happens and a new web request is received, not all the assemblies I needed were loaded, and I had put a guard to only add loaded assemblies into the aggregate catalog.
The solution is to force the loading of the assemblies if they have not been loaded yet, or to use a directory catalog instead.
Hope this helps anyone else who experiences this issue.
I have an application that uses .Net remoting. The remotable calls our unmanaged dll that is a client to a Versant database. The previous release of our app communicated with an earlier release of Versant in exactly the same way. We now have 2 different dlls to communicate with the different versions of the database.
The new dll resides in the C:\odin\bin directory, where, in the previous version, the unmanaged dll resided and it worked fine (in other words, it's the same structure). At first we got SxS errors because it was built debug. That worked fine on the development systems, but on a production system, not so much.
Solved that problem and now we get a simple
Unable to load DLL 'uInfinityDbx.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
error. But it's there! The path is good (points to the directory where it lives.
I'm out of ideas on things to check. Any ideas welcome!
The DLL file is present, but maybe one of its dependencies is missing. Try loading the DLL in a tool like Depends to point out dependency problems.
During solution deployments & Feature activation, I am facing an on/off issue where the system is unable to find & load the FeatureReceiver class. Mostly it is file not found exception (even though the assembly is there in the GAC). I checked over the net and this seems it a common issue with solutions (wsp) packaging DLL to be GACed. (But, no one has any clue or solution!)
What is the recommendation and guideline to fix this issue? We are setting the flag to reset IIS in my solution definition - but that does not seem to help. The issue is more prevalent in multi-M farms.
Thanks
This is a general problem in SharePoint in cause of the "SharePoint 2010 Timer Service". Because this one caches the wsp's and during the deployment or feature activation old references will occurres this error!
So try the following link. I hope this solution will help you.
http://msscorner.de/en/2011/10/27/sharepoint-deployment-failed-to-create-receiver-object-from-assembly/
First try the solution linked to by Falco...
If that does not help, try this:
Open the event-receiver file created by sharepoint
Compare the GUID above the event-receiver-class with the one stated in the stack-trace "...class=7g3562-438dn4...
If it does not match:
Copy the content of the class
Delete the file
Create a new file by right-clicking the feature -> add new event reciever
Pass the content
First thing, you dont need to give iisreset as your wsp deployment would have already done that.
Can you check if the assembly name, version, public token specified in the feature.xml is same at the actual assembly that is deployed in gac? I am thinking there is mismatch in assembly signature