Conditionally select items in a feature (for a SP2010 and 2013 compatible solution)

Hello,
in the Task of migrating our  Solutions to SharePoint 2013, i´m just curious if i can conditionally put items in a Feature.
What i already did in the solution: Defined configurations for debug/release for SP2010/SP2013 and modified the Project files in the solution directly (different target Frameworks and different references to SharePoint dll´s).
My first solution i started with only contains some helper code to set taxomony Connections for fields and the rest is just column and Content type definitions. It compiles well with VS 2012 on SP2010 and SP2013 and the created WSP´s could be installed on
the System. However i can´t activate the Feature on SP 2013, because one of the column names in our solution already exists in SP 2013. So I decided to add a new elements.xml with a redefined column name.
So I have LzColumns\Elements.xml and LzColumns2013\Elements.xml.
Depending on the configuration, I want to include only one of the element.xml´s in the feature. I tried to edit the project file and added a Configuration attribute to some of the Items there but with no success.
Which possibilities do I have? Separate Features (with equal ID) ? Split into two projects (but this copies code).
Greetings, Jörg

I would do a bit different way. Instead of using CAML (or xml) based columns definition, I would do it programmatically. I would create a 'class library' project (you can call it MyCompany.SPLibrary, for exmaple) where I would reference SharePoint 2010 DLLs
and add class/methods to create columns, content type etc programmatically.
Then I would create two solutions one for SharePoint 2010 WSP and another for SharePoint 2013 WSP and refer the library project MyCompany.SPLibrary to both projects. FYI, due to 'assembly redirection' SharePoint 2010-based MyCompany.SPLibray will still work
in SharePoint 2013.
Till now all will be ok for SharePoint 2010 development.
Now for 2013 developers (so SharePoint 2013 dev environment), SharePoint 2010 based library project will not compile as 'sharepoint 2010 dlls' doesn't exist. To fix this issue, in the SharePoint 2010 project, instead of referring the SharePoint DLLs from
GAC, copy the DLLs first into local directory and then refer the DLLs from local directory.  So when the same 2010-based library project will be opened from SharePoint 2013 development environment, SharePoint-2010 dlls will be available in local folder
and the project will compile ok.
We used similar approach for one of the SharePoint product we developed which needed to support multiple version of SharePoint Version. The reality is you can't make it 100% automatic, you still need to duplicate some code/xmls.
Thanks,
Sohel Rana
http://ranaictiu-technicalblog.blogspot.com

Similar Messages

  • 1Z0-035 Oracle9i New Features for Oracle7.3 and Oracle8 OCPs ...

    Hi All
    I am preparing for OPP exam 1Z0-035.
    Oracle9i New Features for Oracle7.3 and Oracle8 OCPs ..
    Can somebody please let me know where can I get the Oracle Material (pdf) for the same.
    or any good book i can purchase.
    Thanks
    Shahid
    [email protected]

    Hi,
    I am interested in knowing the link for 1z0 035.
    Please let me know Shahid - if you have got the document or any particular book.
    I need to give my exam.
    Thank you,
    Gauri
    [email protected]

  • Is it planned to add feature for creating tables and lists in Adobe Edge Reflow?

    First of all, thank you very much guys for all your work!
    In my opinion Adobe Edge Reflow is missing quite important features, like creating tables and lists. For me it's a reason why I can't switch to Reflow. Any plans for implementing these? Is there any place where I can see the list of planned feature implementation? Didn't find it.

    Missing tables is a big one for me too, especially when doing data-grids. My last prototype was using multiple responsive data-grids where I used the simpler essential/optional hide column approach, instead of stacking or scrolling the data. I had used Reflow in the past for basic content prototypes... but had to do this one by hand... took longer. Using divs for this did not collapse properly in all the browsers, plus the back-end team use widgets that only generate tables. Here is the example:
    http://www.topwebworks.com/assets/test/prototype/riocompass_prototype_v1

  • Attendant Console for CUCM 8 and above, My Solution.

    I work for a community college in which we employ a full time operator and have several people to fill in for breaks and vacations. Having an attendant console is very important. To complicate matters, we need to have more that the corperate directory in the console for numbers such as departments (Admissions, Financial Aid, etc.) as well as fax numbers and other references.
    The attendant console that Cisco provided up untill version 8 met our needs. We upgraded and purchased CUEAC. And for 3 grand, we got a pile of crap with only one seat. The big problem is that it does not support directory integration, does not support incremental search, and has one of the worst implementation designs I have yet to see.
    We have tried many consoles, all lacking in one area or another. The one that best met our needs was the most expensive, and had the smallest feature set. We could not justify spending money on somthing that is not at least as good as the free product that cisco once offered.
    My crazy solution: Use CUCMAC (Assistant Console). For reference, we have UCCX with Basic Seats (No Desktop Agent).
    Cons: Does not support imcremental search or directory integration.
    Pros: Free, Unlimited seats, one search entry searches all fields.
    Implementation:
    Created a dummy "Manager" which allowed me to be able to create "Assistants" (operators).
    At this point each person that is to act as an operator can now log into this software with their network username and password (we are LDAP Integrated). They can see and control the lines on their phones, and the software is almost identicle to the Attendant Console Software they were use to.
    Created and ACD queue for the operator and added an ACD DN to each phone. The users go Ready and Not Ready using the IPPA.
    In our situation, we have the full corperate directory, which for most companies is fine. In our case we need additional numbers for the Departments and such. Becuase we are LDAP integrated, we will need to sync to an additional Directory source for the missing numbers. I wish we could use " Contacts" in AD, but becuase they dont have user ID's, cisco will not import them.
    To summarize operation, the operator logs into the ACD queue and used Assitant Desktop as a user interface for the phone. The only thing that differs from Attendant Console, is that you have to use the phone to log in and out, not the desktop software.
    Please let me know what you thing, and any ideas how to improve this setup would be greatly appreciated!

    Bradley,
    I cannot comment on the implementation you have gone through but I can comment on your comments about CUEAC.
    There is going to be a new release in June this year which will support directory integration directly to AD as well as the CUCM sync which is available today.
    The GUI iteself is to undergo a redesign in version 10, the date on this release is not yet known.
    Incremental search is something which is not on the roadmap but is something I will discuss with the Product Manager to see if it can be considered.

  • Selecting items in column/list view copying them and pasting them to

    in the past (was it OS 9 ?????? ) i would be able to select all items in a folder
    if i had a long list of titles of files ( songs ) and copy to clipboard and then paste them to text edit and have that list handy for future reference. for example if i have a DVD with 100 photos. I want to keep a file of the names only. I used to be able to select all of them copy and then paste to a document. Cant do it in TIGER????? am i wrong?
    work arounds....

    Hi, Glenn.
    How this works now appears to depend on the application into which you are pasting the results.
    If I open a folder, Select All (Command-A), Copy (Command-C), and then paste into a TextEdit document, if the contents include PDFs it actually pastes all the PDFs into the document! Looks like a change in how this works.
    If I paste into a Carbonized text editor, like Tex-Edit Plus, it pastes the file names, as expected.
    Here's a workaround:
    1. Open the Macintosh HD > Applications > Utilities folder and Lunch Printer Setup Utility. You should see a printer icon in your Dock.
    2. Drag and drop the folder whose contents you want to save a listing of to the icon in the Dock.
    3. When the Print window displays, either:• Click Preview. A print preview of the FInder info for those files appears in Preview. If you like what you see, select File > Save As... and save the output.
    • Click the PDF pop-up button and select "Save as PDF" from the list. Follow the prompts from there to save the Finder info as a PDF file.The resulting PDF saves the list you desired.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • DROPDOWNLIST VALUE IS NOT TRIGGERED(selected value obtained is 1 for both task_id and employee_id

    namespace mainprjct2
    public partial class WebForm7 : System.Web.UI.Page
    bal ba=new bal();
    dal ob = new dal();
    protected void Page_Load(object sender, EventArgs e)
    SqlDataReader dt= ba.select();
    DropDownList3.DataSource = dt;
    DropDownList3.DataTextField = "Task";
    DropDownList3.DataValueField = "Task_id";
    DropDownList3.DataBind();
    SqlDataReader dt1 = ba.select1();
    DropDownList4.DataSource = dt1;
    DropDownList4.DataTextField = "Employee_name";
    DropDownList4.DataValueField = "Employee_id";
    DropDownList4.DataBind();
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    ba.Task_id = DropDownList3.SelectedValue;
    ba.Employee_id = DropDownList4.SelectedValue;
    ba.Assigned_date = TextBox1.Text;
    ba.Task_start_time = TextBox2.Text;
    ba.Task_end_time = TextBox3.Text;
    ba.duration = TextBox4.Text;
    ba.insert5();

    Hi,
    Test Tools in Visual Studio 2010 and 2012
    forum mainly discusses Visual Studio testing issue.
    It seems that the issue is on your web application development. If yes,
    I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/  for better solution and support.
    If you get the issue when you work with test, please provide us detailed information about your test scenario and failure information.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting message 'ipod cannot be synced because there is not enough free space to hold all the selected items' when trying to sync both ipod and iphone.

    Recently downloaded new itunes when laptop upgraded from Vista to Windows 7. Tried disconnecting and resyncing but that does not work.
    The bar across the bottom of my itunes is not full for either device & I don't have an unusually high amount of 'other' on either device.  I am only trying to sync the same amount of music etc as I had before the new itunes, so it should fit onto the devices no problem.  There are no duplicate songs in the new itunes.
    Completely stuck!

    I suspect the upgrade has confused the mechanism by which iTunes compares what is on the device already with what your sync options imply will be added. In each case backup the device and then immediately restore the device from its backup. I take it all media is in the library and you're not getting erase & sync messages. Otherwise, or if you sync any contact information, then take a look at Recover your iTunes library from your iPod or iOS device for some tips.
    tt2

  • Where can we suggest new features for Yahoo Messenger and other RIM IM clients?

    I just downloaded the new version of Yahoo Messenger and I like the user interface. But every time a new version comes out, this application creates a less-complete history of contact behavior. Several versions ago, the contact's status showed up in the open conversation, along with the time stamp of when the status changed. This included Idle and Custom Status changes. That disappeared. In the last version, you could see the time the contact signed in or out last, and sometimes both. Now they're gone as soon as you close the conversation.
    The whole idea of having Yahoo up on the BlackBerry all the time is that you don't have to be staring at the screen all the time, that you should be able to take it out of your pocket and check out those events that occurred that didn't set off alarms. I'd like the whole contact history to be right there, for as long as I want to keep it active. How can I make this suggestion to RIM for the next version of Yahoo Messenger? Thanks.
    Message Edited by kstrouse on 07-10-2008 02:20 PM
    Solved!
    Go to Solution.

    This is a good place to share your thoughts and ideas. RIM could easily get these info as this community is build by RIM.
    tanzim                                                                                  
    If your query is resolved then please click on “Accept as Solution”
    Click on the LIKE on the bottom right if the post deserves credit

  • Can I add a scrolling feature (for both x and y axis)  in BG(Gantt chanrt)

    Hi Experts,
    I have developed a chart application in WD ABAP using Business Graphics. But the problem is that if there are more number of records, the size of the bars in the graph start shrinking , can I somehow introduce scrolling features so that at a time only 15 records are displayed on both the axis and the user can scroll in to see more records if he wants to .
    Regards,
    Abhishek

    Hi Abhishek,
    <li>Check this transaction code GRAL where you find many graph related programs are found .
    Thanks
    Venkat.O

  • Since upgrading to OS 10.8.5 login keychain corrupted keeps asking for password for OSX, mail and Safari. Solutions?

    Ever since upgrading to OS 10.8.5 login keychain corrupted; keeps asking for pasword tor OSX, mail and Safari. Help!

    Have you tried opening Keychain Access and running Keychain First Aid (under the Keychain Access menu) on the login keychain?

  • Sub-items not supported for selected item(s) error in LSMW

    Hi gurus,
    Am working on BOM's data load via LSMW. Most of the item are stock items (L) but some of the items i am loading are Text items (T). Because of the customizing done in OS13 (that can't be changed apparently), the LSMW executed in foreground gives the message "Sub-items not supported for selected item(s)" (only as information, green message) and the dataload IS STOPPED.
    Is there a way to :
    -> change OS13 (allow sub-items for text items) : When i try i have an error message.
    -> or to force LSMW program no to go on the sub items screens (this way the program does not stop and the BOM is created)
    Thanks in advance for your answers,
    Olivier

    Found the solution my self all relations between dataload file and sub-items structure had to be suppressed in LSMW.

  • Attach File to the selected item

    Hi all,
    To attach file to the Puchase order, i am using
    1- BBP_PD_PO_GETDETAIL ( PO Guid )
    2- BBP_PD_PO_UPDATE ( E_HEADER + IT_ATTACH  with PO Guid )
    3- BBP_PD_PO_SAVE ( PO Guid )
    4- Commit
    and it works Fine
    Now when i want to attach this file to the selected PO Item by making the same prossess it's not working (By passing the PO ITEM Guid into IT_ATTACH )
    Am I missing some parameters to attach the file to the selected item  ?
    Best regards

    Thanks for help!
    From my experience I can notice that Apple has an excellent support team, but it doesn't listen it's consumers. This is 3rd generation iPad, but this feature still doesn't exist. I've had a better opinion about this company.
    IMHO this feature is a basic function of any other mail program. About 7 years ago I had a simple mobile phone with mail client which supported this function, but costed about 100$. Now I hold in my hands device with price ten times higher but it's native mail client doesn't have this feature.
    Different Android, Windows devices allow to do this, but iPad doesn't.

  • How can I return to the last selected item in a dialog box

    In OS 9 using Dreamweaver (for example) when I was adding images to a document, each time I added one the dialog box would return to the last selected image and I could just arrow down to the next in the list, add it (exiting the dialog box) and then repeat the process until I had added all the images in the folder. Now, using OS 10.4, after I add an image, and return to the add image dialog box it goes to the first item in the folder list instead of the last selected item. this really slows the process down, and when I'm adding 100 items or so, it's a real drag. I figure there has to be a way to get the dialog box to return to the last selected item, but I don't know what it is. Help!

    sorry, that is not what I want to do.
    I want to return to the initial state before I quit the app.
    Actually, I want to return to the intial state after I click a row in a table the second time.
    Sorry, I didn't say clearly.

  • Get artboard of selected item

    I have script where I select items on multiple artboard but I can't seem to get get active art board of the selected item. Is this possible?
    each artboard has a text item and I would like them in the same position on each of their own artboards that they are already one. right now it adjusts them all to one artboard. here is what I have so far
    doc = app.activeDocument;
    for(i = 0; i < selection.length; i++){
        var firstItemPosition = doc.selection[0].position;
        doc.selection[i].position = firstItemPosition;
        var activeArtboardIndex = doc.artboards.getActiveArtboardIndex();
        alert(activeArtboardIndex);

    hmm it seems it doesn't work the way that I thought it might. It still always positions items based on first artboard even when you set: 
    idoc.artboards.setActiveArtboardIndex(i)
    I tried to implement it like this, any idea what I might be doing wrong?
    // return each selected item's artboard index
    // carlos canto 09/28/2013
    // http://forums.adobe.com/message/5721205?tstart=0#5721205
    var idoc = app.activeDocument;
    app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
    var selec = idoc.selection;
    var firstItemPosition = selec[0].position;
    var sel = [];
    for(i = 0; i < selec.length; i++)
        sel.push(selec[i]);
    for(j = 0; j < sel.length; j++) {
        idoc.selection = null;
        alert('selection ' + j + objectArboardIindex (sel[j]));
    for(j = 0; j < sel.length; j++)
        sel[j].selected = true;
    app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
    function objectArboardIindex (obj) {
        var idoc = app.activeDocument;
        for(i=0; i<idoc.artboards.length; i++) {
            idoc.artboards.setActiveArtboardIndex(i); // activate each artboard
            idoc.selectObjectsOnActiveArtboard(); // select all in artboard
            if (obj.selected) {
                obj.position = firstItemPosition;
                return ' is in Artboard ' + idoc.artboards.getActiveArtboardIndex();
            idoc.selection = null;
        return ' is outside artboard(s)';

  • Remember selected item with ComboBox

    Hey All,
    I was just wondering how other pople solve this issue.
    I have a combobox with a XX number of items in there. Now
    when I re-populate the combobox the selected item get's lost. I
    also would like to remember the selected item during sessions. For
    instance when A user selected item XX on monday. I would like to
    have it automatically set XX again when a user comes back on
    tuesday.
    Is there a meganism in adobe flex that allows me to remember
    a 'state' of a object, or is that custom programming?
    Ideally I would like to have a component that can do teh work
    for me rather then my application handles the logic, some sort of a
    state manager?
    Ries

    Use a SharedObject, and write to it in the ComboBox change
    handler. See SharedObject in FB3 help sys.

Maybe you are looking for