Hot answers tagged assembly-references
7
When you have common/shared components, like the helper DLL you talk about, that get used acros multiple solutions within you ogansisation. My recommendation is to package these up as a 'framework solution' that is deployed to the servers indendently of the 'feature based solutions'.
This way you 'feature solutions' are developed in the knowledge that ...
3
I am pretty sure this video tutorial will gonna help you but make sure to do a IIS Reset after.
http://www.youtube.com/watch?v=Y_QSoIMEzeU
Its quiet simple, all you need to do is, drag your dll into Assembly folder in Windows which is located mostly in drive where you installed Operating System.
Hope it helps :).
3
My recommendation would be that you shouldn't.
You should start from scratch again and develop your Web-Application to be deployed below the _layouts folder in SharePoint using a WSP package and all of your code should be in code behind which is compiled into a dll deployed to the GAC.
You can technically get your solution to work, but it's a hack, that ...
2
I think, the problem is on line 1. There you specify an Inherits attribute together with the Codebehind attribute.
You probably can't specify them togheter as specified here:
http://msdn.microsoft.com/en-us/library/d19c0t4b(v=VS.90).aspx
Also, if you specify the Inherits attribute, you have to specify the full qualified name of your type in line 1:
<%@ ...
2
Here is a link to a page that describes the process for the out of the box SharePoint webparts. If you want to include your own webpart, you need to add a reference to your assembly in powershell. The following line adds a reference to one of my custom webparts into powershell.
[System.Reflection.Assembly]::Load("rossri.NavigationControl, ...
2
All the information in the .dwp (and .webpart) files including the assembly version is only a blueprint for which web part and corresponding properties to load when you select this web part from the WebPart gallary, SharePoints WebPartManager will then store these settings (possibly updated by user) in the content database. Each time the webpart page is ...
2
Your approach is quite correct. Have a separate wsp and deploy the common dlls to GAC.
Now for your questions :
For development of other solutions in Visual Studio which need to refer these dlls,
Just add assembly references as you normally do, choose browse option and select the required dlls. I would recommend navigating to ...
2
This isn't a SP security issue, it's a file system security issue.
Make sure the identity running this code has permissions to read the
file system.
Source
Make sure your C++ library has sufficient file permissions so that SharePoint can access it. You can match permissions with your development environment.
Other then that all I can think of is ...
2
Just drag and drop the ajaxcontroltoolkit into the assembly. You can add the ajaxcontrolltoolkit dll also to your project through references. Do an iisreset as you made an ammendment to the GAC(assembly).
Now your project (webpart or anything that is using the ajax dll) has reference to the ajax dll.
hope it helps :)
2
Running Build in Visual Studio will generate/create the assembly. Deploying it will simply register it with the SharePoint platform.
Update:
As David added, the "Deploy" command in Visual Studio does also trigger the build event before it is deployed to SharePoint. The act of deployment within SharePoint though, simply registers it with SharePoint.
2
This isn't my forte but I ran across the note below on this MSDN posting; perhaps that will help.
If you wanted a job to run on all servers, including application
servers, your class should derive from SPServiceJobDefinition. Pass
the timer service (SPFarm.Local.TimerService) as the SPService
parameter of the SPServiceJobDefinition(String, ...
1
You can try Alexander's PowerShell link but if you want something really easy and quick which will enable you to get assembly you want from gac then you can try this,
Click start and then on "Run",
Put this command in it,
%windir%\assembly\GAC_MSIL // you move back a directory it will show you gac as folders which you can copy and that.
If your ...
1
By default, FileStream needs ReadWrite access that’s why System.UnauthorizedAccessException is thrown because on a production machine, User account under which asp.net worker process runs or a windows service or for that matter any process will not have the write access to a file by default.
Please make sure you get the reference to any web is constructed ...
1
If your site uses Anonymous access, this could be the issue as the Anonyous ID is not included in 'Everyone'. You might need to wrap your code in the RunWithElevatedPrivileges() command so that it runs under the ID of the application pool
SPSecurity.RunWithElevatedPrivileges(delegate() {
using (SPSite site = new SPSite("siteUrlOrID")) {
using (SPWeb ...
1
Localization of feature.xml differs from localizing something else. As by Microsoft's reference, you have to create a special Feature resource file (which will be stored along with the feature) in order to do that:
How to: Localize a feature (MSDN)
Based on my experience, if you deploy your resources into "Resources" mapped folder (in 14 hive), they will ...
1
The classes in the System.Collections.Generic namespace is in System.dll and mscorlib.dll, so you won't find a DLL named System.Collections.Generic.dll.
Generics were introduced in .NET 2.0, so because SP 2010 requires .NET 3.5 to run, the namespace should be present in those DLLs. Make sure you're targeting the right framework in the project's build ...
1
Possibly third-party dll uses newer .NET version, than SP is based on. For instance, SP2010 is based on .NET 3.5, but dll was created for .NET 4.5. In such a case you can try to find third-party dll created for 3.5. You can check dll framework version in Visual Studio by clicking right button on it and looking at its properties.
Also possibly you selected ...
1
You will have to deploy shared libraries to the gac if you are using Sharepoint objects... i had a simialar issue like this...
Issue Refrence
just have a look at my answer, it will explain why it must be installed in the gac. and how to add it to the Gac. their is also a seperate option. i have listed it their aswell
1
I get this exact problem myself. I can't work it out either, but I have noticed that it will only occur when I have certain source code files open and active in Visual Studio (in your case it would be a code file from the SecondLib project), and it would only occur when trying to do a package or deploy action.
If you close the source files from SecondLib ...
1
The source code is readily available for the Enterprise Library so if you are going to use it, you should rebuild it using one of your keys so that it can be put in the GAC and then easily reused by other applications. Once that is signed, you should do the same with your web parts.
However, if you wish to DLLs without strong names then you will need to ...
1
I suppose that the dll isn't beging deployed with your solution. SharePoint needs to know where to find the aforementioned dll. You are adding a reference to the dll in your solution but this doesn't mean that the dll is getting deployed to the server.
If this is the issue, you can resolve it by opening the Package node in your solution and then switching ...
1
I've explained some possible approch in my anwser of the question Best practices for creating a shared code library for SharePoint projects.
Basically, what I'm suggesting is to build a wsp file with the required shared libraries. Then create a feature, just to say the libraries has been deployed.
In you project, you can simply reference your dll, set the ...
1
I did the same thing today with a separate .ashx file and a .cs file and it works for me.
I got the same error but then noticed I had made a class name mistake.
Here is my code:
*****DemoHandler.cs********
using System;
using System.Web;
using Microsoft.SharePoint;
namespace CustomHTTPModule
{
public class DemoHandler : IHttpHandler
{
...
1
In visual studio, learn to love the SharePoint Tokens that are available. Read more about them here: http://www.andrewconnell.com/blog/archive/2009/12/03/sharepoint-2010-dev-tidbit-use-the-tokens-in-visual.aspx
1
No, because it falls into ECM bucket of SharePoint 2010 server. The best way to answer similar question is to look into SharePoint Server 2010 SDK. If the assembly is documented under Library reference of SharePoint Foundation, it is available for it and vice versa.
http://msdn.microsoft.com/en-us/library/ee559357.aspx
Only top voted, non community-wiki answers of a minimum length are eligible



