Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / September 2005

Tip: Looking for answers? Try searching our database.

"Encapsulate field failed" Error while tring to Encapsulate a field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JimGreen - 26 Sep 2005 18:52 GMT
I receive this message and nothing. I am not able to use refactoring at
all. I can't extract interface,can't do encapsulation.
I can however use "rename" feature

Any Ideas how to fix it
I am using  .NET Beta 2

Thanks
Jim
Jason Wilden - 27 Sep 2005 13:51 GMT
Jim,

I had a problem similar to this and got this reply on the support forums:

JW,

The most likely reason that the Encapsulate Field refactoring is failing is
that it is unable to find the Code Snippet that it needs to use in order to
generate the actual property.  This wouldn't effect the preview
functionality, as you've noticed, because the preview only shows the
references that would be updated and not the actual property insertion.
There are 3 .snippet files that the feature relies on,
EncapsulateField.snippet, EncapsulateFieldGet.snippet, and
EncapsulateFieldSet.snippet.  These are located in the %program
files%\Microsoft Visual Studio 8\VC#\Snippets\1033\Refactoring directory.
If those files exist then it's possible that the registration of that
directory is incorrect.  If you go to Tools menu there is an option for Code
Snippets Manager.  Check to see if that directory is listed in the left hand
pane.  If it's not, add it via the add... button at the bottom of that
dialog, and then try the feature again.

Hope that helps!
Anson Horton
C# IDE PM

Maybe you have a similar problem - the full thread can be found here:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=10003

Regards,

Jason.

>I receive this message and nothing. I am not able to use refactoring at
> all. I can't extract interface,can't do encapsulation.
[quoted text clipped - 5 lines]
> Thanks
> Jim
JimGreen - 28 Sep 2005 00:02 GMT

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.