Monday, April 21, 2014

GAC Paths

Starting with the .NET Framework 4 the paths of GAC are changed, here a brief summary.

.NET 2


.NET 4


Saturday, April 19, 2014

Sharepoint feature list instance

When you add more than one list to a feature we need to change the Type and the TemplateType from elements.xml files, otherwise the second list get the first template.

In this example I haved changed the default to 10001

and the other file


Wednesday, April 9, 2014

Linq to Sharepoint 2010 RunWithElevatedPrivileges don't work

Execution of Sharepoint Linq code with elevated privilege didn't work because Linq classes internally use the current context. I has written this simple method to override this behavior.

app.config for Office Addin

When you are developing a plugin office our settings should be saved in the app.config, but unfortunately this results in Excel.exe.config, Winword.exe.config, etc..

To solve this problem simply create a new .config file with the following name:

Visual Studio will create a new file called <pluginname>.dll.config and this is what our plugin will read, as evidenced by the following statement

Remember to set up file property to "Copy to output directory"

See MSDN page