Saturday 15 January 2011

sharepoint - How to fix SPFeatureDefinition does not contain a definition for RootDirectory -



sharepoint - How to fix SPFeatureDefinition does not contain a definition for RootDirectory -

i'm new sharepoint development, , i'm trying add together xml file feature reference xml file content in feature event receiver.

it seems general recommendation utilize in question:

how retreive info xml file in sharepoint 2010 feature event reciever?

however, code not compile when reference rootdirectory property. error see below

'microsoft.sharepoint.administration.spfeaturedefinition' not contain definition 'rootdirectory' , no extension method 'rootdirectory' accepting first argument of type 'microsoft.sharepoint.administration.spfeaturedefinition' found (are missing using directive or assembly reference?

now, weird part while debugging, able evaluate rootdirectory property correctly in quick debug window.

am missing obvious? said, i'm new sharepoint.

my feature scoped web level, , have reference microsoft.sharepoint.administration in using statements.

any help appreciated, thanks.

it indeed basic.

the solution/project set sandboxed. going properties of project (not property pages hitting f4 while project selected on solution explorer) , setting sandboxed false allow compile when you're accessing rootdirectory solution in code.

also, few other properties/method not show when solution sandboxed instead of marked farm solution.

sharepoint sharepoint-2010 sharepoint-2013 event-receiver sharepoint-feature

No comments:

Post a Comment