Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Custom Field Type Controls

  Asked By: Lucas    Date: Mar 09    Category: Sharepoint    Views: 1919

I had someone ask if I could make a custom field type, so I went into my dev,
found a good simple article created what they wanted using VS 2008 w/ VSSE for
WSS [visual studios SharePoint extensions 1.2], but it was a little to simple to
deploy it I just clicked the deploy option and presto the custom column type was
now on the create column page, but this does not work for my production
environment b/c we are not allowed to install VS on our production server, and
as anyone who has done SP dev with VSSE you have to have it install on the same
box as your developing for. I am wondering if there is a way to package this up
as a solution, using VSSE or if not what files would I need to pull from my dev
box and package using WSP Builder.

Share: 

 

6 Answers Found

 
Answer #1    Answered By: Ivy Salinas     Answered On: Mar 09

You can package this up as a solution package (.wsp) and have your
administrators deploy the solution.

Please note that Custom Field Types MUST be deployed to the GAC. Because of
this, verify your "<Trust level" on web.config - WSS_Minimum or wss_medium won't
suffice. You'll either have to change the trust level to "Full" or create a
policy file.

 
Answer #2    Answered By: Kevin Davis     Answered On: Mar 09

I'm sorry, but that statement is just flat out WRONG. Yes Custom Field Types
must be deployed to the GAC, but EVERY dll deployed to the GAC runs at Full
trust no matter what the Trust Level setting is in the Web.config. That trust
level only applies to dlls deployed to the BIN directory. You should NEVER run
a production SharePoint environment with the Trust Level set to Full.

 
Answer #3    Answered By: Meenakshi Khochar     Answered On: Mar 09

Ok, thanks for the replies, But I think you both missed my questions point or I
did not ask it right, I want to know what I need to do to get my custom  field
type deployed into my production environment from my development environment, in
my development environment I have VSeWSS 1.2 VS 2008, I just simple  click Build
--> Deploy solution and it automatically deploys everything to my SharePoint
development server. This works great for development but YOU HAVE TO HAVE IT ALL
INSTALLED ON THE SAME COMPUTER (visual studio with VSeWSS plug-in and windows
SharePoint services all on same box or in the same VM environment server in my
case). My production environment is way different not to mention my admin will
not let me install VS Studio or the VSeWSS plug-ins (for good  reason of course,
also it would only deploy it to one web front end anyways not both) we have two
web front ends, a separate Sql server box, a SAN storage, a separate search box,
and a separate application box. Now when I click deploy solution in my
development environment VS creates a series of files (see list below) what I
want to know is which files to I need to burn to a CD or what ever and give to
my SP Admin in order for him to add this solution to the web front ends ect. (I
know there is a .wsp created  but I know there has to more files included with
it)

LIST OF FILES AND FILE STRUCTURE:
CustomFieldType
bin
Debug
Solution
xml

fldtypes_LogoField.xml
CustomFieldType.dll
manifest.xml
CustomFieldType.dll
CustomFieldType.pdb
CustomFieldType.wsp
Setup.bat
LogoField
LogoField.Field.cs
LogoField.FieldControls.cs
obj
Debug
TempPE
CustomFieldType.csproj.FileListAbsolute.txt
CustomFieldType.dll
CustomFieldType.pdb
ResolveAssemblyReference.cache
pkg
manifest.xml
solution.xml
Properties
AssemblyInfo.cs
CustomFieldType.snk
Templates
xml
fldtypes_LogoField.xml
CustomFieldType.csproj
CustomFieldType.sln
CustomFieldType.suo

The main thing I need to know:

can I place these files on server and run the .wsp file (what files need to be
include and in what structure), if not then can I create one using wspbuilder
(if so what will the file structure look like when running wspbuilder), or do I
need to create a custom .bat file (if so what files will I need to place where
i.e. what goes to the 12hive where, what goes to GAC, and what STS commands will
I need to run?)

If you need to see any of the files let me know I will post them (i.e. the
setup.bat) everything was created by the VSeWSS plug-in I have not customized
anything except the code in the LogoFieldControls.cs file of course

Here's the link to the walk thru I did for this:
msdn.microsoft.com/en-us/library/bb684919.aspx

Some one said the video was not working on above link but here it is on you
tube:
http://www.youtube.com/watch?v=7xpNRjEYuUU

 
Answer #4    Answered By: Latrice Henson     Answered On: Mar 09

VSeWSS automatically generates a Solution (WSP) file for you. It uses this to
deploy the project locally when you are testing it. The WSP file is an archive
that contains everything you need to install the field  type into production. To
install on another server simply copy the WSP file out of the BIN directory in
the project and install that on the Central Admin server using STSADM. The
command line is STSADM -o addsolution [filename and path of WSP]. Then go to
the Operations tab of Central admin and schedule deployment of the solution. In
your list below it looks like you've only generated a DEBUG version so far. You
should build a Release version and use the WSP from that for your production
install.

BTW, this is one of the things I don't like about VSeWSS. It hides all the
details from developers. Everything works great if you are developing on a
production server, but it never explains what it is doing. So programmers just
starting out in SharePoint never learn what is happening or how to deploy it.

 
Answer #5    Answered By: Nidhi Tiwary     Answered On: Mar 09

Sent it over to the SP Admin and it work fine he said.(Right now I
am only taking it from my VM to our pre-stage so debug is okay but thanks for
the heads up I was so catch up in getting it deployed I almost for got to set
the properties to release instead of debug)

 
Answer #6    Answered By: Beatrice Serrano     Answered On: Mar 09

Also make sure you are moving the right WSP. I had one instance with a client
in the past when I sent them the old Release version after fixing a bug and
testing it by rebuilding the Debug version.

 
Didn't find what you were looking for? Find more on Custom Field Type Controls Or get search suggestion and latest updates.




Tagged: